Read camera permission for iOS in Xamarin -


i have ios app developed in xamarin. when app not have permission access microphone, if user tries access microphone app, check settings using avaudiosession.sharedinstance().requestrecordpermission (delegate(bool granted)) , display message.

now need same if app not have permission access camera. need check if permission granted camera , display message accordingly. how can this?

did checked answer? detect permission of camera in ios think that's solution looking :).

edit: here highest voted answer's code ported c#

// replace media type whatever want avauthorizationstatus authstatus = avcapturedevice.getauthorizationstatus(avmediatype.video); switch (authstatus) {     case avauthorizationstatus.notdetermined:         break;     case avauthorizationstatus.restricted:         break;     case avauthorizationstatus.denied:         break;     case avauthorizationstatus.authorized:         break;     default:         throw new argumentoutofrangeexception(); } 

Comments

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -