Re: Comment on SensorSimulator in openintents

841 views
Skip to first unread message

openi...@googlecode.com

unread,
Nov 1, 2009, 12:12:49 AM11/1/09
to openi...@googlegroups.com
Comment by Nicholaus.Shupe:

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

openi...@googlecode.com

unread,
Nov 11, 2009, 6:57:04 PM11/11/09
to openi...@googlegroups.com
Comment by jkidsimon:

if I want to use my HTC magic to control the SensorSimulator on
computer,can i?

openi...@googlecode.com

unread,
Nov 25, 2009, 11:28:37 AM11/25/09
to openi...@googlegroups.com
Comment by huttarl:

+1 for updating the sensor simulator to the new Android platform and
SensorEventListener. (I just updated some other code for this change, so
maybe I could do the same for SensorSimulator and submit a patch.)

Question: The instructions above say "download the latest
openintents-binary-x.x.x.zip". I don't see any such thing on the
openintents download list. Does sensorsimulator-1.0.0-beta1.zip replace
that file?

Thanks,
Lars

openi...@googlecode.com

unread,
Nov 25, 2009, 5:24:21 PM11/25/09
to openi...@googlegroups.com
Comment by huttarl:

P.S. Thanks HastCibernio for the tip about requiring the Google APIs as a
target!

openi...@googlecode.com

unread,
Dec 7, 2009, 3:39:19 AM12/7/09
to openi...@googlegroups.com
Comment by adammachowy:

As Nicholaus said it would be great to have version for 1.6/2.0/2.1. Thanks

openi...@googlecode.com

unread,
Dec 7, 2009, 5:38:26 AM12/7/09
to openi...@googlegroups.com
Comment by wilfried.lg:

Is there any version to test applications with android 2.0 and
SensorEventListener ?

openi...@googlecode.com

unread,
Mar 24, 2010, 1:28:43 PM3/24/10
to openi...@googlegroups.com
Comment by skafoelix:

+1 for 2.0 API support

openi...@googlecode.com

unread,
Mar 26, 2010, 11:37:52 PM3/26/10
to openi...@googlegroups.com
Comment by vaghili:

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!

openi...@googlecode.com

unread,
Mar 31, 2010, 2:16:35 PM3/31/10
to openi...@googlegroups.com
Comment by ylfchild:

I would also love a version that uses SensorEventListener rather than the
deprecated SensorListener.

openi...@googlecode.com

unread,
Mar 31, 2010, 3:20:25 PM3/31/10
to openi...@googlegroups.com
Comment by gcswebstats:

Are there plans for 2.0 API support? If so, when will this be available.
Thanks!

openi...@googlecode.com

unread,
Mar 31, 2010, 3:24:45 PM3/31/10
to openi...@googlegroups.com
Comment by gcswebstats:

Can someone suggest another simulator that is available for the current
API? Thanks!

openi...@googlecode.com

unread,
Apr 20, 2010, 9:13:24 PM4/20/10
to openi...@googlegroups.com
Comment by roxie.self:

I would also like a non deprecated version of SensorSimulator.
--
You received this message because you are subscribed to the Google Groups "OpenIntents" group.
To post to this group, send email to openi...@googlegroups.com.
To unsubscribe from this group, send email to openintents...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/openintents?hl=en.

openi...@googlecode.com

unread,
Apr 20, 2010, 9:17:30 PM4/20/10
to openi...@googlegroups.com
Comment by GodsMoon:

+1 for an updated version

openi...@googlecode.com

unread,
Apr 22, 2010, 1:17:10 AM4/22/10
to openi...@googlegroups.com
Comment by peli0101:

Hi developers! I understand your desire for an 2.0 API compatible version
of SensorSimulator. Unfortunately, most of the OI developers are currently
busy fixing bugs in the other OI apps, and there is a long list of feature
requests as well: http://code.google.com/p/openintents/wiki/FeatureRequests

