I am writing an Android application which is required to record audio continuously in the background. However, the application should not prevent other applications from recording audio (such as voice recorders or VoIP apps). In other words I want my application to have the lowest priority with respect to others and yield the audio source (microphone) when another application/process requests it.
I found it impossible to do this using the audio recording APIs in the Android SDK so I turned to the native audio API provided by OpenSL ES. The documentation states that OpenSL objects may be assigned priorities and set as preemptable. I was wondering if that would be what I’m looking for. That is, if I set my AudioRecorder object as preemptable and start recording with it, will it yield the microphone resource once another application requests it?