Is it possible to interrupt a phone call on Android?

Is it possible for an Android application to interrupt a phone call or launch Foreground? I would be interested in whether the device was rooted.

I understand that this is an unusual request, although it is intended for a specialty project.

+4
source share
2 answers

Amazing yes. There is an endCall method in com.android.internal.telephony.ITelephony (you need to either compile the necessary classes in your compilation path, or use reflection to get to it).

+4
source

Your service (running in the background) can send an Intent, which will be processed by the system, and bring to the fore the application (which fulfills this intention). I'm not sure if it will end in a challenge or not.

+2
source

Source: https://habr.com/ru/post/1434028/


All Articles