-2

Hi friends I'm developing android application here I want to set image, accept button, cancel button when user getting call.

I can't able to find any tutorial related. Suggest me any tutorial. Thanks in advance

Aristo Michael
  • 2,166
  • 3
  • 35
  • 43

2 Answers2

3

when you need to do something when you get a call, you have to detect when you get a call There are some constants in TelephonyManager. by using this constant we can detect when a call is ringing, see the code TelephonyManager.CALL_STATE_RINGING.

 if(state==TelephonyManager.CALL_STATE_RINGING){  

      // do what ever u want here.
   } 

Here is the complete Tutorial

this is not a complete answer hope this may get you started.

Irfan
  • 956
  • 9
  • 16
1

Please look into the following answer. How to know whether I am in a call on Android?

You have to call your customized view in TelephonyManager.CALL_STATE_RINGING that case and perform a action as per your requirement.

Hope it will helps you.

Community
  • 1
  • 1
Born To Win
  • 3,319
  • 3
  • 19
  • 27