Starter.rp.CheckAndRequest(Starter.rp.PERMISSION_READ_PHONE_STATE) '
Wait For Activity_PermissionResult (Permission As String, Result As Boolean)
If Result = False Then
MsgboxAsync("No permission to phone ID", "")
Return
Else
Log("Granted")
Dim ph As PhoneId
Dim m_device_id As String = ph.GetDeviceId
Log(m_device_id) 'will display phone ID
End If