Maher Tannous 3 Posted November 9, 2023 I have a problem with phones running on Android 13 ( 64-bit ) I am using Delphi 11.3 and Android sdk with api 34 and MobilePermissions Component MobilePermissions The problem is that the storage permission does not work in Android 13 (64-bit), while it works on Android 11 and 12 (64-bit). Any help please Share this post Link to post
Maher Tannous 3 Posted November 13, 2023 I solved my problem with this code {$IF DEFINED(ANDROID)} var imagee, videoo, audioo, state, read, write, camera: string; {$ENDIF} begin {$IFDEF ANDROID} state := JStringToString(TJManifest_permission.JavaClass.Read_phone_state); camera := JStringToString(TJManifest_permission.JavaClass.camera); read := JStringToString (TJManifest_permission.JavaClass.READ_EXTERNAL_STORAGE); write := JStringToString (TJManifest_permission.JavaClass.WRITE_EXTERNAL_STORAGE); if JStringToString(TJBuild_VERSION.JavaClass.RELEASE) = '13' then Begin imagee := JStringToString (TJManifest_permission.JavaClass.READ_MEDIA_IMAGES); videoo := JStringToString(TJManifest_permission.JavaClass.READ_MEDIA_VIDEO); audioo := JStringToString(TJManifest_permission.JavaClass.READ_MEDIA_AUDIO); PermissionsService.requestPermissions([state, camera, imagee, videoo, audioo, read, write], nil, nil); End else PermissionsService.requestPermissions([state, camera, read, write], nil, nil); {$ENDIF} Share this post Link to post