How to hang up (disconnect, cancel, ..) make a call?

"How to hang incoming calls (in Android, of course)?"

Firstly, I know that this question has been asked and answered several times, and the answer is always "you cannot." But if we look at the market, we will get several applications (all private programs, without access to the source code ... :-() that perform this action, for example CallFilter , Panda and others ...

So ... does anyone know how these applications freeze (either stop, or disconnect, or what do you call it?)?

And another question, if the first does not get an answer .. does anyone know how to send an incoming call to voicemail?

Of course, all questions relate to how to do this programmatically . Therefore, with the question of voicemail, I know that this flag is used in contacts, but, as I said, I would like to know the programmatic path.

Thanks everyone!

Change 1:

I saw a LogCat trace using the CallFilter application, and one trace seems interesting when it receives an incoming call, PHONE_STATE is CALL_STATE_RINGING and one trace quickly appears:

"05-03 19:32:34.416: INFO/UsageStats(78): Something wrong here, didn't expect com.android.phone to be paused"

and when CallFilter did everything that makes the new trace "05-03 19: 32: 34.486:

INFO/UsageStats(78): Unexpected resume of com.android.phone while already resumed in com.android.phone"

so I think CallFilter is doing something in one com.android.phone object, but I don’t know how to access this .. any idea ??

Edit 2:

I performed at a different time, and I no longer see the traces of the magazine above, so maybe it could be that it means nothing. I'm not sure. CallFilter application just shows one second of an incoming call and then hang up .. how do they do it !!! ???

+4
source share
2 answers

I do not know how to hang incoming calls, not sure if this is possible. You can, I suppose, enter the program mode of the aircraft, but this is a cruel method and is not really recommended. Changing this setting should only be done by the user whenever he wants.

0
source

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


All Articles