Closed codermonk1 closed 1 year ago
do you want to access storage and files/photos?
Yes, I want access files like pdf
On Fri, Apr 14, 2023, 7:18 PM Maulana Yusuf @.***> wrote:
do you want to access storage and files/photos?
— Reply to this email directly, view it on GitHub https://github.com/Baseflow/flutter-permission-handler/issues/1026#issuecomment-1508534786, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARTWHZGVT7OGRLGNPCF2773XBFIT5ANCNFSM6AAAAAAW3MR5OM . You are receiving this because you authored the thread.Message ID: @.***>
Yes, I want access files like pdf … On Fri, Apr 14, 2023, 7:18 PM Maulana Yusuf @.> wrote: do you want to access storage and files/photos? — Reply to this email directly, view it on GitHub <#1026 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARTWHZGVT7OGRLGNPCF2773XBFIT5ANCNFSM6AAAAAAW3MR5OM . You are receiving this because you authored the thread.Message ID: @.>
umm have you tried this type of permissions -> Permission.manageExternalStorage
?
and add this to android manifest
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />
but make sure these permissions have been added before
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
Yes, I did. but not working in android 13
On Fri, Apr 14, 2023 at 7:28 PM Maulana Yusuf @.***> wrote:
Yes, I want access files like pdf … <#m3861515447099737418> On Fri, Apr 14, 2023, 7:18 PM Maulana Yusuf @.> wrote: do you want to access storage and files/photos? — Reply to this email directly, view it on GitHub <#1026 (comment) https://github.com/Baseflow/flutter-permission-handler/issues/1026#issuecomment-1508534786>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARTWHZGVT7OGRLGNPCF2773XBFIT5ANCNFSM6AAAAAAW3MR5OM https://github.com/notifications/unsubscribe-auth/ARTWHZGVT7OGRLGNPCF2773XBFIT5ANCNFSM6AAAAAAW3MR5OM . You are receiving this because you authored the thread.Message ID: @.>
umm have you tried this type of permissions -> Permission.manageExternalStorage ?
and add this to android manifest <uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />
but make sure these permissions have been added before
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
— Reply to this email directly, view it on GitHub https://github.com/Baseflow/flutter-permission-handler/issues/1026#issuecomment-1508566732, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARTWHZFBYOY3YL4KWIVFO7DXBFJYRANCNFSM6AAAAAAW3MR5OM . You are receiving this because you authored the thread.Message ID: @.***>
me too
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />
I added the above permissions and solved it with Permission.manageExternalStorage.request()
and Permission.manageExternalStorage.isGranted
.
same issue , any update?
Yes, I did. but not working in android 13 On Fri, Apr 14, 2023 at 7:28 PM Maulana Yusuf @.> wrote: … Yes, I want access files like pdf … <#m3861515447099737418> On Fri, Apr 14, 2023, 7:18 PM Maulana Yusuf @.> wrote: do you want to access storage and files/photos? — Reply to this email directly, view it on GitHub <#1026 (comment) <#1026 (comment)>>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARTWHZGVT7OGRLGNPCF2773XBFIT5ANCNFSM6AAAAAAW3MR5OM https://github.com/notifications/unsubscribe-auth/ARTWHZGVT7OGRLGNPCF2773XBFIT5ANCNFSM6AAAAAAW3MR5OM . You are receiving this because you authored the thread.Message ID: @.> umm have you tried this type of permissions -> Permission.manageExternalStorage ? and add this to android manifest
but make sure these permissions have been added before — Reply to this email directly, view it on GitHub <#1026 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARTWHZFBYOY3YL4KWIVFO7DXBFJYRANCNFSM6AAAAAAW3MR5OM . You are receiving this because you authored the thread.Message ID: @.>
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />
This permission required to fill a form in android and I got rejected for only needing to upload an image.
I am using Permission.storage.request(), on Android 13 return PermissionStatus.permanentlyDenied. Please help me. Thank you.
permission_handler:
^10.2.0
I got it android 13
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO" />
<uses-permission android:name="android.permission.READ_MEDIA_AUDIO" />
// todo
I got it android 13
// todo
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" android:maxSdkVersion="29" />// todo
It's still will be "permanentlyDenied" at Permission.storage.request()
TLDR: if you try to check or request the WRITE_EXTERNAL_STORAGE on Android 13+, it will always return false. So you'll have to skip the permission check/request completely on Android 13+
TLDR: if you try to check or request the WRITE_EXTERNAL_STORAGE on Android 13+, it will always return false. So you'll have to skip the permission check/request completely on Android 13+
I was trying to get a picture from the user using the image_picker package, but the storage permission request was returning false without prompting the user on the screen, even though I made the necessary edits in the manifest file. I asked this to GPT and it told me that in android 10 and above, storage permissions are removed and I need to remove these permissions from the manifest file. So we don't need to ask for any permission to get image from user's gallery?
TLDR: if you try to check or request the WRITE_EXTERNAL_STORAGE on Android 13+, it will always return false. So you'll have to skip the permission check/request completely on Android 13+ source
I was trying to get a picture from the user using the image_picker package, but the storage permission request was returning false without prompting the user on the screen, even though I made the necessary edits in the manifest file. I asked this to GPT and it told me that in android 10 and above, storage permissions are removed and I need to remove these permissions from the manifest file. So we don't need to ask for any permission to get image from user's gallery?
Your case is not related to WRITE_EXTERNAL_STORAGE
permission if you are not gonna save a file. If it is, you do not need to ask permission to write a file above Android 13+ (starting from Android 13).
Your case is related to READ_EXTERNAL_STORAGE
, and the pickImage
method will prompt a message to access the user's gallery.
If you are targeting lower than Android 10, if it is correct targeting, you should not remove the permission from the manifest.
TLDR: if you try to check or request the WRITE_EXTERNAL_STORAGE on Android 13+, it will always return false. So you'll have to skip the permission check/request completely on Android 13+ source
I was trying to get a picture from the user using the image_picker package, but the storage permission request was returning false without prompting the user on the screen, even though I made the necessary edits in the manifest file. I asked this to GPT and it told me that in android 10 and above, storage permissions are removed and I need to remove these permissions from the manifest file. So we don't need to ask for any permission to get image from user's gallery?
Your case is not related to
WRITE_EXTERNAL_STORAGE
permission if you are not gonna save a file. If it is, you do not need to ask permission to write a file above Android 13+ (starting from Android 13).Your case is related to
READ_EXTERNAL_STORAGE
, and thepickImage
method will prompt a message to access the user's gallery.If you are targeting lower than Android 10, if it is correct targeting, you should not remove the permission from the manifest.
With image_picker, I will upload the image I take from the gallery or camera to the cloud instead of saving it to the storage. In other words, I will only select an image from the gallery regarding memory. What should I do in this situation?
Turns out or at least I assume android 13 has the storage allowed. This worked for me . Checked if API level is 33 then "assumed" it is enabled.
Future<bool> _checkPermission() async {
if (platform == TargetPlatform.android) {
var androidInfo = await DeviceInfoPlugin().androidInfo;
if (androidInfo.version.sdkInt >= 33) return true;
final status = await Permission.storage.status;
if (status != PermissionStatus.granted) {
final result = await Permission.storage.request();
if (result == PermissionStatus.granted) {
return true;
}
} else {
return true;
}
} else {
return true;
}
return false;
}
Possible related issues: #955, #1066
Thank you @codermonk1 for raising this issue!
This appears to be a duplicate of #955. I am closing this issue. For a solution to your problem, you can have a look at #955. @mvanbeusekom gave an explanation of the issue there.
💬 Questions and Help
in my app permission handler is perfectly work on android 12 and below, but in Android 13 its not working.
popup message for granting access is not shown.
i have added all user permission in andriod manifest file.