Understood your concerns completely.
However, are you sure it has to be so foolproof ?
According to Android reference (
http://developer.android.com/reference/android/hardware/SensorManager.html
):
"Always make sure to disable sensors you don't need, especially when
your activity is paused. Faili
Hi,
As you asked, let me explain my use case:
Start the device ---> Launch the sensor app(don't close it) --->let the
device go in suspend mode(early and complete suspend both; note that the
app has not been closed)
"The application should disable sensors event listener, Sensor Manager
will call
Sorry, it is not clear what what does your driver do in the first case
(error).
BTW: why do you need the early suspend at all? Android is not a pure
Linux so you better start from the application level.
The application should disable sensors event listener, Sensor Manager
will call your data_close