Closed ninehichem closed 1 year ago
when using it with android 13 device can't opena file i get this error : Permission denied: android.permission.READ_EXTERNAL_STORAGE
my permissions :
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES"/> <uses-permission android:name="com.google.android.gms.permission.AD_ID"/> <uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES"/> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE"/>
this is the code:
static Future openFile(File file) async { final url = file.path;
if(await Permission.manageExternalStorage.isGranted && await Permission.storage.isGranted){ await OpenFile.open(url).then((value) => print('value == ${value.message}')); }else{ await Permission.manageExternalStorage.request(); await Permission.storage.request(); await OpenFile.open(url).then((value) => print('value == ${value.message}')); }
}
i asked for permission using permission handler and stil get the same error, it work in android 12 and below. please if its possible i really need a solution max this week for my project. thanks
Fixed in version 3.4.1
@joutvhu Thanks a lot
when using it with android 13 device can't opena file i get this error : Permission denied: android.permission.READ_EXTERNAL_STORAGE
my permissions :
this is the code:
static Future openFile(File file) async { final url = file.path;
}
i asked for permission using permission handler and stil get the same error, it work in android 12 and below. please if its possible i really need a solution max this week for my project. thanks