Building for Android with MediaCapture on PhoneGap Build

  • 1
  • Problem
  • Updated 9 years ago
I'm running an app on iOS that uses MediaCapture (image and audio). However, when I build this same app on PhoneGap Build for Android, the buttons to load the camera interface and audio interface do nothing. It's as if these features are not getting built in.

I have a config.xml with the following features included:

This didn't seem to fix anything. Do I need to do anything else? Need a AndroidManifest.xml or some other configuration file?

Thanks for the help, there doesn't seem to be much documentation on this process (or if I'm missing it, please send a link).

Anne
Photo of mas.colorado

mas.colorado

  • 7 Posts
  • 0 Reply Likes

Posted 9 years ago

  • 1
Photo of mas.colorado

mas.colorado

  • 7 Posts
  • 0 Reply Likes
Photo of Hardeep Shoker

Hardeep Shoker

  • 1941 Posts
  • 89 Reply Likes
Has this been happening when using eclipse to create the application or did you find this specific to build?

You seem to be on the correct path with the config.xml

Hardeep Shoker
Photo of mas.colorado

mas.colorado

  • 7 Posts
  • 0 Reply Likes
I'm not using eclipse; I've been developing for iOS using Xcode and hoping to use Build to create the Android version instead of having to install another dev env.
Photo of mas.colorado

mas.colorado

  • 7 Posts
  • 0 Reply Likes
I didn't get anywhere with the config.xml... any ideas? or am I out of luck? Anyone else building an app on PhoneGap Build for Android that uses Capture?
Photo of Hardeep Shoker

Hardeep Shoker

  • 1941 Posts
  • 89 Reply Likes
Hello,

I will take a look into the issue and try to find a resolution.

Hardeep Shoker
Photo of mas.colorado

mas.colorado

  • 7 Posts
  • 0 Reply Likes
Thanks Hardeep! If you need me to try out some things or work with you, just let me know. -- Anne
Photo of terry

terry

  • 10 Posts
  • 0 Reply Likes
We also had the same issue, we narrowed it down to the improper use of the navigator.notification.alert() function, it takes a minimum of two params, not just one.

calling the function with just one param will throw a javascript exception and halt execution, unless you have an error handlder defined etc...
Photo of Hardeep Shoker

Hardeep Shoker

  • 1941 Posts
  • 89 Reply Likes
Hello,

Seems like we need to update our version of phonegap, the exception is thrown on rc1, but not on 1.0.

I will post an update once it has been done.

Hardeep Shoker
Photo of mas.colorado

mas.colorado

  • 7 Posts
  • 0 Reply Likes
Hardeep, any timeframe on this yet?

Thanks, Anne
Photo of em.zenuity

em.zenuity

  • 4 Posts
  • 0 Reply Likes
I think I am having a similar issue.... My Xcode build works fine but my Phonegap build does not. On iOS my PhoneGap build does not work, and neither does Android.

The funny thing is, the iOS version gets a bit closer but my first alert, instead of working like it does on my Xcode build, the alert message is "com.phonegap.notification.alert0" and that only occurs on the PhoneGap build. And on Android, the APp comes up but buttons do nothing (we are using JQTouch.)

So since it works fine from Xcode, and based on what Hardeep said on rc1 vs 1.0, I am wondering if PhoneGap Build is the issue, and I wonder if I need 1.0 from PhoneGap build rather than rc1.
Photo of Hardeep Shoker

Hardeep Shoker

  • 1941 Posts
  • 89 Reply Likes
@Anne: within the next week, it is my next task on my todo list (for all platforms)

@Earl: i will test out that call as soon as i upgrade to 1.0
Photo of em.zenuity

em.zenuity

  • 4 Posts
  • 0 Reply Likes
Hardeep, just to clarify...

We are using a call such a:

navigator.notification.confirm('message',onConfirmReg,'window title','Ok,Cancel')

This works on my Xcode build for iOS but on PhoneGap build the result is a window with the correct title but a message that reads "com.phonegap.notification.alert0" and the buttons do not work.

Thanks.
Photo of Hardeep Shoker

Hardeep Shoker

  • 1941 Posts
  • 89 Reply Likes
Okay Android has now been updated to 1.0.0 media capture is now working as expected.

Hardeep Shoker