Sensors in android emulator?

I wanna create an app by using acceleration sensor.But I don't know how can I test it in emulator?

Answers


I don't think the Android emulators support the acceleration sensor nicely by default.

However, you can download SensorSimulator from Google, which lets you give the Android emulator simulated sensor data with the mouse. Just follow the instructions on the website and you should be good to go.

Update (4/5/2016):

As Maks kindly pointed out, OpenIntents SensorSimulator has moved here: http://github.com/openintents/sensorsimulator

Additionally, some hardware emulation is now supported: http://tools.android.com/tips/hardware-emulation


Need Your Help

Where Not Exists With One to Many Relationship

sql sql-server tsql sql-server-2008-r2

I am having a hard time figuring out how to ask this question, so I'll just go straight to the example code. Let's say I have these tables:

Not getting the right values when copying structs

c pointers struct binary

A buffer that holds binary chunks of data is supposed to be copied to an array of structs (each struct represents a chunk), each chunk in the buffer is 20 bytes, first 4 bytes hold the hash value, ...