Sub userpnlimg_Click 'set new image to the user and save
Wait For(checkifDirecteryexistsandcreate) Complete (Result As Boolean)
If Result = False Then Return
Try
cr.Show("image/*", "Choose image")
Catch
Log(LastException)
End Try
End Sub
Sub checkifDirecteryexistsandcreate As ResumableSub
Starter.rp.CheckAndRequest(Starter.rp.PERMISSION_WRITE_EXTERNAL_STORAGE)
wait for Activity_PermissionResult(Permission As String, Result As Boolean)
If Result = False Then
MsgboxAsync("יש צורך בלאשר את ההרשאה כדי להמשיך","הודעה")
Wait For MsgBox_Result (Result2 As Int)
Return False
End If
Return True
End Sub