Created
April 18, 2021 21:26
-
-
Save DelphiWorlds/75cdb97464142ff0c0c455c27c21d97e to your computer and use it in GitHub Desktop.
Code to show the manage external storage permissions settings (Android 11)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
uses | |
Androidapi.Helpers, Androidapi.JNI.Provider, Androidapi.JNI.GraphicsContentViewText; | |
procedure ShowManageExternalStorageSettings; | |
var | |
LIntent: JIntent; | |
begin | |
LIntent := TJIntent.Create; | |
LIntent.setAction(StringToJString('android.settings.MANAGE_ALL_FILES_ACCESS_PERMISSION'); | |
LIntent.setData(TJnet_Uri.JavaClass.parse(StringToJString('package:' + JStringtoString(TAndroidHelper.Context.getPackageName())))); | |
TAndroidHelper.Context.startActivity(LIntent); | |
end; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment