16

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?

Jatin
  • 31,116
  • 15
  • 98
  • 163
Prasanna
  • 235
  • 1
  • 7
  • My expierence using the camera with cordova has proven difficult. I fear this won't be possible without native development. However, if you find a solution, you should answer it here yourself. – Joseph Dailey Aug 11 '14 at 18:30

3 Answers3

0

Is it an option to use the built-in feature?

http://docs.phonegap.com/en/1.9.0/cordova_media_capture_capture.md.html

Arve
  • 8,058
  • 2
  • 22
  • 25
0

Try to read this blog,hope will be helpful

http://www.raymondcamden.com/2013/5/20/Capturing-camerapicture-data-without-PhoneGap

Dimon
  • 790
  • 1
  • 10
  • 24
0

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.

Community
  • 1
  • 1
Anuj Yadav
  • 980
  • 11
  • 20