You need to create an application for Android, which for incoming and outgoing calls, and during a conversation, will show a button. When you click on the button should show the phone number.
The button should appear on the right during calls and conversations. Just appear. How to make it appear only during a call and not all the time? And how to get the number of the subscriber with whom you are connected? Explain how to implement it?

The button itself, which displays information when pressed, is already there. It is only necessary that she appear at the right time, and you need to get the number of the person calling (so far you can only get your number)

telephonyManager.getLine1Number(); свой номер intent.getStringExtra(TelephonyManager.EXTRA_INCOMING_NUMBER); вообще ничего, не null а пустота intent.getExtras().getString("android.intent.extra.PHONE_NUMBER"); вылетает 
  • one
    You have a very broad question here. What exactly causes difficulties - how to show the button in general, how to show it during a call or conversation, how to get the number of the subscriber with whom you are connected? - Nick Volynkin
  • Thank you for the second day, you do not open the message, the trailer can be, and to the post in your messages, too, everything is not going smoothly. Can anyone give a bribe? - Paul
  • Stupidly do this, I also intellectuals, newcomers need help. The answer was very necessary. - Pavel

0