How To Block Incoming Call When Switch Widget Is On?
I have an app in which I have placed a switch toggle button. The purpose of my app is that whenever the switch button is set to ON, all incoming calls should be blocked. I am able
Solution 1:
The boolean state of the switch widget can be accessed with the help of Shared Preferences. See the answer here:
How to get switch value in Android?
After getting the boolean state, we just have to check whether its true or not and if it is, then block call.
Post a Comment for "How To Block Incoming Call When Switch Widget Is On?"