It's been a long time since I've used this, but iirc, you do have to make some modifications to your existing code to get this to work (in addition to what you've already done), so your mSensorManager must be an instance of SensorManagerSimulator, instead of SensorManager, for instance. This is a great tool for testing Sensor events so it is worth the slight effort to set it up.
On Saturday, September 24, 2011 11:58:16 PM UTC-4, KK wrote: > > Hi All, > Can someone help me on how to use the SensorSimulator @ > http://code.google.com/p/openintents/wiki/SensorSimulator > I went through the instructions at the above wiki page, regarding > adding/using the SensorEventListeners and other Sensor related classes from > this package, but when I tried this : > > - Replace the following code in onCreate(): > > mSensorManager = (SensorManager) getSystemService(SENSOR_SERVICE); > > - by this code > > mSensorManager = SensorManagerSimulator.getSystemService(this, > SENSOR_SERVICE); > > > > I'm getting error messages saying: > Type mismatch: cannot convert from SensorManagerSimulator to > SensorManager > > Also for the registerListener() and unreigsterListener(), I'm getting this > error: > The method unregisterListener(SensorListener) in the type > SensorManager is not applicable for the arguments (ShakeActivity) // My > Activity is named ShakeActivity > > Can someone help me how to fix these errors and use the SensorSimulator to > simulates movements/shakes etc. > > Thanks in advance. > > --KK > > > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

