Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

Xam.Plugin.Media not allowing permissions for android

$
0
0

Hi, i've been building an app for the past 8 months and never had any camera problems. I've been able to take images with the camera without any problems. I then wanted to test an apk so id archived the app and created the adhoc etc. the app installed without a problem. but the taking an image with the camera did not work

so i went back to debugging mode and went to test the app and again the camera did not work. As i had not updated the xam.plugin.media by james montemango for a while i decieded to upgrade the nuget and added the extra info as james says to use

public override void OnRequestPermissionsResult(int requestCode, string[] permissions, Permission[] grantResults)
{
PermissionsImplementation.Current.OnRequestPermissionsResult(requestCode, permissions, grantResults);
}

and also set the complile and target version to api 23 marshmellow

i keep getting this error which clicking the button to open the camera

Java.Lang.SecurityException: Permission Denial: starting Intent { act=android.media.action.IMAGE_CAPTURE flg=0x3 cmp=com.google.android.GoogleCamera/com.android.camera.activity.CaptureActivity clip={text/uri-list U:file:///storage/emulated/0/Android/data/carraradirectoryapp.carraradirectoryapp/files/Pictures/Sample/test.jpg} (has extras) } from ProcessRecord{7f6dc9e 32591:carraradirectoryapp.carraradirectoryapp/u0a181} (pid=32591, uid=10181) with revoked permission android.permission.CAMERA

if i uninstall the app when i click the button for the camera i do get asked for permission to use the camera. once i choose allow this error appears.

upon debugging the app again i dont get asked about permissions but only get the same error.

i have included the CAMERA permission in the manifest

any ideas?

thanks


Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>