But that's not a big deal, because the SensorSimulator is open source :-)
This means, you can help to contribute!

It should not be too difficult for any of you to write a basic wrapper of
the new classes (that calls back the old classes behind the scenes). If
someone makes a basic start, we can refine and correct that.

If you are interested in contributing, let's discuss the details in our
developer group: http://groups.google.com/group/openintents

This would be the fastest way for you to get the 2.0 API implementation.

openi...@googlecode.com

unread,
Apr 30, 2010, 12:30:48 PM4/30/10
to openi...@googlegroups.com
Comment by f.f.neezen:

I still cannot connect to the local port !

I have the INTERNET permissions in the Manifest file but it keeps saying it
can't connect. If I telnet to the port, I see its open and there. Also, I
can browse on the emulator.

What am I doing wrong? :-( I really need it for an AR application.

openi...@googlecode.com

unread,
Apr 30, 2010, 1:09:11 PM4/30/10
to openi...@googlegroups.com
Comment by f.f.neezen:

got it!!

loopback for your own machine without using direct IP is 10.0.2.2

Nikola1488

unread,
May 6, 2010, 7:49:01 PM5/6/10
to OpenIntents
I have a problem with integrating SensorSim into my app.

It seams im missing:
org.openintents.provider.Hardware;

Where can I download that package or in which library is it?

Nikola

openi...@googlecode.com

unread,
Jun 11, 2010, 9:22:16 AM6/11/10
to openi...@googlegroups.com
Comment by san...@sina.com:

The sensor data defintion isn't compatible with API 2.0.
Hope to get the latest one.

openi...@googlecode.com

unread,
Jun 14, 2010, 4:37:31 AM6/14/10
to openi...@googlegroups.com
Comment by guyhagemans:

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!

openi...@googlecode.com

unread,
Jun 23, 2010, 7:07:57 AM6/23/10
to openi...@googlegroups.com
Comment by donmafijozo:

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

openi...@googlecode.com

unread,
Jun 28, 2010, 11:42:06 AM6/28/10
to openi...@googlegroups.com
Comment by ivan.longin1:

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

openi...@googlecode.com

unread,
Jul 10, 2010, 6:59:11 PM7/10/10
to openi...@googlegroups.com
Comment by WindowssNT:

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.

openi...@googlecode.com

unread,
Jul 25, 2010, 2:28:34 PM7/25/10
to openi...@googlegroups.com
Comment by maleksei:

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

openi...@googlecode.com

unread,
Aug 22, 2010, 9:17:48 PM8/22/10
to openi...@googlegroups.com
Comment by dan.marra:

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?

openi...@googlecode.com

unread,
Aug 23, 2010, 4:18:04 AM8/23/10
to openi...@googlegroups.com
Comment by donmafijozo:

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.

openi...@googlecode.com

unread,
Oct 22, 2010, 7:09:56 PM10/22/10
to openi...@googlegroups.com
Comment by hari.zlatan:

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 ???

Richard

unread,
Oct 23, 2010, 2:24:43 AM10/23/10
to OpenIntents
Hi - as I understand it, it's possible to do what you want using
Android 1.5, but the existing Sensor Simulator does not work for
version 2 upwards. This is because the sensor API has been completely
redesigned and it's now quite difficult to simulate a Sensor object in
a way that would be convenient for app developers. I had a go at
adapting the code at one point, and there was at least one other
person trying the same thing. I didn't finish - I don't know whether
anyone else did.

openi...@googlecode.com

unread,
Oct 29, 2010, 12:30:54 PM10/29/10
to openi...@googlegroups.com
Comment by carlos.vieira:

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

openi...@googlecode.com

unread,
Nov 6, 2010, 9:47:10 PM11/6/10
to openi...@googlegroups.com
Comment by hari.zlatan:

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) ??

openi...@googlecode.com

unread,
Dec 8, 2010, 5:50:25 AM12/8/10
to openi...@googlegroups.com
Comment by ro...@grab.co.za:

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

