Android Question PhoneEvents PhoneStateChanged IncomingNumber is empty

NeoTechni

Well-Known Member
Licensed User
B4X:
Sub PE_PhoneStateChanged (State As String, IncomingNumber As String, Intent As Intent)
    If State = "RINGING" Then
        Log("PhoneStateChanged, State = " & State & ", IncomingNumber = " & IncomingNumber)
    End If
End Sub

I have the permissions and service set up, so PE_PhoneStateChanged does get called. But the IncomingNumber is missing

Log result:
PhoneStateChanged, State = RINGING, IncomingNumber =

How do I get the number?
 

NeoTechni

Well-Known Member
Licensed User
I also needed this. I'd delete the thread but I no longer know how.

B4X:
rp.CheckAndRequest("android.permission.READ_CALL_LOG")
    wait for Activity_PermissionResult(permission As String, result As Boolean)
    Log("READ_CALL_LOG: " & result)
 
Upvote 0
Top