Dear all,
I have tried the sharing component for an project but got an error when I try to share, as
Error 908: The permission WRITE_EXTERNAL_STORAGE has been denied
To get rid of this issue, I am trying to give the permission from the user at the app start with below blocks.
But I think it will be really disgusting for the user when he need to give permission every time he log in to the app.
So my question is, is there a permanent solution to avoid this permission issue?
I have searched the community too, but didn’t find a solution yet.
Thanks in advance.
1 Like
Alapjeet
(Alapjeet Singh)
May 30, 2020, 12:57pm
#2
Ya just use tiny db that when permission granted save it in tiny db…
So you don’t have to ask permission again & again.
@Kolitha_Dissanayake
1 Like
Thanks Alap,
So will it work if the user close the application & log in later?
1 Like
Thanks Watermelon,
Yeah I have tried that and found permission has not granted, then I tried with above blocks to give the permission manually.
1 Like
Wait… You should use `if not Is permission granted(YOUR PERMISSION) then Ask For Permission
1 Like
you may also read this, FYI asking multiple permission has been a problem.
I found the solution / cause to (many) permission issues. It is caused by the Package Utilities component. Whenever this component is used, the screen must be reloaded to grant permission. And this is the case regardless of whether any method of this component is used or not.
Therefore, I strongly recommend not using this component at all until this bug has been fixed. See this example regarding Challenge 46:
This is now my solution (to grant 3 or more permission at Screen.Initialize):
per…
3 Likes
Mateja
(Mateja)
May 30, 2020, 3:01pm
#8
If the user granted the permission it will not ask him again.
6 Likes
Alapjeet
(Alapjeet Singh)
May 30, 2020, 5:16pm
#9
Yup it will work with that also.
1 Like
Thank you, yes it seems it’s only one time asking for permission, even though I thought it will ask permission every time when someone log in
wow, this is great. thank you
Kolitha_Dissanayake:
this is great.
So did you find your solution in the post?
Can u show your block that made it work?
1 Like
Hi Watermelon,
I have kept the blocks still as the previous one as it seems the permission should be given only once as said by Alapjeet
Kolitha_Dissanayake:
Note : WRITE_EXTERNAL_STORAGE
is sufficient because it implicitly grants READ permission.
It is always good idea that a component or extension automatically requests the required permissions.
But if this is the case, the .PermissionGranted event is not triggered. To guarantee this (for whatever reason), you have to ask for this permission manually (expressly), in your case: android.permission.WRITE_EXTERNAL_STORAGE.
This is sufficient because it implicitly grants READ permission.
https://developer.android.com/reference/android/Manifest.permission
[grafik]
See also here:
3 Likes
Thank you Anke,
That explains what I couldn’t explain
I have learnt a lot from you. Always appreciating your kind intervention!!!
1 Like
system
(system)
Closed
July 1, 2020, 8:47am
#18
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.