0

Android P incoming call number can't be fetched without CALL_LOG permission and google is not allowing CALL_LOG permission. How can I fetch the incoming number on Android P?

@Override
public void onReceive(final Context context, final Intent intent) {
    this.context = context;
    realm = Realm.getDefaultInstance();
    TelephonyManager telephony = (TelephonyManager)context.getSystemService(Context.TELEPHONY_SERVICE);
    telephony.listen(new PhoneStateListener(){
        @Override
        public void onCallStateChanged(int state, String incomingNumber) {
            super.onCallStateChanged(state, incomingNumber);}
ankuranurag2
  • 2,300
  • 15
  • 30
yasir khan
  • 419
  • 4
  • 6
  • What do you mean by *google is not allowing CALL_LOG permission*? – Rohit5k2 Feb 15 '19 at 12:16
  • For SMS/CALL_LOG Permission you need to request google to allow this permission for your app and they are not allowing in my case. For more info: https://support.google.com/googleplay/android-developer/answer/9047303 – yasir khan Feb 15 '19 at 12:19
  • There is no way to do this anymore. Either you need google approval or get your app signed by the telecom operator. – vavasthi Feb 15 '19 at 12:40
  • https://support.google.com/googleplay/android-developer/answer/9214102 say Google might approve if you state your case well. – Rohit5k2 Feb 15 '19 at 12:41

0 Answers0