tags:

views:

580

answers:

1
Intent intent = new Intent(Intent.ACTION_VIEW, 
Hardware.Preferences.CONTENT_URI); 
startActivity(intent);

when i give the above code to enable sensors....they are showing errors....@ Hardware.Preferences.CONTENT_URI);...saying create a class Hardware...plz help...i'm a beginner in android...

+2  A: 

You can't enable the sensors in the simulator. Straight answer. You can use the sensor simulator tool.

http://code.google.com/p/openintents/wiki/SensorSimulator

Basically, you install the sensor simulator app on the REAL android simulator. Then you add code to your application to connect to the simulator. Read the installation steps at the bottom of the page for more info.

Sam
thank u sam...but while i'm installing OpenIntent.apk..its not getting loaded into emulator..error message is shown in command prompt pkg: /data/local/tmp/OpenIntents.apk Failure INSTALL_FAILED_MANIFEST_MALFORMEDD:\android-sdk-windows-1.5_r3\toolplz help....thanks in advance
reni