I am making my own LockScreen using Intent.ACTION_SCREEN_OFF and Intent.ACTION_SCREEN_ON. I want to stop my app when i have a phone call but i can’t find the way to do this. the last choice is prevent the screen off during the call. How can i do this? please help!
I am making my own LockScreen using Intent.ACTION_SCREEN_OFF and Intent.ACTION_SCREEN_ON. I want to stop
Share
Not sure of the details of your implementation, but you need to take a look at the
TelephonyManager, if you only need to check the state at a certain point in time, you can use thegetCallStatemethod. Otherwise, you can use thelistenmethod to register aPhoneStateListenerto track state changes and have your app respond as desired.