First let me state I'm new to android development and I apologize if this is either the wrong forum or too naive a question. I'm in an feasibility phase for an android app.
Is there any way for an application once running to camp on either the photo button or some other sensor (e.g. shaking) and thereby come back to the screen. It would be OK for it to prevent the phone from locking but it would need to shut off the screen to save power. It would also need to wake up periodically and take audio samples. In revisiting the documentation I've looked at already it seems so. But it is not clear that the app can get the screen focus without the OS intervening.
I know an app can continue recording when the screen locks. But if there is a phone call will it loose its ability to get at the microphone? I guess this generalizes to something about access to resources. Maybe you need to be informed that some other app took the resource and that it has been let go, or can you keep getting data from a resource even when and other app has it?
The idea is that with user approval I want keep my app able to pop back to the front based on some event like a button press or a shake. The apps droid record and shake awake do some of this.
Is there any way for an application once running to camp on either the photo button or some other sensor (e.g. shaking) and thereby come back to the screen. It would be OK for it to prevent the phone from locking but it would need to shut off the screen to save power. It would also need to wake up periodically and take audio samples. In revisiting the documentation I've looked at already it seems so. But it is not clear that the app can get the screen focus without the OS intervening.
I know an app can continue recording when the screen locks. But if there is a phone call will it loose its ability to get at the microphone? I guess this generalizes to something about access to resources. Maybe you need to be informed that some other app took the resource and that it has been let go, or can you keep getting data from a resource even when and other app has it?
The idea is that with user approval I want keep my app able to pop back to the front based on some event like a button press or a shake. The apps droid record and shake awake do some of this.