Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Suppress Android incoming call Activity from appearing

How are things now

This has been discussed in many questions but neither one offers a good solution. Things look simple, after having a BroadcastReceiver is really easy to intercept and block a call. The main issue that appears is the default Android incoming call screen. You know, the one with sliders for answer/end call. Because i have some rules to block the call, there is a small delay before the call gets hangup. In all this time, the Incoming call screen is active.

How I want things to be

I want the user to not get notified by this call blocking, as in my application I have a clear Log of all blocks done. So, the main thing remains: how do I prevent the Incoming call screen from starting?

like image 928
Alin Avatar asked Jul 13 '11 11:07

Alin


People also ask

How do I stop my calls from popping up on my screen?

Stopping Incoming Calls from Hijacking Your Screen Simply open the Phone app to start off, then hit the three-dot button in the upper-right corner and select "Settings" from the menu. From there, tap on "Call display while using apps," and choose "Pop-up" on the following page.


1 Answers

It is not possible to completely block the calls but you can achieve this by listening the call and then disconnecting it. It's behaviour may be different in different devices. It may show negligible flicker over some device but that's the only solution.

Here is the approach how you can do that:

Android: Taking complete control of phone(kiosk mode), is it possible? How?

You can use BroadcastReceiver but for alomost blocking experience you need to use Service.

like image 200
Vineet Shukla Avatar answered Nov 01 '22 13:11

Vineet Shukla