Open mobile camera in webview

ZoobZoob AEMember ✭✭

I'm building an application where i load website in a webview.

On website i open device camera ( take pics etc ) and its working perfectly fine on all browsers but when i load same application in xamarin.forms web view, mobile camera doesn't show up. Any idea what could be the reason ?

Regards
TA

Answers

  • ZoobZoob AEMember ✭✭

    Little help would be great.

  • ZoobZoob AEMember ✭✭

    I think its not possible in Xamarin.

  • LyndonHugheyLyndonHughey USUniversity ✭✭✭

    Are there other ways you can trigger the device camera? If the webview is being called from another view, can you have a trigger within the webview that notifies a property in the parent view to trigger the camera?

  • ZoobZoob AEMember ✭✭

    @LyndonHughey thank you for the reply. At least there is out someone who took my question seriously since I'm stuck on this point for weeks and my management is killing me with hell of emails :(

    I don't think so we can call xamarin code from webview since application that i load in webview is hosted in some other server. Please let me know if you have something in your mind, I can try.

    Regards
    TA

  • LyndonHugheyLyndonHughey USUniversity ✭✭✭

    @Zoob I've not worked with the WebView very often but it seems there are a couple solutions on this thread:
    https://forums.xamarin.com/discussion/72681/what-is-the-easiest-way-to-call-c-method-from-javascript-in-webview

    I personally like the idea of mapping an action to a URI call in your webview. See the last post for details. I hope this helps you out.

  • JS_GJS_G USMember

    @Zoob have you fixed your issue. I'm trying to achieve the same. Please advise?

Sign In or Register to comment.