I'd like to second the request to update the sensor simulator to new  
Android SDK 1.6/2.0 APIs.  Thanks!
For more information:
http://code.google.com/p/openintents/wiki/SensorSimulator
if I want to use my HTC magic to control the SensorSimulator on  
computer,can i?
+1 for 2.0 API support
Yes, I get the same error as renijoym:
pkg: /data/local/tmp/OpenIntents.apk Failure  
[INSTALL_FAILED_MANIFEST_MALFORMED]
Can somebody help me please!
I have just installed everything from their websites with the latest  
versions, from Java JDK, Eclipse, SensorSimulator, OpenIntents, etc... Even  
my winXP was recently installed a couple days ago!
I would also love a version that uses SensorEventListener rather than the  
deprecated SensorListener.
Are there plans for 2.0 API support?  If so, when will this be available.   
Thanks!
Can someone suggest another simulator that is available for the current  
API?  Thanks!
The sensor data defintion isn't compatible with API 2.0.
Hope to get the latest one.
It would be more than awesome if this can work for me, however, I'm  
recieving this error, can anyone tell me what I'm doing wrong?
Cannot cast from SensorManagerSimulator to SensorManager
and for Hardware.mContentResolver = getContentResolver(); I'm getting;
Hardware.mContentResolver = getContentResolver();
thanx a lot!
Does anyone has any guide on how to make sensor simulator work on
Froyo, i can't even connect application to emulator. Ty for any positive  
feedback
Hi!
I'm trying to run SensorSimulatorSettings on real device(Android 1.5, HTC  
Hero). But i get error with database...some SQL exception or something like  
that...Is there any posibility to run that on real device, and if anyone  
have any idea about this problem i would be very gratefull...
Thanks
Hmmm.
I am trying to use it but
sm = SensorManagerSimulator.getSystemService(this, SENSOR_SERVICE);
throws exception. I 've added the <uses-permission  
android:name="android.permission.INTERNET"/>.
What could be wrong ?
Thanks.
I've tried just to run the simulator and install & run OpenIntents.apk.
In the result was the exception
   Uncaught handler: thread main exiting due to uncaught exception
   java.lang.RuntimeException: Unable to start service  
org.openintents.locations.MockLocationService@43d4ae70 with Intent {  
cmp=org.openintents/.locations.MockLocationService }:  
java.lang.IllegalArgumentException: Provider "gps" unknown
        ...................
        ...................
