2

I have audio player app built with PhoneGap 3.2 which uses HTML5 audio tag to play songs. When I launch the app, the first song in the queue should start playing automatically, but it doesn't. I inherited the code base and the old build that was made from the same code base autoplays songs perfectly! Here's what I've tried:

  1. The app content is not bundled with the app, but rather downloaded from S3. So both apps (old and most recent) runs the same js code. Logging shows that on the recent build calling audioElement.play() doesn't do anything, whereas the old build does this perfectly. So there must be an issue with the build itself.

  2. I've decompiled both apks and compared file to file. They are identical.

  3. I've tried to update from PhoneGap 3.2 to 3.5 and build. Audio still doesn't play.

  4. Tried to build with phonegap command-line tools, ADT 22 and 23 on Mac and Windows 7. Nothing.

  5. iOS build of the same app autoplays perfectly.

Can you see anything obvious that I'm missing here?

andriys
  • 2,202
  • 2
  • 19
  • 24
  • Path of local audio file is different in android which seems to be missing. So, get the actual path of audio file please refer [this Post](http://stackoverflow.com/questions/11383563/using-phonegap-to-play-a-wav-in-android). If still not able to fix this, please share the related code. – byJeevan Jul 06 '14 at 06:48
  • Audio is downloaded from the server, no local audio files are used. Can this still be an issue? Also the post you're referring to uses Media object whereas I use HTML audio element. – andriys Jul 06 '14 at 18:48

0 Answers0