public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
{
private static int PERMISSION_REQUEST_CODE = 200;
protected override void OnCreate(Bundle savedInstanceState)
{
…
ActivityCompat.RequestPermissions(this, new String[] { Manifest.Permission.WriteExternalStorage, Manifest.Permission.ReadExternalStorage }, PERMISSION_REQUEST_CODE);
}
public override void OnRequestPermissionsResult(int requestCode, string[] permissions, [GeneratedEnum] Android.Content.PM.Permission[] grantResults)
{
Xamarin.Essentials.Platform.OnRequestPermissionsResult(requestCode, permissions, grantResults);
base.OnRequestPermissionsResult(requestCode, permissions, grantResults);
}
}
|
<manifest ...>
<application android:requestLegacyExternalStorage="true" ...>
...
</application>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> </manifest> |
Enabling "requestLegacyExternalStorage" is a stop-gap solution for SDK 29. If you target SDK 30 (Android 11), that flag doesn't work anymore. Is there going to be an update to the control that allows it to run on SDK 30? If so, when?
Thanks.
Hi Ramya Soundar Rajan
I also have problem like GrowthLadder. I have updated to the latest version but the problem is still not resolved.It happens only on android 11 even though I allow for android.settings.MANAGE_APP_ALL_FILES_ACCESS_PERMISSION permission.
Please Help. Thanks
Hi Eswaran Thirugnanasambandam
My problem is after i edit then save the exception message. I used the Image editor or pdf editor. After crop when I am going to save the image or editor I am getting the error :