views:

277

answers:

1

Hi,

is it possible to do some visible actions during telephone call?

It could be something like:

  • play custom animation
  • inject some custom layout with controls

Thanks

+1  A: 

So you want to do something when Intent.ACTION_ANSWER is dispatched?

One idea - override the native Phone application (use appropriate Intent Filter, take a look here to see how Android resolves best matching Intent Filters), display your layout (including Answer/Reject buttons) and then use something like

Intent intent = getIntent(); 
startNextMatchingActivity(intent);

to start the Phone application.

I can see some problems with that solution - UI inconsistency and problems with programmaticaly answering the call (non-trivial, but not impossible), but it should be easy to try.

What are you trying to do?

If you want to mess with the layout when answering a call, your application has to be pretty close/duplicating the Phone app. It seems that's not the case, otherwise you wouldn't have asked the question.

Dimitar Dimitrov
Thanks. Does that also mean that I can even possibly create my own Phone application and somehow bind it to launch during INCOMING CALL event?
Lyubomyr Dutko
Yes, you can write your own Phone application, you can extend the default one, you can pretty much change everything - the built-in apps don't have higher priority than third party apps.
Dimitar Dimitrov
Could you please share some links where you take all this interesting information :) ?
Lyubomyr Dutko