Android Question WebChromeClient & HTML5 camera

Discussion in 'Android Questions' started by carloz, Jul 28, 2015.

  1. carloz

    carloz Member Licensed User

    Hello again !!

    i am using the html5 camera input in a html page, requirement was to enable user to take picture and upload. Loaded it in a xcode uiwebview and it works perfectly. Taking this approach so i do not have to resubmit the apps to the stores again.

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "">
        <!-- Change this 
    if you want to allow scaling -->
        <meta name=
    "viewport" content="width=default-width; user-scalable=no" />
        <meta http-equiv=
    "Content-type" content="text/html; charset=utf-8">
      <img style=
    "width:60px;height:60px" id="test_img" src="" />
    for testing, add the buttons below -->
    form action="endpoint.php" method="post" enctype="multipart/form-data">

    type="file" name="qqfile" accept="image/*" capture>

    type="submit" value="Upload">


    Did the same in b4a webview.. added webviewxtras.. added webchromeclient to webview..
    webview loads the page , allows to select image from gallery and all other locations, but refuses to show/launch camera.
    Needless to say it works perfectly well on my device browser too.

    Added camera permissions to manifest too.

    What am i missing here?

  2. Erel

    Erel Administrator Staff Member Licensed User

    Why aren't you using the Camera library?
  3. carloz

    carloz Member Licensed User


    If i use the camera library on b4a then ill have to do something similar for the xcode IOS version of the app.. correct? I do not want to resubmit the app for this change, thats why am trying this.

  4. Erel

    Erel Administrator Staff Member Licensed User

    How is the B4A implementation related to your iOS app?
  5. carloz

    carloz Member Licensed User

    both android and ios apps only have a webview .. the rest of the entire content is loaded from php & jquery mobile. thus i need to keep common functionality across..
  6. jazzzzzzz

    jazzzzzzz Active Member Licensed User

    Why cant you use cordova like environment to do these type of hybrid projects? (If you are using fullscreen webview for your app)
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice