I have an application that is launched from a broadcast receiver, but I don’t want to launch the application if the user is currently in the middle of a phone call. How would I check from my broadcast receiver class if there is currently a phone call going on?
Share
You should create a service with a PhoneStateListener. Make sure it gets unregistered once you get what you need from it and make sure not to launch the listener directly from your broadcast receiver. There are some more details concerning this concept in this question.