After that application falls into infinte loop of restarting and closing  
with error.
So I'm wondering how the gps is related to sensors simulation...
I want to try to update this to work with the new 2.0 API, but I can't find  
the source code. Where would I go about getting it?
It doesn't work with new API mostly cause of changes that are introduced to  
Sensors. I have already done some modifications and currently got stuck  
because of SensorEvent. If you really want to give it a try, contact me on  
mail and i can give you a help.
guys,i am new to android development .... I have a need to simulate the  
real time movement of the android device... suppose, the user holding the  
android device moves, the location attributes should change immediately in  
real time... Is it possible to simulate this need using the SensorSimulator  
software ???
Hi, cannot connect to sensorsimulator... i have this error appearing on  
debug information:
==
I/Hardware(  375): Connecting to 127.0.0.1 : 8020
E/Hardware(  375): Couldn't get I/O for the connection to: 127.0.0.1 : 8020
E/Hardware(  375):  
---------------------------------------------------------------
E/Hardware(  375): Do you have the following permission in your manifest?
E/Hardware(  375): <uses-permission  
android:name="android.permission.INTERNET"/>
E/Hardware(  375):  
---------------------------------------------------------------
I/AndroidRuntime(  375): AndroidRuntime onExit calling exit(1)
D/Zygote  (   30): Process 375 exited cleanly (1)
I/ActivityManager(   66): Process org.openintents.sensorsimulator (pid 375)  
has died.
==
When i click connect, the application simply closes... why does this  
happens? I'm sure to have sensorsimulator listening on correct port, and i  
also have this in manifest file: <uses-permission  
android:name="android.permission.INTERNET"/>
Any help?
Thanks
Hello,i have a question regarding the sensor simulator...
Is it possible to simulate the movement of the android device using  
sensorSimulator?? for example,if i select the "move" option in the sensor  
simulator and move the device, the co-ordinates of the current position of  
the device should be available to me .... Is this possible ??? if  
possible,which option will give me the co-ordinate position(Accelerometer  
or compass) ??
Great software I'm sure.. I couldn't find openintents that would run on my  
Android 2.1
Why o  why does it all have to be so cryptic as to where to download  
files....
Hello, i have a problem using sensorSimulator.
If in my code i register only a sensor, all works fine.
If i register more than one sensor (for example orientation and  
accelerometer), my application is stopped with this exception:
01-25 13:06:12.521: ERROR/AndroidRuntime(409): FATAL EXCEPTION: main
01-25 13:06:12.521: ERROR/AndroidRuntime(409): java.lang.RuntimeException:  
Unable to start activity  
ComponentInfo{it.unipr.android.sensori/it.unipr.android.sensori.SensorActivity}:  
java.util.NoSuchElementException
01-25 13:06:12.521: ERROR/AndroidRuntime(409):     at  
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
01-25 13:06:12.521: ERROR/AndroidRuntime(409):     at  
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
01-25 13:06:12.521: ERROR/AndroidRuntime(409):     at  
android.app.ActivityThread.access$2300(ActivityThread.java:125)
01-25 13:06:12.521: ERROR/AndroidRuntime(409):     at  
android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
01-25 13:06:12.521: ERROR/AndroidRuntime(409):     at  
android.os.Handler.dispatchMessage(Handler.java:99)
01-25 13:06:12.521: ERROR/AndroidRuntime(409):     at  
android.os.Looper.loop(Looper.java:123)
01-25 13:06:12.521: ERROR/AndroidRuntime(409):     at  
android.app.ActivityThread.main(ActivityThread.java:4627)
01-25 13:06:12.521: ERROR/AndroidRuntime(409):     at  
java.lang.reflect.Method.invokeNative(Native Method)
01-25 13:06:12.521: ERROR/AndroidRuntime(409):     at  
java.lang.reflect.Method.invoke(Method.java:521)
01-25 13:06:12.521: ERROR/AndroidRuntime(409):     at  
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
01-25 13:06:12.521: ERROR/AndroidRuntime(409):     at  
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
01-25 13:06:12.521: ERROR/AndroidRuntime(409):     at  
dalvik.system.NativeStart.main(Native Method)
01-25 13:06:12.521: ERROR/AndroidRuntime(409): Caused by:  
java.util.NoSuchElementException
01-25 13:06:12.521: ERROR/AndroidRuntime(409):     at  
java.util.ArrayList$ArrayListIterator.next(ArrayList.java:576)
01-25 13:06:12.521: ERROR/AndroidRuntime(409):     at  
org.openintents.sensorsimulator.hardware.SensorSimulatorClient.enableSensor(SensorSimulatorClient.java:447)
01-25 13:06:12.521: ERROR/AndroidRuntime(409):     at  
org.openintents.sensorsimulator.hardware.SensorSimulatorClient.registerListener(SensorSimulatorClient.java:262)
01-25 13:06:12.521: ERROR/AndroidRuntime(409):     at  
org.openintents.sensorsimulator.hardware.SensorManagerSimulator.registerListener(SensorManagerSimulator.java:164)
01-25 13:06:12.521: ERROR/AndroidRuntime(409):     at  
it.unipr.android.sensori.SensorActivity.onCreate(SensorActivity.java:40)
01-25 13:06:12.521: ERROR/AndroidRuntime(409):     at  
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
01-25 13:06:12.521: ERROR/AndroidRuntime(409):     at  
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
what's the problem??
this is my code:
public void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
         setContentView(R.layout.main);
         TextView magneticFieldTv =  
(TextView)findViewById(R.id.magneticField);
        // sm = (SensorManager)  
getApplicationContext().getSystemService(SENSOR_SERVICE);
         sm = SensorManagerSimulator.getSystemService(this, SENSOR_SERVICE);
sm.connectSimulator();
         //create Sensors
         Sensor Accel = sm.getDefaultSensor(Sensor.TYPE_ACCELEROMETER);
         Sensor Orient = sm.getDefaultSensor(Sensor.TYPE_ORIENTATION);
         //register this class as a listener for the orientation and  
