ok = PermissionRequest(perms)
Truewill be returned.
The permissions you want to request have to be passed in the
perms argument. This
can be set to one or more of the following permission flags:
SDCarditem in the table returned by GetSystemInfo(). By default, Android apps are not allowed to read from the external storage device.
SDCarditem in the table returned by GetSystemInfo(). By default, Android apps are not allowed to write to the external storage device. Note that
#PERMREQ_READEXTERNALso you don't have to set
#PERMREQ_READEXTERNALwhen using this flag.
To ask for multiple permissions at once, simply combine them using the bitwise Or operator.
Note that this function is only needed when compiling stand-alone APKs using the
Hollywood APK Compiler. When using the Hollywood Player, the Hollywood Player
will automatically request the
#PERMREQ_WRITEEXTERNAL permission for you so you
don't have to do that manually.
Trueif user granted permission,
Falseif he declined them
If PermissionRequest(#PERMREQ_WRITEEXTERNAL) t = GetSystemInfo() StringToFile("Hello World", FullPath(t.SDCard, "test.txt")) Else NPrint("Sorry, no permission!") EndIfThe code above tries to get a permission from the user to write to the external storage device. If the user grants this permission, the code will write a file named
test.txtto the external storage device.