Search code examples
androidandroid-intentbroadcastreceivergoogle-voice

How do you intercept/reroute phone call but have destination number appear correct?


Trying to replicate what Google Voice on Android does. Specifically you dial a number in the dialer, in this case 123-456-7890. Google Voice intercepts the call in a BroadcastReceiver, and reroutes it to a "shadow number (in this case 1-916-538-1453). However it manages to keep "1234567890" as the destination number and displays custom text in the blue box that comes down and then disappears. Does anyone know how you would do this?

enter image description here


Solution

  • After doing more research on this topic and asking people that have worked on this in the past, I have determined that this is basically impossible. As Chris mentioned in the comment, it comes down to having your app be signed with the Google key in order for it to work. The best workaround is to display a toast (possibly custom toast) showing the custom text and the original number and then rewrite the call log to display the correct number.