Use Chromium on Android before 4.4 instead of native webview

2 posts, 0 answers
  1. Carlos
    Carlos avatar
    69 posts
    Member since:
    Jun 2011

    Posted 21 Nov 2014 Link to this post

    Is there a plugin or a way to force the AppBuilder app to use the Chromium or Chrome webview.
    OR is there  a way in AppBuilder to view the cameras input into a video or canvas element.
    Meaning, can you access the devices' camera and show it within the AppBuilder app within the HTML, without switching to the native app?

    What I am trying to do is display the camera's input through the AppBuilder's HTML page or through a video element. Then I want to put simple images on top of it. My first step is to get the camera's view to render in the HTML. 

  2. Martin Yankov
    Martin Yankov avatar
    177 posts

    Posted 26 Nov 2014 Link to this post

    Hello Carlos,

    Currently, Cordova does not provide the WebView that the apps are rendered in. Cordova depends on Android to provide this WebView. This means that the WebViews will be different on the different Android versions. I believe Android 4.4's WebView is actually a Chromium WebView, so if your app runs only on Android 4.4+, it can take advantage from the Chromium WebView.

    That being said, there is no way to do what you want out of the box. Normally, you would use the UserMedia API, but as you can see from the web page under Browser Compatibility -> Mobile, the mobile WebViews do not support it yet. The only other way would be to create a custom Cordova plugin yourself. As far as I know, such a plugin does not exist right now and I am not even sure if it is doable. You should take the images from the camera hardware preview and pass them to the JavaScript. Once there, there is no problem to visualize them in a canvas element. However, doing this in real time would provide difficult and probably impossible.

    I hope this information was helpful. Let me know if you have any other questions.

    Martin Yankov

    Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.

Back to Top