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

java - Solr query version issue: Invalid version or the data in not in 'javabin' format -

Hard vs. Soft Water: What's The Difference?

The Ten Most Livable Cities In The World