简体   繁体   中英

Audio/Video Capture in PhoneGap/Cordova using external Java plugin

I am developing an android application using PhoneGap/cordova and Javascript. I want to include audio/video capturing functionality in a particular html Div of my application using external Java plugin.

Or some mechanism where I can have a native Java based widget which will come in the same screen at a particular location (rather than replacing the current view completely and occupying the entire screen)

I have searched across the web but could not find an efficient way to do it. Can anyone suggest me any way to handle this?

Might not be exactly what you want: Instead of DIV use overlay android fragment.

CordovaWebView is part of an Android activity. That means we can overlay a fragment or say dialog at a location we want. Similar to native android development.

Challenge: If you want to show DIV/Dialog in between HTML you will have to take care of lot of positioning related issue.

Solution: You can target to have your DIV/Dialog positioned at the start or end and can then re-position your HTML placeholders.

Things you would require: Cordova Plugin creation, Dialog/Fragment understanding, JavaScript to reposition the DOM elements (if required), Then all is native.

Here is a SO link which can help you.

Please let us know if it helps and it would be great if you share your end solution.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM