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

Android : Making Listview full screen -

javascript - Parse JSON from the body of the POST -

javascript - How to Hide Date Menu from Datepicker in yii2 -