openi...@googlecode.com

unread,
Jan 25, 2011, 7:33:10 AM1/25/11
to openi...@googlegroups.com
Comment by laury...@gmail.com:

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

openi...@googlecode.com

unread,
Feb 8, 2011, 2:17:11 PM2/8/11
to openi...@googlegroups.com
Comment by ezy...@mit.edu:

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

Peli

unread,
Feb 8, 2011, 3:57:22 PM2/8/11
to OpenIntents
> 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.

Hu? I thought we had this already?
http://code.google.com/p/openintents/downloads/list?q=sensorsimulator

Is your patch based on the most recent version in the trunk?
http://code.google.com/p/openintents/source/browse/#svn%2Ftrunk%2Fsensorsimulator%2FSensorSimulator

Peli

openi...@googlecode.com

unread,
Feb 13, 2011, 6:50:27 PM2/13/11
to openi...@googlegroups.com
Comment by irvinho...@gmail.com:

Where can i find this "Enable Sensors" button that i'm supposed to press? I
can't seem to find it...

openi...@googlecode.com

unread,
Feb 16, 2011, 7:30:58 AM2/16/11
to openi...@googlegroups.com
Comment by vincze.f...@gmail.com:

Nice application!

Is there any way to add a third tab into the simulatorsettings with a
different activity?

openi...@googlecode.com

unread,
Feb 20, 2011, 5:21:10 PM2/20/11
to openi...@googlegroups.com
Comment by deani...@gmail.com:

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.

openi...@googlecode.com

unread,
Feb 25, 2011, 1:48:48 PM2/25/11
to openi...@googlegroups.com
Comment by Conn.ORo...@googlemail.com:

Brilliantly useful.
Thanks!

openi...@googlecode.com

unread,
Feb 26, 2011, 8:17:52 AM2/26/11
to openi...@googlegroups.com
Comment by dts...@gmail.com:

Someone knows a simulator does work on Android 2.2 ?

openi...@googlecode.com

unread,
Mar 7, 2011, 2:26:05 AM3/7/11
to openi...@googlegroups.com
Comment by mae...@gmail.com:

Thank you! got it working exactly how i need it to. great program

openi...@googlecode.com

unread,
Mar 7, 2011, 2:30:10 AM3/7/11
to openi...@googlegroups.com
Comment by mae...@gmail.com:

thank you! works perfectly.

openi...@googlecode.com

unread,
Mar 24, 2011, 3:00:36 PM3/24/11
to openi...@googlegroups.com
Comment by oscs...@gmail.com:

thank you very much. Very usefull tool

openi...@googlecode.com

unread,
Mar 24, 2011, 3:04:37 PM3/24/11
to openi...@googlegroups.com
Comment by oscs...@gmail.com:

thank you very much.
Very very useful tool.

openi...@googlecode.com

unread,
Apr 4, 2011, 5:57:43 AM4/4/11
to openi...@googlegroups.com
Comment by rallyel...@gmail.com:

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???

openi...@googlecode.com

unread,
Apr 8, 2011, 5:06:23 AM4/8/11
to openi...@googlegroups.com
Comment by speedy29...@googlemail.com:

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

rachee singh

unread,
Apr 8, 2011, 6:06:45 AM4/8/11
to openi...@googlegroups.com
Hi Frank,
You could file a bug report here: http://code.google.com/p/openintents/issues/list detailing your problem. We'll try to resolve it at the earliest.

openi...@googlecode.com

unread,
Apr 8, 2011, 6:11:48 AM4/8/11
to openi...@googlegroups.com
Comment by emaadman...@gmail.com:

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

openi...@googlecode.com

unread,
Apr 8, 2011, 6:17:53 AM4/8/11
to openi...@googlegroups.com

openi...@googlecode.com

unread,
Apr 20, 2011, 12:37:23 PM4/20/11
to openi...@googlegroups.com
Comment by manhy...@gmail.com:

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?

