R rodmcm Active Member Licensed User Longtime User Jan 11, 2019 #1 I am trying out the screenshot posted by agraham on a Levono 10" tablet https://www.b4x.com/android/forum/threads/how-to-make-screenshots.10199/ and get the error java.io.FileNotFoundException: /storage/emulated/0/Test.png: open failed: EACCES (Permission denied) I am seeing the same error when trying out other screenshot offerings as well.. Can someone please advise. The permissions list includes WRITE_EXTERNAL_STORAGE which I understood is automatically set by a call to File.DirRootExternal I also notice that all of the screen shot programs save to external storage. Is it possible to save to internal storage and then transfer to 'Gallery"
I am trying out the screenshot posted by agraham on a Levono 10" tablet https://www.b4x.com/android/forum/threads/how-to-make-screenshots.10199/ and get the error java.io.FileNotFoundException: /storage/emulated/0/Test.png: open failed: EACCES (Permission denied) I am seeing the same error when trying out other screenshot offerings as well.. Can someone please advise. The permissions list includes WRITE_EXTERNAL_STORAGE which I understood is automatically set by a call to File.DirRootExternal I also notice that all of the screen shot programs save to external storage. Is it possible to save to internal storage and then transfer to 'Gallery"
DonManfred Expert Licensed User Longtime User Jan 11, 2019 #2 rodmcm said: java.io.FileNotFoundException: /storage/emulated/0/Test.png: open failed: EACCES (Permission denied) Click to expand... android.jar / targetSdkVersion / minSdkVersion Especially RuntimePermissions Away from that the example you are using is an old example. Don´t know if it works with the newest SDK used at all. Upvote 0
rodmcm said: java.io.FileNotFoundException: /storage/emulated/0/Test.png: open failed: EACCES (Permission denied) Click to expand... android.jar / targetSdkVersion / minSdkVersion Especially RuntimePermissions Away from that the example you are using is an old example. Don´t know if it works with the newest SDK used at all.
R rodmcm Active Member Licensed User Longtime User Jan 11, 2019 #3 Sorry DonManfred.. Can u elucidate a little further I have the following in the manifest AddManifestText( <uses-sdk android:minSdkVersion="5" android:targetSdkVersion="26"/> Upvote 0
Sorry DonManfred.. Can u elucidate a little further I have the following in the manifest AddManifestText( <uses-sdk android:minSdkVersion="5" android:targetSdkVersion="26"/>
Erel B4X founder Staff member Licensed User Longtime User Jan 11, 2019 #4 Watch the video tutorial: Runtime Permissions (Android 6.0+ Permissions) In most cases the "correct" solution is to avoid using File.DirRootExternal. Upvote 0
Watch the video tutorial: Runtime Permissions (Android 6.0+ Permissions) In most cases the "correct" solution is to avoid using File.DirRootExternal.
R rodmcm Active Member Licensed User Longtime User Jan 15, 2019 #5 Thanks for that.. I had assumed the compiler would automatically add the permissions when there was a call to File.DirRotExternal Upvote 0
Thanks for that.. I had assumed the compiler would automatically add the permissions when there was a call to File.DirRotExternal
Erel B4X founder Staff member Licensed User Longtime User Jan 16, 2019 #6 rodmcm said: I had assumed the compiler would automatically add the permissions when there was a call to File.DirRotExternal Click to expand... Your assumption is correct. It does add the permission to the manifest. However you still need to request it at runtime (it wouldn't have worked if the permission wasn't listed in the manifest). Upvote 0
rodmcm said: I had assumed the compiler would automatically add the permissions when there was a call to File.DirRotExternal Click to expand... Your assumption is correct. It does add the permission to the manifest. However you still need to request it at runtime (it wouldn't have worked if the permission wasn't listed in the manifest).