Software Archive
Read-only legacy content
17061 Discussions

Intel XDK Device (intel.xdk.device) plugin

Kevin_L_3
Beginner
363 Views

Hi - just want to clarify about this plugin. On my Plugin Management it says this plugin is depreciated and that no single plugin covers what this did. Could you please clarify on this - whether its still needed or not? Or whether we need to replace it with other plugins and if so which ones? Additionally, I can't remove it either as I get errors. Also does this mean that in our index.html these lines of code are no longer necesssary?

    <script>
    document.addEventListener("intel.xdk.device.ready", onDeviceReady, false);               
    function onDeviceReady(){
        intel.xdk.device.setAutoRotate(true);
        intel.xdk.device.hideSplashScreen();   
    }   

   </script>

Leaving it in doesn't appear to affect the builds but just want to check on this.

Thank you.

0 Kudos
4 Replies
Amrita_C_Intel
Employee
363 Views

Hello,

If you go to the core plugins you can find Device- Cordova device plugin which will work.

0 Kudos
Anusha_M_Intel1
Employee
363 Views

Like Amrita said, you can use the Cordova device plugin as a replacement. But you will have to remove references to your intel.xdk.device plugin in your code and change it to Cordova device plugin calls. 

0 Kudos
Swati_S_Intel1
Employee
363 Views

@Kevin, you are correct, there is no single plugin that covers all the features of intel.xdk.device plugins. Depending on your app requirements the following Cordova plugins together makeup for most of the xdk.device plugin.

Cordova Device, Cordova Device Orientation, Cordova Network Information, Cordova Splashscreen, Cordova Statusbar. 

All the above plugins are part of core plugins under the Plugins Management. You can see the documentation for each one when you select the plugin. If you have specific feature in mind we can guide you to equivalent Cordova plugin.

Since we have deprecated the intel.xdk plugins, they are not maintained but available for use as a third-party plugin, but parts of it may not work and it's up to the user to make all the parts work. So, at this point we recommend that you switch to Cordova counter parts.

The intel.xdk.device.ready code that you mentioned is no longer needed. 

0 Kudos
Kevin_L_3
Beginner
363 Views

Hi Swati - just a clarification - perhaps obvious but - omitting the plugin and the line of code: intel.xdk.device.setAutoRotate(true) will stop the app from autorotating (at least it did for my iOS build). This means anyone who wants auto rotation will need to add the cordova-plugin-screen-orientation-device plugin which isn't listed above.

0 Kudos
Reply