openi...@googlecode.com

unread,
Apr 20, 2011, 12:41:29 PM4/20/11
to openi...@googlegroups.com
Comment by manhy...@gmail.com:

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

openi...@googlecode.com

unread,
Apr 27, 2011, 12:56:22 PM4/27/11
to openi...@googlegroups.com
Comment by hectormoralespiloni:

How do you enable comments in your googlecode site? I'm not able to get it
work.

openi...@googlecode.com

unread,
Apr 27, 2011, 1:33:06 PM4/27/11
to openi...@googlegroups.com
Comment by peli0...@googlemail.com:

> How do you enable comments in your googlecode site?

Administer > Wiki > Visitor comments > Allow visitor comments.

openi...@googlecode.com

unread,
Jun 22, 2011, 9:42:50 PM6/22/11
to openi...@googlegroups.com
Comment by tmur...@fallenwoods.com:

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?

openi...@googlecode.com

unread,
Jun 22, 2011, 9:48:55 PM6/22/11
to openi...@googlegroups.com
Comment by tmur...@fallenwoods.com:

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.

openi...@googlecode.com

unread,
Jun 22, 2011, 10:20:35 PM6/22/11
to openi...@googlegroups.com
Comment by tmur...@fallenwoods.com:

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.

openi...@googlecode.com

unread,
Jun 23, 2011, 9:11:34 PM6/23/11
to openi...@googlegroups.com
Comment by Robt.W....@gmail.com:

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.

openi...@googlecode.com

unread,
Jun 27, 2011, 10:58:35 AM6/27/11
to openi...@googlegroups.com
Comment by Robt.W....@gmail.com:

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)

openi...@googlecode.com

unread,
Jul 13, 2011, 7:25:35 AM7/13/11
to openi...@googlegroups.com
Comment by krishnap...@gmail.com:

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.

openi...@googlecode.com

unread,
Aug 12, 2011, 5:57:32 AM8/12/11
to openi...@googlegroups.com
Comment by rajeshmb...@gmail.com:

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);

openi...@googlecode.com

unread,
Aug 16, 2011, 1:11:10 AM8/16/11
to openi...@googlegroups.com
Comment by rajeshmb...@gmail.com:

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

openi...@googlecode.com

unread,
Sep 20, 2011, 9:30:27 AM9/20/11
to openi...@googlegroups.com
Comment by ael.g...@gmail.com:

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.

openi...@googlecode.com

unread,
Sep 25, 2011, 8:45:05 PM9/25/11
to openi...@googlegroups.com
Comment by Ed.Korsb...@gmail.com:

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?

openi...@googlecode.com

unread,
Sep 25, 2011, 9:39:27 PM9/25/11
to openi...@googlegroups.com
Comment by Ed.Korsb...@gmail.com:

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?

openi...@googlecode.com

unread,
Nov 14, 2011, 10:30:09 PM11/14/11
to openi...@googlegroups.com
Comment by jongc...@gmail.com:

How/Is it possible to use the Simulator in Android NativeActivity?

openi...@googlecode.com

unread,
Dec 13, 2011, 1:19:03 AM12/13/11
to openi...@googlegroups.com
Comment by stefyabr...@gmail.com:

How can I Install bin/SensorSimulatorSettings-x.x.x.apk on my Android
emulator.I am using windows 7.

openi...@googlecode.com

unread,
Dec 26, 2011, 9:58:27 PM12/26/11
to openi...@googlegroups.com
Comment by a...@anonymous-media.com:

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.

openi...@googlecode.com

unread,
Feb 2, 2012, 1:58:35 AM2/2/12
to openi...@googlegroups.com
Comment by sriramde...@gmail.com:

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 ?

openi...@googlecode.com

unread,
Feb 16, 2012, 11:28:16 PM2/16/12
to openi...@googlegroups.com
Comment by vaishnav...@gmail.com:

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!!

openi...@googlecode.com

