QNimate

  • CoursesVideos
  • WP PremiumPlugins
  • DemosLab
  • Bitcoin BankingBuy, Sell, Store and Earn Interest
  • Home
  • QIdea
  • QTrack
Home Carbon Ads Retrieve Device Information Using Intel XDK

Retrieve Device Information Using Intel XDK

This post is a part 9 of Intel XDK Complete Tutorial post series.

Device information includes mobile operating system name, mobile phone model and webview browser. Some times it might be necessary to find this information. We can also find information like device unique device id and cordova framework version.

Find Device Model

intel.xdk.device.model property is used to find device model.

//Some possible values: iPad, Motorola Droid, iPhone 3G, iPhone 4, HTC Incredible etc.
alert(intel.xdk.device.model);

Detect Tablet or Phone

If you want to find if the device is a tablet or phone then use intel.xdk.isphone and intel.xdk.istablet.

if(intel.xdk.isphone==true)
{
    console.log("Native device is a phone");
}

if (intel.xdk.istablet==true)
{
    console.log("Native device is a tablet");
}

Find Mobile OS

intel.xdk.device.platform can be used to find operating system under which the app is running.

//Possible Values: iOS, Android etc.
alert(intel.xdk.device.platform);

Find Webview Browser

Intel XDK executes code inside a webview. This webview objects actually emulates a browser. The type of browser it emulates can be found using navigator.appCodeName property.

//Possible values: Microsoft Internet Explorer, Mozilla etc.
alert(navigator.appCodeName);

Find UUID of Mobile

Every mobile phone in this world has a unique UUID which identifies the phone uniquely. UUID can be retrieved using intel.xdk.device.uuid property

alert(intel.xdk.device.uuid);

Cordova version

We can find the version of cordova using intel.xdk.device.phonegapversion property.

alert(intel.xdk.device.phonegapversion);
Nov 5, 2014Narayan Prusty
Find Internet Connection Type Using Intel XDKIntel XDK App State Change Detection
Comments: 4
  1. KAmlakar singh
    3 years ago

    How can I get the details of the device using this plugin…
    I read Some articles but cant find out… http://pointdeveloper.com/get-device-information-ionic-3/
    https://www.mindstick.com/blog/11359/cordova-displaying-device-info

    ReplyCancel
  2. mohneesh
    4 years ago

    How can I got build app version? I want to display the app version to users.

    ReplyCancel
  3. raj
    4 years ago

    UUID code works fine and the alert shows in emulator but on device this doesn’t work. No alert comes up. Plz suggest

    ReplyCancel
    • yuvaraj Mudaliar
      4 years ago

      On device use cordova notification plugin to pop up alert.

      ReplyCancel

Leave a Reply Cancel reply

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four
    spaces will be stripped off, but all other whitespace
    will be preserved.
    
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

Narayan Prusty

I am a full-stack web developer. I specialize in Blockchain and JavaScript. This is my personal blog where I write about programming and technologies that I learn and feel interesting to share.

6 years ago 4 Comments Cordova
Share this
0
GooglePlus
0
Facebook
0
Twitter
0
Linkedin
  • Find Device Model
  • Detect Tablet or Phone
  • Find Mobile OS
  • Find Webview Browser
  • Find UUID of Mobile
  • Cordova version
Related Articles
  • Push Notification in Intel XDK using Push Plugin
  • Find Recorded Audio File Location in Cordova
  • Create a Mobile app using Intel XDK and Ionic Framework
  • Twitter Login in Intel XDK APP using ngCordovaOauth
  • Working with File System using Intel XDK
Our Sponsor
Freelance: I am available
@narayanprusty
Hi, I am a full-stack developer - focusing on JavaScript, WordPress, Blockchain, DevOps, Serverless and Cordova. You can outsource your app development to me.





Will get back to you soon!!!
WordPress
ReactJS
Meteor
Blockchain
Serverless
Kubernetes
DevOps
DB & Storage
Ejabberd
Let's get started
My Books

2014 - 2015 © QNimate
All tutorials MIT license