vendredi 28 mars 2014

deviceType is returning Desktop when run on a Tablet

Hello everybody



I´m developing an app on Sencha Touch 2.3.1, and i have the need to check if the device in which the app is running is a tablet or not.



The problem that i have is that i'm using Ext.os.deviceType to check for it and when i run it on the tablet it returns Desktop.




Code:



console.log(Ext.os.deviceType); // = Desktop


I guess that the problem could rely on one of two things:


  1. That the tablet i'm running the app on is a Lenovo with Windows 8.1 32 bits x86 based processor. It is not Windows Phone or another version of Windows 8 for tablets, nope, it's Windows 8.1 for desktops, that's how it came from the factory.

  2. I'm building the .exe file with node-webkit, because when i use the build.phonegap.com services to build the windows app it creates a .xap file and i can't run it on the tablet.


I can't test the browser or the OS because the app may be run from the web too, but there's some functionality that has to be run only on the tablet.



Does anyone of you have any idea how can i do this?



PS: The tablet has Internet Explorer 11.0.9600.16521 installed.




Aucun commentaire:

Enregistrer un commentaire