unread,
Oct 23, 2012, 6:14:41 AM10/23/12
to openi...@googlegroups.com
Comment by andrea.l...@gmail.com:

I have to say your work is great and, but your API are not completely
conform to Android SDK ones.
I don't know if it's due to the particular API level you targeted (I'm
using Level 16), but i get some inconsistence:

- in the type SensorEvent you have to provide field "public Long
timestamp;" instead of "public String time";
- in the type Sensor the method "public int getType()" is missing;

i hope this will help you to improve this useful project.

openi...@googlecode.com

unread,
Oct 23, 2012, 5:23:32 PM10/23/12
to openi...@googlegroups.com
Comment by andrea.l...@gmail.com:

also it's not provided the method of the SensorManager:

public boolean registerListener (SensorEventListener listener, Sensor
sensor, int rate, Handler handler),

useful for receive SensorEvent(s) in a separate thread from the main thread
of the activity

openi...@googlecode.com

unread,
Nov 2, 2012, 9:04:41 PM11/2/12
to openi...@googlegroups.com
Comment by patryk.z...@gmail.com:

Is there any way to pool sensor values in real time? Instead of recording
data and then processing I want to to do processing in real time in python
but on desktop e.g.: sensorSimulator.getOrientation() in python script. Is
there any easy way to obtain those data?

openi...@googlecode.com

unread,
Dec 16, 2012, 2:42:51 AM12/16/12
to openi...@googlegroups.com
Comment by orozco...@gmail.com:

why not provide a clear description on how to use (use guide)
why not provide a demo (src) package for user how to give a try.

You see, a lot of questions posted here, but no one can resolve....
so bad!

Randy Fortier

unread,
Feb 22, 2013, 1:48:15 PM2/22/13
to openi...@googlegroups.com, codesite...@google.com, openi...@googlecode.com

Probably too late for you, but for the Googlers:

1. Find out your Android SDK directory, e.g. C:\android-sdk

2. Download and extract the SensorSimulator package.  Remember the directory.

3. Execute the following command (fix the directories to match yours):

C:\android-sdk\platform-tools\adb install C:\Downloads\sensorsimulator-2.0-rc1\bin\sensorSimulatorSettings-2.0-rc1.apk

openi...@googlecode.com

unread,
May 23, 2013, 7:24:45 AM5/23/13
to openi...@googlegroups.com
Comment by ipods...@126.com:

Sensor Simulator for simulating sensor data in real time.

Source(s): http://downloadranking.com/support.php

openi...@googlecode.com

unread,
Jun 7, 2013, 10:59:32 AM6/7/13
to openi...@googlegroups.com
Comment by mariosmi...@gmail.com:

hello it seems that i cant connect to the sensor manager...i get a null
exception...can you help me ?

For more information:
https://code.google.com/p/openintents/wiki/SensorSimulator

openi...@googlecode.com

unread,
Aug 27, 2013, 7:11:48 AM8/27/13
to openi...@googlegroups.com
Comment by nandkish...@gmail.com:

DeviceView class how to move device using gyro sensor
i mean x and y coordinate device move

openi...@googlecode.com

unread,
Oct 7, 2013, 8:23:19 AM10/7/13
to openi...@googlegroups.com
Comment by flexsoft...@gmail.com:

Very nice dude...

I have also found one good link here....

<a
href="http://androidexample.com/Accelerometer_Basic_Example_-_Detect_Phone_Shake_Motion/index.php?

view=article_discription&aid=109&aaid=131">Accelerometer Basic Example -
Detect Phone Shake Motion</a>

openi...@googlecode.com

unread,
Oct 7, 2013, 8:25:59 AM10/7/13
to openi...@googlegroups.com

openi...@googlecode.com

unread,
Oct 16, 2013, 7:30:20 AM10/16/13
to openi...@googlegroups.com
Comment by ittay.e...@gmail.com:

I don't have internet connection in my emulator computer. The application
crash due to the lack of internet (enabled the permission). what can I do?

