Phonegap + Construct 2

0 favourites
From the Asset Store
Casino? money? who knows? but the target is the same!
  • I wanna try this... sounds really cool.

    Just found a simple workaround to enable local mp3 support without negative side-effects on existing functionality:

    in the exported project's media subfolder, batch-convert all m4a to mp3 with the software of your choice, or for better quality, start with the uncompressed sound files (wav) if you have them.

    Then open c2runtime.js with a text editor, search for "m4a" and replace it with "mp3".

    That's it!

    The project will still have sound enabled in all currently supported browsers, using mp3 instead of m4a for Safari and IE 9.

    Unfortunately, it doesn't enable sound on mobile webkit - be it Apple's or Google's version - so there's no point to do this as of now, because it will only slightly increase the project's size due to mp3 compression being generally weaker than m4a and additionally it might put you at risk with the format's license restriction for games.


    Probably the method used to create/initialize the audio object in c2runtime.js doesn't play well with those mobile webkit flavors (in fact I even think this was already discussed here or in another thread) - could you use a method that outputs the same html code as in the w3schools html5 sound example I posted, which does work correctly on all mainstream html5 browsers, including the one in Android 2.3?

    This should solve the sound issue on iOS and Android, for the latter provided that it supports ogg or m4a (who knows, anyone can change, even Google!..) in an upcoming version; in the meantime, my mp3 workaround would give Android in-game sound to the reckless <img src="smileys/smiley2.gif" border="0" align="middle" />.

  • Yes, that would be really awesome if we can stream audio on our mobile phone. Please implement this feature in C2's next release.

  • Phonegap is free now? and will be expensive in some weeks? or construct will make a contract with the phonegap? =x

  • Phonegap is free now? and will be expensive in some weeks? or construct will make a contract with the phonegap? =x

    PhoneGap was purchased by Adobe for inclusion into their toolset but to the best of my knowledge, it is still open source and free. PhoneGap Build on the other hand is in beta and the costs are still up in the air and may be for some time while Adobe/Nitobi figure out what the next steps are with that product.

  • Update: sound - Ogg this time - works with a few glitches in FireFox for Android.

    So for webapps, the problem is kinda already solved; kind of, because the glitches are really annoying, and with the current beta of FireFox for Android it isn't better.

    Now for native Android, a wizard could use fennec source code to build an Android wrapper for c2 games, but I fear not to be that one...


  • Is there a way to make adhocs with phoneGap?

  • mammoth: a simple google search would lead you to <img src="smileys/smiley2.gif" border="0" align="middle" />

    Besides that, I have some news:

    -The recent release of the HTML5-oriented MobiUs browser (advertised as a "web app browser") for iOS made me full of hope that it would work at least as good as Firefox for Android with C2 games - that is, support sound, even if not perfectly - but still no luck; didn't try my mp3 workaround there, as I doubt it would change anything...

    -It will be quite difficult to use Fennec as a wrapper to make a sound-enabled native Android app from a C2 project, as there is no xulrunner (Mozilla's thing to enable such things easily) available for Android (yet).

    So for now, a web-app requiring the user to install Firefox is the only realistic option for providing sound to Android users.

    Let's hope that the current situation will improve soon!

  • The next build will use the PhoneGap API (i.e. not a part of HTML5) to play audio for PhoneGap-built apps. However, there's a hardware limitation that you can only play one sound at a time... so it's still going to be super basic.

    I think since the PhoneGap API uses the native audio engine rather than a browser, you should be able to get OGG playing on Android and AAC on iOS. So, still no need for MP3 if that's the case.

  • I can't wait for the next release. It would be very awesome and useful for mobile development

  • The sound thing is a somewhat big deal. What would really be awesome is open feint, game center and in app purchases. I know that this is a start up but these features are essential. If you guys did this you would be the only visual programming engine to do it. You would be ahead of game salad and game maker.

    If you guys implemented these people would flock to the engine. The only other engine that you can use is the Corona SDK. But coding in lua is somewhat annoying.

  • Ashley: Nice, and sorry for pressing you a little on this issue, but sound is really essential for a game to be successful, especially when designed for small children who obviously cannot read text, which is the case of the game I'm developing!

    One sound at a time should be more than enough for most simple games, provided a new sound correctly replaces another if an event launches it while the first sound hasn't yet finished playing.

    Regarding sound formats, Ogg doesn't play yet natively on Android (at least not on 2.3.4), but m4a files do play natively when renamed to aac or mp4 (*), which are the "proper" (**) extension names for this type of files.

    So basically, it should work on Android too with minor tweaking; else we'll still have Firefox mobile for sound-enabled Android HTML5 webapps and/or mp3 as a last resort.

    *though the latter is recognized as video even if it only contains sound

    **non-Apple specific

  • Has anybody got sound to work at all on iphone and iPad?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Best wait for the next build which uses the PhoneGap API and see if that works for you.

  • Does anybody know when the next phoneGap API is released?

  • Has anybody got sound to work at all on iphone and iPad?

    mammoth: were you able to get sound to work on iOS with the new release?


    Apparently, Pode got it to work somehow even before the update - . Maybe I wasn't patient enough to wait for the sound to begin playing at a random moment hehe

    <font color="red">Update</font>: sound works on iOS when you tie it to a touch event - see

    Now figuring whether pre-loading it to avoid a delay is possible on this platform.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)