MMSoft 0 Posted Tuesday at 06:19 PM I'm using Delphi 12.1 and have the option to give my App the option to "Access all files". To do this, I check "Manage external storage" under Uses Permissions. I will display the System Setup screen in which this permission data can be data.: uses Androidapi.JNI.GraphicsContentViewText, Androidapi.JNI.Net; var LIntent: JIntent, LUri: Jnet_Uri; Begin LUri := TJnet_Uri.JavaClass.fromParts(StringToJString('package'), TAndroidHelper.Context.getPackageName, nil); LIntent := TJIntent.JavaClass.init(TJSettings.JavaClass.ACTION_MANAGE_APP_ALL_FILES_ACCESS_PERMISSION, LUri); LIntent.addFlags(TJIntent.JavaClass.FLAG_ACTIVITY_NEW_TASK); TAndroidHelper.Context.startActivity(LIntent); end; But how can I ask whether this Permission has been given ? (sorry for my bad english) Share this post Link to post
Dave Nottage 554 Posted Tuesday at 06:31 PM 7 minutes ago, MMSoft said: But how can I ask whether this Permission has been given ? With this: uses Androidapi.JNI.Os; LHasAccess := TJEnvironment.JavaClass.isExternalStorageManager; Note that this applies from Android 11 onwards only, so you should use TOSVersion.Check(11) to determine whether or not to manage that permission Share this post Link to post
MMSoft 0 Posted Tuesday at 06:58 PM Thanks, it works ! (I had been looking for it for days). Share this post Link to post