openi...@googlecode.com

unread,
Oct 24, 2013, 10:39:01 AM10/24/13
to openi...@googlegroups.com
Comment by paulz...@gmail.com:

Firstly, lovely tool, without it Emulator development is a non-starter.

nasty "feature" is the obtaining of a default Sensor for a sensor value
which does not exist, ie

my_sensors [sensor_index] = sensor_manager.getDefaultSensor
(INVALID_SENSOR_ID);

INVALID can be anything from a Sensor Id simply not supported by an SDK
version (ie Sensor.TYPE_AMBIENT_TEMPERATURE, or, say , -1 etc.

The call to getDefaultSensor HANGS and never returns. Would be nice to have
a return via exception or null to indicate Sensor type not supported.

This is a nasty bug and gave me so much grief.

However, I reiterate, a lovely and really useful product.

Paul.

openi...@googlecode.com

unread,
Feb 26, 2014, 1:19:34 PM2/26/14
to openi...@googlegroups.com
Comment by my4...@googlemail.com:

great project but unfourtonately after execute the following code :
SensorManagerSimulator mSensorManagerSim =
SensorManagerSimulator.getSystemService(this, SENSOR_SERVICE);
mSensorManagerSim.connectSimulator();

I get this error athough I enabled the internet permission in the
manifesto. Do you have an idea how I can fix it?


02-26 19:16:06.834: E/AndroidRuntime(2911): FATAL EXCEPTION: main
02-26 19:16:06.834: E/AndroidRuntime(2911): java.lang.RuntimeException:
Unable to start activity
ComponentInfo{com.example.myfirstapplication/com.example.myfirstapplication.MainActivity}:
android.os.NetworkOnMainThreadException
02-26 19:16:06.834: E/AndroidRuntime(2911): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2140)
02-26 19:16:06.834: E/AndroidRuntime(2911): at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2178)
02-26 19:16:06.834: E/AndroidRuntime(2911): at
android.app.ActivityThread.access$700(ActivityThread.java:141)
02-26 19:16:06.834: E/AndroidRuntime(2911): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1271)
02-26 19:16:06.834: E/AndroidRuntime(2911): at
android.os.Handler.dispatchMessage(Handler.java:99)
02-26 19:16:06.834: E/AndroidRuntime(2911): at
android.os.Looper.loop(Looper.java:137)
02-26 19:16:06.834: E/AndroidRuntime(2911): at
android.app.ActivityThread.main(ActivityThread.java:5118)
02-26 19:16:06.834: E/AndroidRuntime(2911): at
java.lang.reflect.Method.invokeNative(Native Method)
02-26 19:16:06.834: E/AndroidRuntime(2911): at
java.lang.reflect.Method.invoke(Method.java:511)
02-26 19:16:06.834: E/AndroidRuntime(2911): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:792)
02-26 19:16:06.834: E/AndroidRuntime(2911): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:555)
02-26 19:16:06.834: E/AndroidRuntime(2911): at
dalvik.system.NativeStart.main(Native Method)
02-26 19:16:06.834: E/AndroidRuntime(2911): Caused by:
android.os.NetworkOnMainThreadException
02-26 19:16:06.834: E/AndroidRuntime(2911): at
android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1131)
02-26 19:16:06.834: E/AndroidRuntime(2911): at
libcore.io.BlockGuardOs.connect(BlockGuardOs.java:84)
02-26 19:16:06.834: E/AndroidRuntime(2911): at
libcore.io.IoBridge.connectErrno(IoBridge.java:127)
02-26 19:16:06.834: E/AndroidRuntime(2911): at
libcore.io.IoBridge.connect(IoBridge.java:112)
02-26 19:16:06.834: E/AndroidRuntime(2911): at
java.net.PlainSocketImpl.connect(PlainSocketImpl.java:192)
02-26 19:16:06.834: E/AndroidRuntime(2911): at
java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
02-26 19:16:06.834: E/AndroidRuntime(2911): at
java.net.Socket.startupSocket(Socket.java:565)
02-26 19:16:06.834: E/AndroidRuntime(2911): at
java.net.Socket.tryAllAddresses(Socket.java:127)
02-26 19:16:06.834: E/AndroidRuntime(2911): at
java.net.Socket.<init>(Socket.java:177)
02-26 19:16:06.834: E/AndroidRuntime(2911): at
java.net.Socket.<init>(Socket.java:149)
02-26 19:16:06.834: E/AndroidRuntime(2911): at
org.openintents.sensorsimulator.hardware.SensorSimulatorClient.connect(SensorSimulatorClient.java:116)
02-26 19:16:06.834: E/AndroidRuntime(2911): at
org.openintents.sensorsimulator.hardware.SensorManagerSimulator.connectSimulator(SensorManagerSimulator.java:220)
02-26 19:16:06.834: E/AndroidRuntime(2911): at
com.example.myfirstapplication.MainActivity.onCreate(MainActivity.java:38)
02-26 19:16:06.834: E/AndroidRuntime(2911): at
android.app.Activity.performCreate(Activity.java:5058)
02-26 19:16:06.834: E/AndroidRuntime(2911): at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
02-26 19:16:06.834: E/AndroidRuntime(2911): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2104)
02-26 19:16:06.834: E/AndroidRuntime(2911): ... 11 more

