This is a migrated thread and some comments may be shown as answers.

Use Chromium on Android before 4.4 instead of native webview

1 Answer 243 Views
General Discussion
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Carlos
Top achievements
Rank 1
Carlos asked on 21 Nov 2014, 06:48 PM
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. 

1 Answer, 1 is accepted

Sort by
0
Martin Yankov
Telerik team
answered on 26 Nov 2014, 09:28 AM
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.

Regards,
Martin Yankov
Telerik
 

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

 
Tags
General Discussion
Asked by
Carlos
Top achievements
Rank 1
Answers by
Martin Yankov
Telerik team
Share this question
or