Share this with your friends 

Connecting Sensor Simulator with Android Emulator

10 ratings Views 4869 
Author: Thirumoorthi (Thirumoorthi Samiappan)  View Profile |  View other solutions by this author

Question / Problem

How to install Sensor Simulator(OpenIntents.apk and OpenGLsensors.apk) in Android Emulator?



1. Download the latest OpenIntents-binary-x.x.x.zip in http://code.google.com/p/openintents/downloads/detail?name=openintents-binary-0.9.0.zip&can=1&q=

2. Start tools/SensorSimulator.jar (Java standalone application).

3. Copy the SensorSimulator.jar, OpenIntents.apk, OpenGLSensors.apk and SensorSimulatorSettings.apk file into android tool directory. (e.g: c:\Android\android-sdk-windows\tools)

4. Run the Android Emulator.

5. Install the latest OpenIntents.apk
a. Move to the corresponding android directory in command line. (e.g:
b. Type “adb install OpenIntents.apk” to install. If it shows

pkg: /data/local/tmp/OpenIntents.apk

your Emulator AVD is not matching. You need to use Google API’s target for your
AVD - this includes the Location libraries that are no longer built into the default.

c. Type “adb install OpenGLSensors.apk”.
d. Type “adb SensorSimulatorSettings.apk”.
e. Now the applications are installed in the Emulator.

6. Launch SensorSimulator application on the Emulator.

7. Enter IP address and socket (port) number into the emulator as shown by the SensorSimulator in the Settings tab.

8. Move to the Testing tab.

9. Press "Connect" on the emulator.
Note: The first time you connect to the SensorSimulator, all sensors are DISABLED
automatically. This is, because it is the Android application's responsibility to enable
the sensors before reading values.

10. Press "Enable sensors".

Applies to

Android for developer

Rank It

Login to rank it