umit_turk
(ümit türk)
March 1, 2024, 1:15am
#1
“Error 908; The Permission WRITE_EXTERNAL_STORAGE”
I want to take a screenshot in the app and share it.I get the following error on android 11 and above.
I applied it as in the link below. it asks for permission but I get the same error after getting permission.
Here is a small extension that declares the following permissions on Android 13+ in the Manifest: READ_MEDIA_IMAGES READ_MEDIA_VIDEO READ_MEDIA_AUDIO and up to Android 12: READ_EXTERNAL_STORAGE Since targetSdkVersion = 33, these new...
Reading time: 2 mins 🕑
Likes: 5 ❤
<uses-permission android:name="com.google.android.gms.permission.AD_ID"/>
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission android:name="android.permission.ACCESS_ADSERVICES_TOPICS"/>
<uses-permission android:name="com.android.vending.BILLING"/>
<uses-permission android:name="android.permission.INSTALL_PACKAGES"/>
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<uses-permission android:name="android.permission.ACCESS_ADSERVICES_AD_ID"/>
<uses-permission android:name="android.permission.ACCESS_ADSERVICES_ATTRIBUTION"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
These are the codes found in the menifette.I also searched other topics.I tried a lot of experiments but I couldn’t do it. I would appreciate your help.
Taifun
March 1, 2024, 3:06am
#2
as we can see, the permission WRITE_EXTERNAL_STORAGE is missing in the manifest…
As workaround try to drag a file component into the working area, which hopefully adds the permission into the manifest
Also use the AskForPermission method and ask for that permission in the Screen.Initialize event
Let us know, if this helps…
Taifun
umit_turk
(ümit türk)
March 1, 2024, 2:58pm
#3
<uses-permission android:name="android.permission.READ_MEDIA_AUDIO"/>
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO"/>
<uses-permission android:name="com.google.android.gms.permission.AD_ID"/>
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES"/>
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission android:name="android.permission.ACCESS_ADSERVICES_TOPICS"/>
<uses-permission android:name="com.android.vending.BILLING"/>
<uses-permission android:name="android.permission.INSTALL_PACKAGES"/>
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<uses-permission android:name="android.permission.ACCESS_ADSERVICES_AD_ID"/>
<uses-permission android:name="android.permission.ACCESS_ADSERVICES_ATTRIBUTION"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
this is how it is added but the problem persists after the permission is accepted.
Taifun
March 1, 2024, 4:36pm
#4
I do not see you asking for WRITE_EXTERNAL_STORAGE permission in your blocks?
Taifun
Taifun
March 1, 2024, 4:40pm
#6
There is some difference between READ and WRITE, isn’t it?
Taifun
This is another bug with Kodular. From Android 11 onwards, it is automatically saved in the ASD (at least that is the case with Companion). Apparently WRITE
permission is incorrectly requested for this. Firstly, the ASD does not require storage permissions and secondly, there is no longer WRITE
permission on Android > 10.
There is no workaround for this. You have to use an extension instead of the Screenshot
component.
Taifun
March 1, 2024, 7:13pm
#9
umit_turk:
Where am I going wrong?
You have the permission in the manifest and you are asking for it, so theoretically it should work now…
Btw. you forgot to tell us, what happens now…
Taifun
umit_turk
(ümit türk)
March 1, 2024, 7:16pm
#10
If it’s the screenshot, I’ll look at the extension and repeat what I did.
umit_turk
(ümit türk)
March 1, 2024, 7:47pm
#11
when I use this extension I don’t need to call for permission.
Thank you both very much. I’ve disturbed you.
system
(system)
Closed
March 31, 2024, 7:47pm
#12
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.