Android Programming Press on the image to return to the main documentation page.

RuntimePermissions

List of types:

RuntimePermissions

RuntimePermissions


Events:

None

Members:


  Check (Permission As String) As Boolean

  CheckAndRequest (Permission As String)

  GetAllSafeDirsExternal (SubFolder As String) As String()

  GetSafeDirDefaultExternal (SubFolder As String) As String

  PERMISSION_ACCESS_CHECKIN_PROPERTIES As String

  PERMISSION_ACCESS_COARSE_LOCATION As String

  PERMISSION_ACCESS_FINE_LOCATION As String

  PERMISSION_ADD_VOICEMAIL As String

  PERMISSION_BODY_SENSORS As String

  PERMISSION_CALL_PHONE As String

  PERMISSION_CAMERA As String

  PERMISSION_GET_ACCOUNTS As String

  PERMISSION_PROCESS_OUTGOING_CALLS As String

  PERMISSION_READ_CALENDAR As String

  PERMISSION_READ_CALL_LOG As String

  PERMISSION_READ_CONTACTS As String

  PERMISSION_READ_EXTERNAL_STORAGE As String

  PERMISSION_READ_PHONE_STATE As String

  PERMISSION_READ_SMS As String

  PERMISSION_RECEIVE_MMS As String

  PERMISSION_RECEIVE_SMS As String

  PERMISSION_RECEIVE_WAP_PUSH As String

  PERMISSION_RECORD_AUDIO As String

  PERMISSION_SEND_SMS As String

  PERMISSION_USE_SIP As String

  PERMISSION_WRITE_CALENDAR As String

  PERMISSION_WRITE_CALL_LOG As String

  PERMISSION_WRITE_CONTACTS As String

  PERMISSION_WRITE_EXTERNAL_STORAGE As String

Members description:

Check (Permission As String) As Boolean
Checks whether the application has been granted the specified permission.
This method can be called from a Service.
CheckAndRequest (Permission As String)
Checks whether the application has been granted the specified permission. If not then the user will be shown a dialog asking for permission.
The Activity_PermissionResult will be raised with the result (in all cases).
This method can only be called from an Activity.
GetAllSafeDirsExternal (SubFolder As String) As String()
Returns an array with all the external folders available to your app.
The first element will be the same as the value returned from GetSafeDirDefaultExternal.
On Android 4.4+ no permission is required to access these folders.
On older versions only one folder will be returned. You should add the permission as explained in GetSafeDirDefaultExternal documentation.
SubFolder - A sub folder that will be created for your app. Pass an empty string if not needed.
GetSafeDirDefaultExternal (SubFolder As String) As String
Returns the path to the app's default folder on the secondary storage device.
The path to File.DirInternal will be returned if there is no secondary storage available.
It is a better alternative to File.DirDefaultExternal. On Android 4.4+ no permission is required to access this folder.
You should add this code to the manifest editor to add the permission on older versions of Android:
AddManifestText(<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="18" />
)

SubFolder - A sub folder that will be created for your app. Pass an empty string if not needed.
PERMISSION_ACCESS_CHECKIN_PROPERTIES As String
PERMISSION_ACCESS_COARSE_LOCATION As String
PERMISSION_ACCESS_FINE_LOCATION As String
PERMISSION_ADD_VOICEMAIL As String
PERMISSION_BODY_SENSORS As String
PERMISSION_CALL_PHONE As String
PERMISSION_CAMERA As String
PERMISSION_GET_ACCOUNTS As String
PERMISSION_PROCESS_OUTGOING_CALLS As String
PERMISSION_READ_CALENDAR As String
PERMISSION_READ_CALL_LOG As String
PERMISSION_READ_CONTACTS As String
PERMISSION_READ_EXTERNAL_STORAGE As String
PERMISSION_READ_PHONE_STATE As String
PERMISSION_READ_SMS As String
PERMISSION_RECEIVE_MMS As String
PERMISSION_RECEIVE_SMS As String
PERMISSION_RECEIVE_WAP_PUSH As String
PERMISSION_RECORD_AUDIO As String
PERMISSION_SEND_SMS As String
PERMISSION_USE_SIP As String
PERMISSION_WRITE_CALENDAR As String
PERMISSION_WRITE_CALL_LOG As String
PERMISSION_WRITE_CONTACTS As String
PERMISSION_WRITE_EXTERNAL_STORAGE As String

Top