Use PhoneStateListener
. It has an onCallStateChanged
handler; one of the supplied arguments you’ll get is a String
containing the incoming phone number.
More Related Contents:
- How to hang up outgoing call in Android?
- Programmatically obtain the phone number of the Android phone
- How can I check whether the Sim Card is available in an android device?
- Add PhoneStateListener
- How to monitor SIM state change
- How to get current SIM card number in Android?
- getAllCellInfo returns null in android 4.2.1
- end incoming call programmatically
- Why ITelephony.aidl works?
- How to figure out which SIM received SMS in Dual SIM Android Device
- How can I showing checkbox when I choose the spinner data?
- Android Studio – Firebase Fatal error
- how to insert a data into database using android studio and phpmyadmin(wampserver)?
- getColor(int id) deprecated on Android 6.0 Marshmallow (API 23)
- What Android tools and methods work best to find memory/resource leaks? [closed]
- Override Power button just like Home button
- How exactly to use Notification.Builder
- getting context in AsyncTask
- Android Place Picker closes immediately after launch
- Sign APK without putting keystore info in build.gradle
- What method should I use now since FirebaseInstanceId.getInstance().getToken() is deprecated [duplicate]
- How to convert android.media.Image to bitmap object?
- Android: how to draw a border to a LinearLayout
- How to fix “Fail to connect to camera service” exception in Android emulator
- Android test code coverage with JaCoCo Gradle plugin
- Android: MediaPlayer setVolume function
- Content padding parameter it is not used
- Disable Manifest Merger in Android Gradle Build
- Android get value of the selected radio button
- How to have activity in Android with a close button at the top corner?