Hello,
==============================Update=================
Android versions we have two popups coming up when media picker camera is selected Any explanation on why we get two popups?
Firstly, let see CapturePhotoAsync's source code. It invoke the CaptureAsync method, You will see await Permissions.EnsureGrantedAsync<Permissions.Camera>();
and await Permissions.EnsureGrantedAsync<Permissions.StorageWrite>();
in the CaptureAsync method. It requests two permissions.
You will get two popups about permission, one is camera and other is storage permssion.
Permissions.Photos isn't supported or isn't required for android platform. So you will always get the Granted.
Please see Available permissions
The following table uses ✔️ to indicate that the permission is supported and ❌ to indicate the permission isn't supported or isn't required:
Then, we can open the source code about media picker's PickPhotoAsync, it will invoke the PickAsync . And use var intent = new Intent(Intent.ActionGetContent);
to picker images. This way is not your application to access the external storage. The Android system will then launch the best application to select that kind of data for you. So you need not need request permissions.
Please see Intent#ACTION_GET_CONTENT from naive android document.
Best Regards,
Leon Lu
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.