Camera permission doesn't work RRS feed

  • Question

  • User385718 posted

    I have a webview wich displays my website. On my website I have a button that has should open a dialog that shows the user to choose between opening the camera of pick a file(Same goes for recording a video).

    But when I click on the button nothing happens. I have the permissions in my info.plist but when I run the emulator it does not even ask for my permissions to use camera and library etc.

    How can solve this?

    Wednesday, November 27, 2019 10:16 PM

All replies

  • User369979 posted

    Have you tested it on a real physical device? Camera features are not available on emulators so the application will crash before the permission dialog showing up.

    Thursday, November 28, 2019 4:11 AM
  • User385718 posted


    Thank you for you reaction. I have tested the app on a real device. I can take a picture with camera. But when I click on a button to record a video the app crashes. Also the user has to be able to choose between taking a picture/ recording video and picking a file.

    Do you have any idea to solve this?

    I am looking forward to your response

    Friday, November 29, 2019 12:34 PM
  • User369979 posted

    If you are using the native UIImagePickerController and want only to take videos we could set the MediaTypes like:

    imgPicker.MediaTypes = new string[] { UTType.Movie };

    But when I click on a button to record a video the app crashes This could be caused by the code after taking the videos. It's best to share your sample to help us reproduce this issue.

    Monday, December 2, 2019 8:44 AM
  • User385718 posted


    We are able to take video now because we were lacking a permission. Apparently is was called microphone permission in the info.plist

    When we press our file upload button we want to see a dialog that lets you choose between taking picture or selecting picture from the gallery:

    asp:FileUpload ID="FileUploadPlayerVideo" runat="server" renderid="true" accept="image/*" capture="camera" type="file"/

    At the moment we have not inplemented UIImagePickerController in the iOS application. Because we dont understand how to implement this object.

    Here is our appdelegate:

    We would like to know how to solve this problem.

    Monday, December 2, 2019 12:45 PM