My app used to get the phone number in Starter's Service_Create using PhoneId library. After updating android:targetSdkVersion="28" from 19 in the Manifest file, my app needs to check runtime permission, which only works in an activity.
I want to ensure the following sequence:
1. Service_Create
2. Activity_Create
3. Service_Start
I want the device's phone number, if any, be ready before Service_Start is called. The following code is located in Activity_Create:
Any suggestion would be greatly appreciated!
TIA
I want to ensure the following sequence:
1. Service_Create
2. Activity_Create
3. Service_Start
I want the device's phone number, if any, be ready before Service_Start is called. The following code is located in Activity_Create:
getting device phone number:
rp.CheckAndRequest(rp.PERMISSION_READ_PHONE_STATE)
Wait For Activity_PermissionResult (Permission As String, Result As Boolean)
If Result Then
'we have permission!
Dim pi As PhoneId
Starter.strCell =pi.GetLine1Number
Log("cell phone number=" & Starter.strCell)
End If
Any suggestion would be greatly appreciated!
TIA
Attachments
Last edited: