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);}