Android Question Get Incoming phone number in Android 8.0

ginsh

Member
Licensed User
Hi,

I have an address book app which has a feature were in the incoming call it checks with in the address book database and notifies user with the person name calling if it exists in the address book database. Below code I use to get the incoming phone number.

B4X:
Sub PE_PhoneStateChanged (State As String, IncomingNumber As String, Intent As Intent)
Select State

Case "OFFHOOK"

Case "RINGING"

toastphn(IncomingNumber,State)

End Select

End Sub
But with android 8.0 phone the same doesn't work any more.

Please any one let me know the best way to get the incoming phone number using run time permissions.

Also if I use the runtime permissions will it still work on the phones with older versions of android.

Thanks in advance.
 
Top