Hello,
I'm new to Android and I'm trying out the accelerometer API and
OpenIntent's SensorSimulator. I was able to successfully install
OpenIntents, and test the sensor GL with the simulator.
As tried to test the simulator with the sample Android's API OS/
Sensors, I get the following error.
Thread [<3> main] (Suspended (exception VerifyError))
Instrumentation.newActivity(ClassLoader, String, Intent) line: 1096
ActivityThread.performLaunchActivity(ActivityThread$ActivityRecord)
line: 2060
ActivityThread.handleLaunchActivity(ActivityThread$ActivityRecord)
line: 2156
ActivityThread.access$1800(ActivityThread, ActivityThread
$ActivityRecord) line: 112
ActivityThread$H.handleMessage(Message) line: 1580
ActivityThread$H(Handler).dispatchMessage(Message) line: 88
Looper.loop() line: 123
ActivityThread.main(String[]) line: 3742
Method.invokeNative(Object, Object[], Class, Class[], Class, int,
boolean) line: not available [native method]
Method.invoke(Object, Object...) line: 515
ZygoteInit$MethodAndArgsCaller.run() line: 739
ZygoteInit.main(String[]) line: 497
NativeStart.main(String[]) line: not available [native method]
This is the code in Sensors.onCreate() method,
protected void onCreate(Bundle savedInstanceState) {
// Be sure to call the super class.
super.onCreate(savedInstanceState);
// mSensorManager = (SensorManager)
getSystemService(SENSOR_SERVICE);
mGraphView = new GraphView(this);
Hardware.mContentResolver = getContentResolver();
mSensorManager = (SensorManager) new
SensorManagerSimulator((SensorManager)getSystemService(SENSOR_SERVICE));
Intent intent = new Intent(Intent.ACTION_VIEW,
Hardware.Preferences.CONTENT_URI);
startActivity(intent);
mSensorManager.unregisterListener(mGraphView);
SensorManagerSimulator.connectSimulator();
mSensorManager.registerListener(mGraphView,
SensorManager.SENSOR_ACCELEROMETER |
SensorManager.SENSOR_MAGNETIC_FIELD |
SensorManager.SENSOR_ORIENTATION,
SensorManager.SENSOR_DELAY_FASTEST);
setContentView(mGraphView);
}
Can someone please help find out what I need to do to fix this.
Thanks
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---