accelerometer sensors
         sm.registerListener((SensorEventListener) this, Accel,  
sm.SENSOR_DELAY_FASTEST);
         sm.registerListener((SensorEventListener) this, Orient,  
sm.SENSOR_DELAY_FASTEST);
     }
@Override
	public void onSensorChanged(SensorEvent event) {
		Sensor sensor = event.sensor;
         float [] values = event.values;
         if (event.type == Sensor.TYPE_ACCELEROMETER) {
         	TextView accelerometerTv =  
(TextView)findViewById(R.id.accelerometer);
         	accelerometerTv.setText("ACCELEROMETER: " + values[0]+ " "+  
values[1]+ " "+ values[2]);
         	
         }
         else if (event.type == Sensor.TYPE_ORIENTATION ) {
         	TextView compassTv = (TextView)findViewById(R.id.compass);
         	compassTv.setText("COMPASS: " + values[0]+ " "+ values[1]+ " "+  
values[2]);
         }
		
	}
can anyone help me?
thanks!
Laura
Hello all,
I've hacked up a version of the simulator that works with the more recent  
2.0 API. I'll be cleaning up the code and will post a patch soon.
Edward
Where can i find this "Enable Sensors" button that i'm supposed to press? I  
can't seem to find it...
Nice application!
Is there any way to add a third tab into the simulatorsettings with a  
different activity?
Someone needs to put a big notice on this page that the simulator does not  
work on 2.1 apps. I'm relatively new at Android so I'm running the latest  
SDK and just spent a day trying to get the simulator to work. Sounds like  
Edward might have a fix nearly ready to go and I'm anxiously awaiting it.
Do someone know a software which allows you to pass sensor-data from a real  
phone to the SDK, or would it be possible to develop an android version of  
the server application so you could do that with Sensor Simulator???
hello i have the same problem as laura... if only one sensor/listener is  
registered everything works fine, but if there are more sensors/listeners  
it doesn't work.
Uncaught handler: thread main exiting due to uncaught exception
java.lang.RuntimeException: Unable to bind to service  
de.ostfalia.android.carblackbox.TrackingService@44c46738 with Intent {  
cmp=de.ostfalia.android.carblackbox/.TrackingService }:  
java.util.NoSuchElementException
android.app.ActivityThread.handleBindService(ActivityThread.java:2816)
android.app.ActivityThread.access$3300(ActivityThread.java:119)
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1920)
android.os.Handler.dispatchMessage(Handler.java:99)
android.os.Looper.loop(Looper.java:123)
android.app.ActivityThread.main(ActivityThread.java:4363)
java.lang.reflect.Method.invokeNative(Native Method)
java.lang.reflect.Method.invoke(Method.java:521)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
dalvik.system.NativeStart.main(Native Method)
Caused by: java.util.NoSuchElementException
java.util.AbstractList$SimpleListIterator.next(AbstractList.java:61)
org.openintents.sensorsimulator.hardware.SensorSimulatorClient.enableSensor(SensorSimulatorClient.java:447)
org.openintents.sensorsimulator.hardware.SensorSimulatorClient.registerListener(SensorSimulatorClient.java:262)
org.openintents.sensorsimulator.hardware.SensorManagerSimulator.registerListener(SensorManagerSimulator.java:164)
de.ostfalia.android.carblackbox.sensor.SensorProviderSimulator.start(SensorProviderSimulator.java:102)
de.ostfalia.android.carblackbox.TrackingService.startService(TrackingService.java:143)
de.ostfalia.android.carblackbox.TrackingService.onBind(TrackingService.java:120)
android.app.ActivityThread.handleBindService(ActivityThread.java:2804)
thx 4 ur help
with regards
Frank
@rallyelgen: I was thinking of something on these lines too; it would  
involve the same concepts as the Sensor Simulator, transmitting sensor data  
via sockets using telnet. I'll let you know if I make any headway with this.
For more information:
http://code.google.com/p/openintents/wiki/SensorSimulator
Does it works on Android OS Ver. 2.3.3? I run it on Nexus S but the sensor  
values are not updated.
Both connection and enable/disable is okay. but the sensor values are not  
updated.
does anybody who had tried to run it on Nexus S w/o any problem?
Does it works on Android OS Ver. 2.3.3? I run it on Nexus S but the sensor  
values are not updated. Both connection and enable/disable are okay. but  
How do you enable comments in your googlecode site? I'm not able to get it  
work.
> How do you enable comments in your googlecode site?
Administer > Wiki > Visitor comments > Allow visitor comments.
This looks like a great tool, but I'm having a hard time getting started.  
The emulator won't connect to the SensorSimulator java app. I do not get  
an 'Enable' button and when I click Connect, it responds but stays on and  
the Disconnect button does not enable. Both apk files installed  
with 'Success', the SensorSimulator seems fully functional.
I'm using Windows 7 x64, Android 2.1.1, sensorsimulator 1.1.1
I've tried...
Emulator with/without eclipse
With firewall turned off (bitdefender IS 2010)
With wireless and wired internet connection
198.162.1.x (local IP) and 127.0.0.1 (localhost)
Port 8010 and port 80 (no IIS running)
ping of IP works
netstat -a shows a result of "[::]:8010" as Listening
java app shows 'Listening on port 8010...' in it's dialog
Any suggestions?
Some of the text in the prior post got garbled. The results of the netstat  
was open square bracket colon colon close square bracket colon 8010. Not  
sure why there was no IP address indicated in the brackets.
Ok. I figured it out. It had to do with the text input for the IP address.  
When I used either my local keyboard, or the keyboard that pops-up on the  
android screen, the dot (period) appears to be a double byte character. If  
I use the keyboard on the right panel, it works correctly.
Loaded apk on emulator, but can't run sensorsimulator-1.1.1 on WinXP 64. Is  
this not supported?
E:\download\Android\sensorsimulator-1.1.1\bin>java -version
java version "1.6.0_25"
Java(TM) SE Runtime Environment (build 1.6.0_25-b06)
Java HotSpot(TM) 64-Bit Server VM (build 20.0-b11, mixed mode)
E:\download\Android\sensorsimulator-1.1.1\bin>java sensorsimulator-1.1.1.jar
Exception in thread "main" java.lang.NoClassDefFoundError:  
sensorsimulator-1/1/1/jar
Caused by: java.lang.ClassNotFoundException: sensorsimulator-1.1.1.jar
         at java.net.URLClassLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: sensorsimulator-1.1.1.jar.  Program will  