openi...@googlecode.com

unread,
Aug 9, 2014, 2:05:40 PM8/9/14
to openi...@googlegroups.com
Comment by gkarthig...@gmail.com:

shall i use the sensor simulator to analyse the gyrosensor output?

openi...@googlecode.com

unread,
Aug 24, 2014, 2:55:33 AM8/24/14
to openi...@googlegroups.com
Comment by santosh...@gmail.com:

I noticed a lot of folks having issue with the exception at
mSensorManagerSim.connectSimulator();

The main issue is about calling that one in the main thread.

Follow this and it will work well
http://www.lucazanini.eu/2012/android/the-differences-between-the-code-for-the-emulator-and-the-code-for-a-real-device/?lang=en

openi...@googlecode.com

unread,
Aug 24, 2014, 5:48:47 PM8/24/14
to openi...@googlegroups.com
Comment by francis6...@gmail.com:

What speak french fucking blook

openi...@googlecode.com

unread,
Aug 24, 2014, 5:50:46 PM8/24/14
to openi...@googlegroups.com
Comment by francis6...@gmail.com:

Choucalamacpusimimi

openi...@googlecode.com

unread,
Feb 9, 2015, 3:25:30 PM2/9/15
to openi...@googlegroups.com
Comment by mteof...@gmail.com:

How to fake gyroscope data into device?

openi...@googlecode.com

unread,
Mar 29, 2015, 3:37:07 AM3/29/15
to openi...@googlegroups.com
Comment by nikhilra...@gmail.com:

Hello!

The work is amazing! Can I know if these recorded values can directly be
inserted into a database? Just trying to figure out the display on browser.

Thanks in advance.

openi...@googlecode.com

unread,
Jul 28, 2015, 1:44:14 AM7/28/15
to openi...@googlegroups.com
Comment by Stei...@yahoo.com.ph:

Hi santosh...@gmail.com,
>> I noticed a lot of folks having issue with the exception at
>> mSensorManagerSim.connectSimulator();
>> The main issue is about calling that one in the main thread.
Yeah your link solved that problem.
When I debug it the timing of error is inside the connectSimulator, in the
line of code below:
this.mSocket = new Socket(ipaddress, Integer.parseInt(socket));

The logcat says somewhat like:
AndroidRuntime﹕ Shutting down VM
--------- beginning of crash
AndroidRuntime﹕ FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to start
activity ...android.os.NetworkOnMainThreadException
:
Caused by: android.os.NetworkOnMainThreadException
Reply all
Reply to author
Forward
0 new messages