- What are the requirements for Testing on Wi-Fi?
- How do I configure app preview to work over Wi-Fi?
- How do I clear app preview cache and memory?
- What are the Android* devices supported by App Preview?
- What do I do if Intel XDK stops detecting my Android* device?
- My third party plugins do not show up on the debug tab. How do I debug an app that contains third party plugins?
- Why does my device show as offline on Intel XDK Debug?
- What do I do if my remote debugger does not launch?
- Why do I get an "error installing App Preview Crosswalk" message when trying to debug on device?
- Why is Chrome remote debug not working with my Android or Crosswalk app?
- How do I detect if my code is running in the Emulate tab?
- Never ending "Transferring your project files to the Testing Device" message from Debug tab; results in no Chrome DevTools debug console.
- Can you integrate the iOS Simulator as a testing platform for Intel XDK projects?
- What is the purpose of having only a partial emulation or simulation in the Emulate tab?
- Not everyone can afford hardware for testing, especially iOS devices; what can I do?
- Is testing on Crosswalk on a virtual Android device inside VirtualBox good enough?
- Why isn't the Intel XDK emulation as good as running on a real device?
- Why doesn't my custom splash screen does not show in the emulator or App Preview?
- Is there a way to detect if my program has stopped due to using uninitialized variable or an undefined method call?
- Why doesn't the Intel XDK go directly to Debug assuming that I have a device connected via USB?
- Can a custom debug module that supports USB debug with third-party plugins be built for iOS devices, or only for Android devices?
What are the requirements for Testing on Wi-Fi?
- Both Intel XDK and App Preview mobile app must be logged in with the same user credentials.
- Both devices must be on the same subnet.
Note: Your computer's Security Settings may be preventing Intel XDK from connecting with devices on your network. Double check your settings for allowing programs through your firewall. At this time, testing on Wi-Fi does not work within virtual machines.
How do I configure app preview to work over Wi-Fi?
- Ensure that both Intel XDK and App Preview mobile app are logged in with the same user credentials and are on the same subnet
- Launch App Preview on the device
- Log into your Intel XDK account
- Select "Local Apps" to see a list of all the projects in Intel XDK Projects tab
- Select desired app from the list to run over Wi-Fi
Note: Ensure the app source files are referenced from the right source directory. If it isn't, on the Projects Tab, change the 'source' directory so it is the same as the 'project' directory and move everything in the source directory to the project directory. Remove the source directory and try to debug over local Wi-Fi.
How do I clear app preview cache and memory?
[Android*] Simply kill the app running on your device as an Active App on Android* by swiping it away after clicking the "Recent" button in the navigation bar. Alternatively, you can clear data and cache for the app from under Settings App > Apps > ALL > App Preview.
[iOS*] By double tapping the Home button then swiping the app away.
[Windows*] You can use the Windows* Cache Cleaner app to do so.
What are the Android* devices supported by App Preview?
We officially only support and test Android* 4.x and higher, although you can use Cordova for Android* to build for Android* 2.3 and above. For older Android* devices, you can use the build system to build apps and then install and run them on the device to test. To help in your testing, you can include the weinre script tag from the Test tab in your app before you build your app. After your app starts up, you should see the Test tab console light up when it sees the weinre script tag contact the device (push the "begin debugging on device" button to see the console). Remember to remove the weinre script tag before you build for the store.
What do I do if Intel XDK stops detecting my Android* device?
When Intel XDK is not running, kill all adb processes that are running on your workstation and then restart Intel XDK as conflicts between different versions of adb frequently causes such issues. Ensure that applications such as Eclipse that run copies of adb are not running. You may scan your disk for copies of adb:
[Linux*/OS X*]:
$ sudo find / -name adb -type f
[Windows*]:
> cd \> dir /s adb.exe
For more information on Android* USB debug, visit the Intel XDK documentation on debugging and testing.
My third party plugins do not show up on the debug tab. How do I debug an app that contains third party plugins?
If you are using the Debug, Emulate or Test tabs you will not see any third-party plugins. At the moment, the only way to debug an app that contains a third-party plugin is to build it and debug the built app installed on your device. We are working on a solution to work with third-party plugins, but it is still in development.
[Android*]
1) For Crosswalk* or Cordova for Android* build, create an intelxdk.config.additions.xml file that contains the following lines:
<!-- Change the debuggable preference to true to build a remote CDT debuggable app for --><!-- Crosswalk* apps on Android* 4.0+ devices and Cordova apps on Android* 4.4+ devices. --><preference name="debuggable" value="true" /><!-- Change the debuggable preference to false before you build for the store. -->
and place it in the root directory of your project (in the same location as your other intelxdk.config.*.xml files). Note that this will only work with Crosswalk* on Android* 4.0 or newer devices or, if you use the standard Cordova for Android* build, on Android* 4.4 or greater devices.
2) Build the Android* app
3) Connect your device to your development system via USB and start app
4) Start Chrome on your development system and type "chrome://inspect" in the Chrome URL bar. You should see your app in the list of apps and tabs presented by Chrome, you can then push the "inspect" link to get a full remote CDT session to your built app. Be sure to close Intel XDK before you do this, sometimes there is interference between the version of adb used by Chrome and that used by Intel XDK, which can cause a crash. You might have to kill the adb process before you start Chrome (after you exit the Intel XDK).
[iOS*]
Refer to the instructions on the updated Debug tab docs to get on-device debugging. We do not have the ability to build a development version of your iOS* app yet, so you cannot use this technique to build iOS* apps. However, you can use the weinre script from the Test tab into your iOS* app when you build it and use the Test tab to remotely access your built iOS* app. This works best if you include a lot of console.log messages.
[Windows* 8]
You can use the test tab which would give you a weinre script. You can include it in the app that you build, run it and connect to the weinre server to work with the console.
Alternatively, you can use App Center to setup and access the weinre console (go here and use the "bug" icon).
Another approach is to write console.log messages to a <textarea> screen on your app. See either of these apps for an example of how to do that:
Why does my device show as offline on Intel XDK Debug?
“Media” mode is the default USB connection mode, but due to some unidentified reason, it frequently fails to work over USB on Windows* machines. Configure the USB connection mode on your device for "Camera" instead of "Media" mode.
What do I do if my remote debugger does not launch?
You can try the following to have your app run on the device via debug tab:
- Place the intelxdk.js library before the </body> tag
- Place your app specific JavaScript files after it
- Place the call to initialize your app in the device ready event function
Why do I get an "error installing App Preview Crosswalk" message when trying to debug on device?
You may be running into a RAM or storage problem on your Android device; as in, not enough RAM available to load and install the special App Preview Crosswalk app (APX) that must be installed on your device. See this site (http://www.devicespecifications.com) for information regarding your device. If your device has only 512 MB of RAM, which is a marginal amount for use with the Intel XDK Debug tab, you may have difficulties getting APX to install.
You may have to do one or all of the following:
- remove as many apps from RAM as possible before installing APX (reboot the device is the simplest approach)
- make sure there is sufficient storage space in your device (uninstall any unneeded apps on the device)
- install APX by hand
The last step is the hardest, but only if you are uncomfortable with the command-line:
- while attempting to install APX (above) the XDK downloaded a copy of the APK that must be installed on your Android device
- find that APK that contains APX
- install that APK manually onto your Android device using adb
To find the APK, on a Mac:
$ cd ~/Library/Application\ Support/XDK $ find . -name *apk
To find the APK, on a Windows machine:
> cd %LocalAppData%\XDK> dir /s *.apk
For each version of Crosswalk that you have attempted to use (via the Debug tab), you will find a copy of the APK file (but only if you have attempted to use the Debug tab and the XDK has successfully downloaded the corresponding version of APX). You should find something similar to:
./apx_download/12.0/AppAnalyzer.apk
following the searches, above. Notice the directory that specifies the Crosswalk version (12.0 in this example). The file named AppAnalyzer.apk is APX and is what you need to install onto your Android device.
Before you install onto your Android device, you can double-check to see if APX is already installed:
- find "Apps" or "Applications" in your Android device's "settings" section
- find "App Preview Crosswalk" in the list of apps on your device (there can be more than one)
If you found one or more App Preview Crosswalk apps on your device, you can see which versions they are by using adb at the command-line (this assumes, of course, that your device is connected via USB and you can communicate with it using adb):
- type
adb devices
at the command-line to confirm you can see your device - type
adb shell 'pm list packages -f'
at the command-line - search the output for the word
app_analyzer
The specific version(s) of APX installed on your device end with a version ID. For example:com.intel.app_analyzer.v12
means you have APX for Crosswalk 12 installed on your device.
To install a copy of APX manually, cd to the directory containing the version of APX you want to install and then use the following adb command:
$ adb install AppAnalyzer.apk
If you need to remove the v12 copy of APX, due to crowding of available storage space, you can remove it using the following adb command:
$ adb uninstall com.intel.app_analyzer.v12
or
$ adb shell am start -a android.intent.action.DELETE -d package:com.intel.app_analyzer.v12
The second one uses the Android undelete tool to remove the app. You'll have to respond to a request to undelete on the Android device's screen. See this SO issue for details. Obviously, if you want to uninstall a different version of APX, specify the package ID corresponding to that version of APX.
Why is Chrome remote debug not working with my Android or Crosswalk app?
For a detailed discussion regarding how to use Chrome on your desktop to debug an app running on a USB-connected device, please read this doc page Remote Chrome* DevTools* (CDT).
Check to be sure the following conditions have been met:
- The version of Chrome on your desktop is greater than or equal to the version of the Chrome webview in which you are debugging your app.
For example, Crosswalk 12 uses the Chrome 41 webview, so you must be running Chrome 41 or greater on your desktop to successfully attach a remote Chrome debug session to an app built with Crosswalk 12. The native Chrome webview in an Android 4.4.2 device is Chrome 30, so your desktop Chrome must be greater than or equal to Chrome version 30 to debug an app that is running on that native webview. - Your Android device is running Android 4.4 or higher, if you are trying to remote debug an app running in the device's native webview, and it is running Android 4.0 or higher if you are trying to remote debug an app running Crosswalk.
When debugging against the native webview, remote debug with Chrome requires that the remote webview is also Chrome; this is not guaranteed to be the case if your Android device does not include a license for Google services. Some manufacturers do not have a license agreement with Google for distribution of the Google services on their devices and, therefore, may not include Chrome as their native webview, even if they are an Android 4.4 or greater device. - Your app has been built to allow for remote debug.
Within theintelxdk.config.additions.xml
file you must include this line:<preference name="debuggable" value="true" />
to build your app for remote debug. Without this option your app cannot be attached to for remote debug by Chrome on your desktop.
How do I detect if my code is running in the Emulate tab?
In the obsolete intel.xdk apis there is a property you can test to detect if your app is running within the Emulate tab or on a device. That property is intel.xdk.isxdk
. A simple alternative is to perform the following test:
if( window.tinyHippos )
If the test passes (the result is true
) you are executing in the Emulate tab.
Never ending "Transferring your project files to the Testing Device" message from Debug tab; results in no Chrome DevTools debug console.
This is a known issue but a resolution for the problem has not yet been determined. If you find yourself facing this issue you can do the following to help resolve it.
On a Windows machine, exit the Intel XDK and open a "command prompt" window:
> cd %LocalAppData%\XDK\> rmdir cdt_depot /s/q
On a Mac or Linux machine, exit the Intel XDK and open a "terminal" window:
$ find ~ -name global-settings.xdk $ cd <location-found-above> $ rm -Rf cdt_depot
Restart the Intel XDK and try the Debug tab again. This procedure is deleting the cached copies of the Chrome DevTools that were retrieved from the corresponding App Preview debug module that was installed on your test device.
One observation that causes this problem is the act of removing one device from your USB and attaching a new device for debug. A workaround that helps sometimes, when switching between devices, is to:
- switch to the Develop tab
- close the XDK
- detach the old device from the USB
- attach the new device to your USB
- restart the XDK
- switch to the Debug tab
Can you integrate the iOS Simulator as a testing platform for Intel XDK projects?
The iOS simulator only runs on Apple Macs... We're trying to make the Intel XDK accessible to developers on the most popular platforms: Windows, Mac and Linux. Additionally, the iOS simulator requires a specially built version of your app to run, you can't just load an IPA onto it for simulation.
What is the purpose of having only a partial emulation or simulation in the Emulate tab?
There's no purpose behind it, it's simply difficult to emulate/simulate every feature and quirk of every device.
Not everyone can afford hardware for testing, especially iOS devices; what can I do?
You can buy a used iPod and that works quite well for testing iOS apps. Of course, the screen is smaller and there is no compass or phone feature, but just about everything else works like an iPhone. If you need to do a lot of iOS testing it is worth the investment. A new iPod costs $200 in the US. Used ones should cost less than that. Make sure you get one that can run iOS 8.
Is testing on Crosswalk on a virtual Android device inside VirtualBox good enough?
When you run the Android emulator you are running on a fictitious device, but it is a better emulation than what you get with the iOS simulator and the Intel XDK Emulate tab. The Crosswalk webview further abstracts the system so you get a very good simulation of a real device. However, considering how inexpensive and easy Android devices are to obtain, we highly recommend you use a real device (with the Debug tab), it will be much faster and even more accurate than using the Android emulator.
Why isn't the Intel XDK emulation as good as running on a real device?
Because the Intel XDK Emulate tab is a Chromium browser, so what you get is the behavior inside that Chromium browser along with some conveniences that make it appear to be a hybrid device. It's poorly named as an emulator, but that was the name given to it by the original Ripple Emulator project. What it is most useful for is simulating most of the core Cordova APIs and your basic application logic. After that, it's best to use real devices with the Debug tab.
Why doesn't my custom splash screen does not show in the emulator or App Preview?
Ensure the splash screen plugin is selected. Custom splash screens only get displayed on a built app. The emulator and app preview will always use Intel XDK splash screens. Please refer to the 9-Patch Splash Screen sample for a better understanding of how splash screens work.
Is there a way to detect if my program has stopped due to using uninitialized variable or an undefined method call?
This is where the remote debug features of the Debug tab are extremely valuable. Using a remote CDT (or remote Safari with a Mac and iOS device) are the only real options for finding such issues. WEINRE and the Test tab do not work well in that situation because when the script stops WEINRE stops.
Why doesn't the Intel XDK go directly to Debug assuming that I have a device connected via USB?
We are working on streamlining the debug process. There are still obstacles that need to be overcome to insure the process of connecting to a device over USB is painless.
Can a custom debug module that supports USB debug with third-party plugins be built for iOS devices, or only for Android devices?
The Debug tab, for remote debug over USB can be used with both Android and iOS devices. Android devices work best. However, at this time, debugging with the Debug tab and third-party plugins is only supported with Android devies (running in a Crosswalk webview). We are working on making the iOS option also support debug with third-party pluings, like what you currently get with Android.