exit.
I can't get this to work.
Settings installs, Simulator connects.  But demo fails.
It appears to be caused by Instrumentation onCreate.  Does anyone see a  
solution?
E/AndroidRuntime(  345): FATAL EXCEPTION: main
E/AndroidRuntime(  345): java.lang.NoClassDefFoundError:  
org.openintents.sensorsimulator.hardware.SensorManagerSimulator
E/AndroidRuntime(  345):        at  
org.openintents.samples.SensorSimulatorDemo.SensorSimulatorDemoActivity.onCreate(SensorSimulatorDemoActiv
ity.java:67)
E/AndroidRuntime(  345):        at  
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
E/AndroidRuntime(  345):        at  
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
E/AndroidRuntime(  345):        at  
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
E/AndroidRuntime(  345):        at  
android.app.ActivityThread.access$1500(ActivityThread.java:117)
E/AndroidRuntime(  345):        at  
android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
E/AndroidRuntime(  345):        at  
android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(  345):        at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime(  345):        at  
android.app.ActivityThread.main(ActivityThread.java:3683)
E/AndroidRuntime(  345):        at  
java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(  345):        at  
java.lang.reflect.Method.invoke(Method.java:507)
E/AndroidRuntime(  345):        at  
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
E/AndroidRuntime(  345):        at  
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
E/AndroidRuntime(  345):        at dalvik.system.NativeStart.main(Native  
Method)
Hello, I have a problem using sensorSimulator. when I run the application  
in emulator it shows alert message as "The application  
SensorRealDevice(Process org.openintents.samples.SensorRealDevice) has  
stopped unexpectedly. Please try again",
but in the logcat doesn't show any errors.
I use 2.3.3 version emulator to run this application.
hi please find the code below.Here it works fine which diplays 0.0 in the  
text field.
but when i try to run it by making necessary changes as mentioned above to  
connect to sensor simulator it is not running ...please help me...package  
com.android.mindtree;
import android.app.Activity;
import android.os.Bundle;
// import android.content.Context;
import android.hardware.Sensor;
import android.hardware.SensorEvent;
import android.hardware.SensorEventListener;
import android.hardware.SensorManager;
import android.widget.*;
//import org.openintents.sensorsimulator.hardware.Sensor;
//import org.openintents.sensorsimulator.hardware.SensorEvent;
//import org.openintents.sensorsimulator.hardware.SensorEventListener;
//import org.openintents.sensorsimulator.hardware.SensorManagerSimulator;
//import android.view.View;
public class AccelerometerActivity extends Activity implements  
SensorEventListener{
     /** Called when the activity is first created. */
	SensorManager mSensorManager;
     Sensor accelerometer;
	
     @Override
     public void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
         setContentView(R.layout.main);
         mSensorManager = ( SensorManager)getSystemService(SENSOR_SERVICE);
        // mSensorManager.connectSimulator();
		accelerometer =  
mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER);
     }
     public void onResume() {
		super.onResume();
		mSensorManager.registerListener(this, accelerometer,  
SensorManager.SENSOR_DELAY_UI);
		
		}
	public void onPause() {
		super.onPause();
		mSensorManager.unregisterListener(this);
		}
	
	public void onAccuracyChanged(Sensor sensor, int accuracy) {  }
	
	public void onSensorChanged(SensorEvent event) {
		float[] acclvalue=new float[3];
		acclvalue[0]=event.values[0];
		acclvalue[1]=event.values[1];
		acclvalue[2]=event.values[2];
		TextView tv = (TextView) findViewById(R.id.editText1);
		String message="value is" + acclvalue[0];
		  tv.setText(message);
hi all,
i have written code to print the values returned by accelerometer.It  
returns by default the valuse 0.0 , 9.88  , .88 for x,y and z axis  
respectively.As i have not used any sensor simulator the value remains  
same..but as discussed above i used sensor simulator( Replaced  
Sensormanager by SensorManagerSimulator) but its not returning any value  
mot even 0.0...in the mean time i noticed that when i keep cursor on any  
function related to sensormsnagersimulator it shows the following message(  
This element neither has attached source nor attached Javadoc and hence no  
Javadoc could be found.)..but all other functions properties and  
functionalities are displayed as soon as i move cursor over to that....so i  
think the problem lies in that itself...i have even added external jar file  
also...still the problem persists...please anybody help me in sorting out  
this problem...
Hi everyone !
First of all, thank you for your tool which is great.
Actually, i've managed to modify an android app to use sensorsimulator, and  
it's working fine when I simulate some sensors from the server. But I'd  
like to be able to get the real sensor datas when the app is not connected  
to the server. As it is written in the documentation, I removed the  
connectSimulator() call in my code, but i don't get any data ! Should I do  
anything else ?
Thanks in advance for your help.
What a great idea this is.  Too bad we have to modify the source code in  
the application to either work with real sensors or this sensor simulator.   
Is there any discussion with google android emulator development team to  
incorporate this simulator into the standard SDK?
I followed the instructions to modify my code (that was fairly straight  
forward) but am getting some runtime silent error upon calling  
mSensorManager.connectSimulator();
when stepping through this in the debugger I see no exception throw but  
simply that the application exits.
     	mSensorManager = SensorManagerSimulator.getSystemService(this,  
SENSOR_SERVICE);
     	if (mSensorManager != null)
     	{
     		try
     		{
     			mSensorManager.connectSimulator();
     		}
     		catch (Exception e)
     		{
     			//this does not happen, maybe connectSimulator is not throwing an  
exception
     			//but simply exiting the app?
How can I Install bin/SensorSimulatorSettings-x.x.x.apk on my Android  
emulator.I am using windows 7.
Hi does SensorSimulator communicate to the android browser? I have  
javascript that uses acceleromater and window.orientation and I'm not  
seeing the changes I expect.
Hey is it possible to have two instances of Sensor Simulator connecting to  
a app running on 2 Emulators so that i can uniquely give motion events to  
each of the Emulator ?
Hi,
How do I use the accelerometer in the simulator. I have written an app for  
reading acclerometer data but not able to figure out how to use this  
simulator. Please Help!!