IBM Worklight v5.0.5 > Develop IBM Worklight applications

Mobile Browser Simulator in Worklight Studio



Search Tips  |  Advanced Search

To use the Mobile Browser Simulator in WebSphere Studio to preview Worklight applications on Android, iPhone, iPad, and Windows Phone environments enable the following Worklight Studio plug-in...

The Apache Cordova API simulation user interface is packaged with the Mobile Browser Simulator. Data types and values used by Cordova are displayed on the left side.

If you do not want to use the Cordova simulation to preview the Worklight applications, clear the Cordova check box to disable the Cordova simulation.


For each simulated device, shows the property values for the object...


Read-only. To show the values for other devices, click Previous or Next.


Triggers any of the following Cordova events:

  • pause
  • resume
  • online
  • offline
  • backbutton
  • menubutton
  • searchbutton
  • startcallbutton
  • endcallbutton
  • volumedownbutton
  • volumeupbutton

To trigger a Cordova event, click the corresponding button:


Defines the Accelerometer values returned by the Cordova API when querying Accelerometer data. To generate a new set of values, click Next. To generate the values periodically, click Start.


Defines battery-related data, such as the battery level. You can use the slider to change the battery level and trigger a batterystatus event. The following battery levels trigger events:

  • Twenty percent triggers the batterylow event
  • Five percent triggers the batterycritical event

To define the plugged in status of your mobile device, select or clear the Plugged In check box.


Specifies which image to use for the camera and for the album:

  • Simulate a photo taken with the camera (Camera.sourceType == Camera.PictureSourceType.CAMERA)
  • Photo from the device photo album or library (Camera.sourceType == Camera.PictureSourceType.PHOTOLIBRARY or Camera.sourceType == Camera.PictureSourceType.SAVEDPHOTOALBUM)

To change the size of the selected photos, click XS, S, M, L, or XL.


Simulates the Cordova capture API using the following methods:

  • capture.captureAudio
  • capture.captureVideo

You can select the audio and video recordings that you want to use, and play these recordings using the HTML5 players.

Note: The Capture section is available on both Mozilla Firefox and Google Chrome. For improved support of the HTML 5 players, upgrade these browsers to the latest version.


Defines the values returned by the Cordova API when querying Compass data. To generate a new set of values, click Next. To generate the values periodically, click Start. You can also set the compass values by directly interacting with the compass widget.


Shows the available contacts for the mobile device. You can delete contacts and refresh the list of available contacts.

Create new contacts for the mobile device, use the Cordova Contacts API from your simulated mobile web page. The contacts are stored in the Web SQL Database which is supported by default by Google Chrome and Safari. To simulate the Contacts API with Firefox, install an Add-on in your browser that adds basic WebSQL support to Firefox.


Simulates the Cordova File API by running an applet. To update the display of the file system that you can access through the Cordova API, click Refresh. Use the Cordova API to access this file system to read and write.


Generates the Geolocation values returned by the Cordova API when querying Geolocation data. To generate a new set of values, click Next. To generate the values periodically, click Start.


Defines the active connection of the device.

The Cordova API also contains media simulation. Media simulation is available only for audio playback; audio recording is not supported. The media simulation uses an HTML audio player and audio playback is supported on Mozilla Firefox and Google Chrome. Since some browsers might not support all audio file formats, use OGG audio files.

The Cordova Notification API is simulated but does not require any user interface in the Mobile Browser Simulator.

Related concepts:

Mobile browser simulator