Android - Release resources when starting a call

75 Views Asked by At

in my app I use audio record and mic to record anything, but i need to release it for incoming and outcoming call.
For incoming I have use a BroadcastReceiver class, but for outcoming ?
I can't release in onPause or others method of my app because the audio record is inside a service (background).
I need to recognize when the user starts a call.

1

There are 1 best solutions below

3
On

release it in onDestroy() of your Service