ranma's Forum Posts

  • Pode, PhoneGap Build doesn't support plugins, so using any of those prevents anyone from being able to build their game on PhoneGap Build. Then you gotta install hundreds of megabytes of dev software to build instead.

    aggreed, but after that you can do lots of great things you never would do without it :) and testing your apps becomes so easy you wouldn't even imagine (i know I wouldn't if I didn't do it, its painful once, but after you install it... ghaad :) with a little bit of javascript you can do ftp file uploads / downloads, speech recognition, and everything that you can with phonegap plugins, so for me it actually was worth it :)

  • i think a simple pseudocode:

    var created = false;
    ondeviceready(function(){
    if (!created) {
    cr.createRuntime("c2canvas");
    created = true;
    }
    });

    would work, I will check it today if this work.

    what am I sure of now is that every time i bring app to front after putting it to sleep, it runs slower and slower. appmobi AND phonegap export.

    cheers

  • Hi all. Bumping the marginwidth, marginheight, border options for iframe.

    Also, when exported to mobile (phonegap tested) if you open external html with iframe the app crashes. may have something to do with loosing wifi signal during app activity (connected to wifi, launched app, lost wifi signal, opened some page in iframe -> crash "the connection to the server was unsuccessful", one button "ok" when pressed app exits).

  • > why? :D

    >

    Because, as you said, the base Media() is buggy.

    I didn't :) I said the construct's audio object doesn't work with phonegap, that's all. I didn't run into any problems with phonegap base media object, not that I had it put to the extreme tests or something. Anyhow, thanks for pointing out that there's plugin for the audio output, when I have problems with base media object, will use the plugin of course :)

    cheers!

  • I was wondering lately why every time i run my mobile (phonegap, appmobi) app it runs slower and slower every time i did it. So i googled a little, and knowing that exiting an app doesn't really close it, app just goes to background, I think, that every time it is brought back to top there is another runtime created by cr.createRuntime("c2canvas"); as the listener "deviceready" gets a hit :) I think there should be some kind of check if the runtime is already created, and if it is, don't create another. Would be grateful for some kind of workaround until text build :) maybe some kind of

    if (!runtime) {cr.createRuntime("c2canvas");}
    

    or something, in the index.html

    cheers!

  • Just to say : if you want to do something with PhoneGap and Audio, don't use their native Media stuff (I know, I know, multiplatforms and all, yay !)

    Use a plugin to deal with that, for example that one : https://github.com/phonegap/phonegap-plugins/tree/master/iPhone/SoundPlug on iOS (that one is promising, but it's only a month old : https://github.com/phonegap/phonegap-plugins/tree/master/iPhone/LowLatencyAudio, although there's also that one for the Android platform in the github tree)

    why? :D

    i mean, how is that better than phonegaps native media?

    also I had real fun yesterday with eclipse, the BEST thing about it, is that you can export from construct to the eclipse workspace folder, then from eclipse just run the project on your device with one click of a button, this way testing your app is no pain at all (appmobi, every build is about 10 "next" clicks, uploading to phone, installing apk).

  • ok, thanks

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • For anyone that is interested in getting sound in phonegap, here's temporary workaround (hope that it gets implemented in C2), you have to use browser or callJavascript plugin and call this bit of JS to play sound (assuming your sounds export folder is "media"):

        var myaudio = new Media("/android_asset/www/media/someSound.ogg");
        myaudio.play();
    
  • ranma, the Audio object already uses PhoneGap's Media API to play sounds. Within PhoneGap, all 'play' actions are redirected to the thing you linked me to. And everyone reports nothing plays. So I don't know what to do, I've read other people have had problems with it though.

    :( I will do some tests with it, will PM you about how it went if you don't mind, as for me it is now the only thing that is blocking me from publishing some really good and finished games to market / appstore.

    Another addition to the first post. Appmobi apps actualy weigh about twice as much as phonegap build as they seem to unpack some data during install.

  • > AppMobi has a HUGE problem with published apps. It's not having a control over application version.

    Have you contacted them about this? It does seem silly to have the AppMobi version instead of your app's version, but they may be willing to fix it.

    Have you looked at Live Update as well? I think it's an autoupdate system for all your apps.

    I didn't but there's nothing to fix. It seems that they had users control over app version until they released Live Update, problem is that live update is a paid service, and apple doesn't seem to like it. I aggree that this is ridiculous.

    honeGap has also a HUGE problem. There's no sound support in construct phonegap builds (currently, I don't know if this is going to change - Ashley ? :) AppMobi has no problems with sounds.

    I've tried, and failed, to get PhoneGap to play audio. It just doesn't support it AFAIK.

    not true, I managed to actually play audio using phonegap media object using some sick workarounds and external (over uri) source, maybe this will help, please check it out, maybe it's the way http://docs.phonegap.com/en/1.4.1/phonegap_media_media.md.html#Media

    n appmobi there's reading and writing contact data (exclamation mark here) required.

    That's ridiculous for a game and is surely going to lose you players. I'll see if AppMobi provides a way to fix that, but you should contact AppMobi as well in case they can help you.

    also no need to do that, as they stated that "There are a set of default permissions that we must allow, due to how our base container works. We do allow users to turn off some of them, like GPS and streaming." wow, now I'm left with only eleven permissions, compared to phonegap's 4.

    ) appmobi builds have a com.company.company.appname package name for some reason (or maybe I didn't configure appmobi correctly)

    I don't think you set it up right, I think it's supposed to use your project name which you set yourself to something like "com.scirra.spaceblaster".

    I'll check it out again, but it seems that appmobi appends company name and then android market does it again and that's why the confusion.

  • the game currently on the appstore built with impact/appmobi don't run that good, they are mostly fluid but I don't think that they get past 20-30fps tops.

    out of curiosity, did you compare phonegap's and appmobi's speed on iphone/ipad device? I only did this on android and noticed that phonegap seems to be a little faster. If you did, care to share how was it?

  • Whats this app version thing your talking about? I am unsure what it is, or why its of any importance..? Maybe it might make me change my mind about AppMobi

    as I explained in the original post. if you publish appmobi build to android market, in there the app will display version number: 3.4.0

    that's all control you have over it, 3.4.0 nothing there to do with it, you cannot change it in any way.

    now in phonegap you can set version 1.0, 1.1, 1.2 and increment it every time you publish to android market.

    now, why is that so important? let's say 1000 users downloaded and installed your app. now you decided to update it with more content, bug fixes, etc. you update it on android market and if it's appmobi build, the version is still 3.4.0. if it's phonegap build, your users will be notified by their device, that there's new updated version of your app available and ask them to update it automatically. this is a standard for apps and games, and appmobi did it this way probably to force people to use their paid updating api and for me as a developer this is a big warning sign and is unacceptable.

    best of luck, no matter if you change your mind or not. friendly warning :)

  • in app purchases and Ads ect.

    with some smart use of ajax and iframes you could make app purchases and ads in phonegap for free, as far as I know, phonegap apis are paid extensions.

    But games simply cannot go without audio, no audio would make a good game bad unless the art is sooo amazing that having no audio could be part of the game maybe?

    agreed, that's why for now, appmobi is the only option for games in construct, but I bet the phonegap export will have audio fixed in some future build hopefully not so far away, as in the lates blog post, Ashley stated that construct is taking the mobile direction :)

    I think AppMobi's direct canvas will mean much better performance.

    We'll see, probably that's true, but again, not having control over your app version is the main reason I'm not staying with appmobi.

  • Hello all :)

    Recently I published a android market application, made in construct 2 and built with phonegap. Also some time ago I published here a link to an article about how developers using appmobi should move to phonegap. As now I can take side, I'd like to do it here and encourage other people that have published their apps to market, to do so.

    AppMobi has a HUGE problem with published apps. It's not having a control over application version. This means, if you plan to publish an updated version of your app, it will have the same version number on android market. On the other side, in phonegap you specify your app version, which after upload to android market will SEND A MESSAGE to all your app users (that are currently online, because market app needs to check this), that there is an updated version available and that they should download it.

    PhoneGap has also a HUGE problem. There's no sound support in construct phonegap builds (currently, I don't know if this is going to change - Ashley ? :) AppMobi has no problems with sounds.

    Couple of minor differences between phonegap and appmobi I encountered:

    1) in phonegap you CAN remove the native status bar and launch your app in full screen, in appmobi there's (currently) no option to remove phone's status bar.

    2) in phonegap you have more control over permissions your app requires, minimum is storage, calls and network. in appmobi there's reading and writing contact data (exclamation mark here) required.

    3) phonegap seems to be easier to build, you upload code to phonegap build and it's done.

    4) appmobi builds have a com.company.company.appname package name for some reason (or maybe I didn't configure appmobi correctly)

    5) phonegap seems to be actually quicker than appmobi (about 5-10fps more on my nexus one android), but this probably will change when construct will support appmobi's direct canvas.

    6) phonegap build service allows only one private app, which is not a big deal for me as it can by any app any time. this means no application management at all, in appmobi you can have as many apps as you please in one time.

    In conclusion, if construct team would be so kind and fix sound support in phonegap, I would move (and would recommend all of you the same) to phonegap.

    TLDR: Construct team, please fix audio in phonegap, and all of you out there, make your builds with it. in appmobi you don't have control over application version which will prevent you from updating it via android market app.

    cheers!

  • great thanks!