If phone.SdkVersion >= 24 Then
Dim rp As RuntimePermissions
rp.CheckAndRequest(rp.PERMISSION_WRITE_EXTERNAL_STORAGE)
Wait For Activity_PermissionResult (Permission As String, rpResult As Boolean)
If Not(rpResult) Then
'no permission
Msgbox("Unable to access device storage.", "Warning")
Return False
End If
End If