google / flutter.plugins

BSD 3-Clause "New" or "Revised" License
117 stars 55 forks source link

Phone call #80

Open csacchetti opened 4 years ago

csacchetti commented 4 years ago

I added the function that when you receive a phone call the app’s audio pauses, and when the call ends, it resume. When the app is not in the background there are no problems in both iOS and Android. When the app is in the background when the call comes, is there some problem. With Android this also works when the app is in the background (before the phone call arrives), but with iOS I can't automatically restart it. Even using didChangeAppLifecycleState with iOS when it is paused it is not possible to restart the audio (to my knowledge). In Android, however, when it is in the background (always before the phone call arrives) it restarts, but I can't pause it so that when the phone call ends it restarts from the exact point where it stopped. I thought that through “audio_system", you can control the audio in the background. I ask you if there is the possibility to control the audio even in the background so that it can restart it with iOS or pause it with Android. I hope I was clear.

csacchetti commented 4 years ago

The problem for iOS is that I can't find a way to make it react when it's in paused mode. setState does not work and so do other commands. It's like hibernated.

stanislavdavid commented 3 years ago

How did you implement phone call functions? May you help me, I am not able to find any help about that:-)