QNimate

  • CoursesVideos
  • WP PremiumPlugins
  • DemosLab
  • Home
  • QIdea
  • QTrack
Home Carbon Ads Using Intel XDK Find if App is Running in Emulator or Device

Using Intel XDK Find if App is Running in Emulator or Device

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

We can easily find if the app is currently running in emulator or device by the below code snippet

document.addEventListener("intel.xdk.device.ready",onDeviceReady,false);

function onDeviceReady(evt)
{
  if (intel.xdk.isnative==true)
  {
    // Application is running on native device
    console.log("Running on a native device");  
  }

  if (intel.xdk.istest==true)
  {
    // Application is running in app.lab
    console.log("Running in app.lab test");    
  }
}
Nov 13, 2014Narayan Prusty
Create a Barcode Scanner Application using Intel XDK and PHPWordPress Plugin Activation, Deactivation and Uninstall Hooks

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`.

For more help see http://daringfireball.net/projects/markdown/syntax

Narayan Prusty

I am a software engineer specialising in Blockchain, DevOps and Go/JavaScript. This is my personal blog where I write about things that I learn and feel interesting to share.

7 years ago Cordova
Share this
0
GooglePlus
0
Facebook
0
Twitter
0
Linkedin
Related Articles
  • Retrieve Viewport Height and Width In Intel XDK
  • Debugging Intel XDK APPs
  • Testing Intel XDK App on iOS Device using Ad Hoc
  • Launch Default Browser using Intel XDK
  • Find Internet Connection Type Using Intel XDK
Our Sponsor
My Books

2014 - 2015 © QNimate
All tutorials MIT license