Hi Adam,
Thanks for the quick help. You are right, once I changed the mSensorManager
to be an instance of SensorManagerSimulator, it worked like a charm.
Thank you.

--KK

On Sun, Sep 25, 2011 at 7:16 PM, Adam Ratana <adam.rat...@gmail.com> wrote:

> 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<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.getSyst**emService(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 android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to