Hello! I have a program successfully running to relate AudioManager
and SensorManager. By safe life-cycle practice:
@Override
protected void onResume()
{
super.onResume();
sensorManager.registerListener(sensorListener,
SensorManager.SENSOR_ORIENTATION, SensorManager.SENSOR_DELAY_FASTEST);
}
@Override
protected void onStop()
{
sensorManager.unregisterListener(sensorListener);
super.onStop();
}
Just to keep it clean.
My question is that I'm interested in moving this program out of the
active part of the priority and keep it running in the background
until the user gets back to the program to switch it off.
I'm still very new to all the life-cycle things so I'm just studying
away. I still haven't found what I need to find yet.
Bonus (if it can be addressed): It will be really cool if I can leave
an icon at the top bar to show it is running. :)
Thanks in advance.
--
You received this message because you are subscribed to the Google
Groups "Android Beginners" 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-beginners?hl=en