No! As I said above.
For Each permission As String In Array(rp.PERMISSION_READ_EXTERNAL_STORAGE,rp.PERMISSION_CAMERA,rp.PERMISSION_WRITE_EXTERNAL_STORAGE)
rp.CheckAndRequest(permission)
Wait For Activity_PermissionResult (permission As String, Result As Boolean)
If Result = False Then
ToastMessageShow("No permission!", True)
Activity.Finish
Return
End If
Next
'Manifest'
AddPermission("android.permission.READ_EXTERNAL_STORAGE")
AddPermission("android.permission.WRITE_EXTERNAL_STORAGE")
'
SetApplicationAttribute(android:requestLegacyExternalStorage, true)
on Android 11??this is the code I use, and for now it seems to work for me
B4X:For Each permission As String In Array(rp.PERMISSION_READ_EXTERNAL_STORAGE,rp.PERMISSION_CAMERA,rp.PERMISSION_WRITE_EXTERNAL_STORAGE) rp.CheckAndRequest(permission) Wait For Activity_PermissionResult (permission As String, Result As Boolean) If Result = False Then ToastMessageShow("No permission!", True) Activity.Finish Return End If Next
I add this to the manifest
B4X:'Manifest' AddPermission("android.permission.READ_EXTERNAL_STORAGE") AddPermission("android.permission.WRITE_EXTERNAL_STORAGE") ' SetApplicationAttribute(android:requestLegacyExternalStorage, true)
Cryptic? - How? I'm being as precise as I can beSorry your being very cryptic! LOL
That's a temporary workaround that will only work on SDK 29 targets. You should have read it hereSetApplicationAttribute(android:requestLegacyExternalStorage, true)
this is my manifest, in fact if you don't put sdk 30 you can't publish on playstoreCryptic? - How? I'm being as precise as I can be
That's a temporary workaround that will only work on SDK 29 targets. You should have read it here
android.jar / targetSdkVersion / minSdkVersion
There are several versioned components that affect the compilation process and the runtime behavior of our apps. The purpose of this tutorial is to explain the differences between them and help you choose which version to use. Each Android version is mapped to an api level. You can see this...www.b4x.com
There is no need to manually add the "AddPermission" lines to the manifest. B4A should add them and you automatically get read permission if you ask for write permission.
Cryptic? - How? I'm being as precise as I can be
this is my manifest, in fact if you don't put sdk 30 you can't publish on playstore
I Public On Playstore
OrderStock Ordine Inventario - Apps on Google Play
Finally you can manage your shop without spending a penny, Barcode Readingplay.google.com
View attachment 126464
Nope> As I have said before ad nauseam. You won't be able to without using the Storage Access Framework hack.still cannot see the Android/data folder contents...
Nope> As I have said before ad nauseam. You won't be able to without using the Storage Access Framework hack.
Slight bug in crude demo above. It doesn't appear to persist the permission because I commented out a line while testing. In Main.btnPickFolder_Click un-comment the commented call
Storage.SelectDir(chkUsePreviouslySelected.Checked)
and delete the following line passing False.
Very promising, Im going to do the unthinkable, and update my Nvidia Shield to Android 11! As my tablet is currently with samsung, and my phone is locked to Android 10, And Windows subsystem for Android is being silly! But as soon as I can confirm it works I will pay as promised.It works on all three Android 11 and 12 devices I tried so far.
Starting the demo for the first time the screen will be an empty black File Picker with a white ImageView at the lower right. Pressing "Pick folder" should show an Android system screen with the contents of the data folder and a "Use this folder" button at the bottom. Press it and allow access in the dialog and it will return to the blank screen and after a delay (Storage Access Framework is a bit slow) show you all the folders in /data. You can now navigate those folders and if you select a jpg file it will display in the ImageView. Study the source code to see how it accesses files.
If you press "Pick folder" again with the CheckBox checked regardless of what is displaying it will return to the /data folder. Unchecking the Checkbox will ask again for access as it will not then use the persisted permission.
No need. Have it on me.But as soon as I can confirm it works I will pay as promised.
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?