I have a Galaxy Tab 1000.
I am trying to write a code, that will identify ANY movement.
I have version 2.2 on the phone.
This is the oncreate code.
This is the sensor onsensorchanged implementation (very simple I think) but not working
The event.sensor.getType() returns 1
If I do: getSensorList(Sensor.TYPE_ALL);
I get sensors
compass, compass, BMA150 (accel), temp, magnet, proximity, light and Gyro (weird - I thought it's only up in 3.0
please advise, how can I get motion detection on the phone.
thanks
------
I am trying to write a code, that will identify ANY movement.
I have version 2.2 on the phone.
This is the oncreate code.
Code:
OnCreate()
mySensorManager = (SensorManager) getSystemService(Context.SENSOR_SERVICE);
mySensorManager.registerListener(mySensorEventListener, mySensorManager
.getDefaultSensor(Sensor.TYPE_ACCELEROMETER),
SensorManager.SENSOR_DELAY_NORMAL); //
This is the sensor onsensorchanged implementation (very simple I think) but not working
Code:
if (event.sensor.getType() == SensorManager.SENSOR_ACCELEROMETER)
// Do WORKL
The event.sensor.getType() returns 1
If I do: getSensorList(Sensor.TYPE_ALL);
I get sensors
compass, compass, BMA150 (accel), temp, magnet, proximity, light and Gyro (weird - I thought it's only up in 3.0
please advise, how can I get motion detection on the phone.
thanks
------