Android Incoming Call Pickup, Call Forwarding

I would like to know how to intercept incoming calls, as well as how to forward them. I know that there are several questions on this topic here and elsewhere on the network, but all the answers use the android.intent.action.PHONE_STATE action, which is broadcast always after the phone starts ringing and the call screen is displayed.
That is why I am looking for a solution where I could intercept the call at an early stage before any notification (call, etc.) was made. I would like to know if this is possible at the platform level in native code, and if so, how? Or maybe with some kind of trick with the SDK?

+4
source share
3 answers

In general, if you cannot do this in Java, you cannot do this in the NDK. In most cases, the opposite is true: you cannot do BIG things on Android in the NDK.

I don’t know how to do this, and, frankly, I doubt its existence: it would be a huge security hole if you could download an application that redirects calls to another number.

+1
source

You can look at this source code, it can help you: http://code.google.com/p/auto-answer/

0
source

None of the existing Android apps can forward a call based on a specific number. All they can do is forward all or nothing. There is one application ( cBlocker ) that can forward calls on a schedule, in addition to blocking incoming and outgoing calls and SMS based on rules.

0
source