HTML5 + Phonegap / Cordova to add Push Notifications, Native Camera, etc.

baboybaboy Member, PRO Posts: 93

Hi all,

Has anyone tried this? Export app to HTML5 then add cordova plugins like push notifications, camera etc. (http://ngcordova.com/docs/plugins/) then build the app using Phonegap?

Is this possible or has anyone tried this?

Thanks!

Comments

  • RabidParrotRabidParrot Formally RabidParrot. Member Posts: 956

    @calebdomingo Yes, it is possible. I have successfully added a html5 version of one of my GameSalad games to a Phonegap build. Unfortunately there are multiple pros and cons of using this method.

  • fmakawafmakawa Member Posts: 565

    @rabid parrot, like?

  • RabidParrotRabidParrot Formally RabidParrot. Member Posts: 956

    @fmakawa

    Pros:
    •Different Ad providers
    •Push Notifications
    •Update remotely if your app is using an iframe.
    •Smaller file size if you run the app remotely
    •Screenshot sharing

    Cons:
    •You'll have to put advertisements on a timer because phonegap doesn't detect scene changes.
    •GameCenter is a no.
    •Grabbing data from the game and sharing it through a tweet sheet or other form of social sharing is a no. You can share a link of the game but you can't have the person share a custom message. For instance, "I just scored an 8 on Rabid Parrot's awesome game"
    •In app purchase can be added to the phonegap build but they can't directly connect to the game. No consumable purchases
    •HTML5 GameSalad arcade bugs are present in the phonegap build

    I could keep listing stuff, but I found GameSalad publishing to be more beneficial. Yea, I can push notifications with Phonegap, but I can't set an ad to run after a Game Over scene or have native functions like GameCenter.

    Is it possible? Yes. Am I likely to use it? Depends on if I want the game to have native accessibility.

    Phonegap will work alongside GameSalad but it won't work with it. If that makes sense.

  • fmakawafmakawa Member Posts: 565

    yes, totally makes sense.

  • fmakawafmakawa Member Posts: 565

    @RabidParrot thanks for the clarification

  • baboybaboy Member, PRO Posts: 93

    @RabidParrot thanks for the reply. How about the performance of the gamesalad html5 app built with phone gap, how is it? Is the performance the same with the app compiled only with game salad?

    By the way is your phone gap built app deployed now in the App Store or google playstore? Would love to see it!

    I also hope the GS team would help us with this. The cordova functions which are not present in the GS Builder would bring our apps to the next level :)

    Thanks!

  • RabidParrotRabidParrot Formally RabidParrot. Member Posts: 956

    @calebdomingo said:
    @RabidParrot thanks for the reply. How about the performance of the gamesalad html5 app built with phone gap, how is it? Is the performance the same with the app compiled only with game salad?

    By the way is your phone gap built app deployed now in the App Store or google playstore? Would love to see it!

    I also hope the GS team would help us with this. The cordova functions which are not present in the GS Builder would bring our apps to the next level :)

    Thanks!

    The performance on the phonegap build is the same as the arcade. At one time the arcade was better suited to GameSalad projects less than 20mb. I'm not sure if this was because of performance issues. At times the game can run slow. Some rules aren't fired until after the screen is tapped.

    Unfortunately because of the cons of using phonegap with GameSalad I decided not to publish my app to the app store using phonegap. I wanted GameCenter, In-App purchases and I wanted to show interstitials after scene changes.

  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408

    Actually you can capture tweet sheet and scene change information using the game salad html5 API. I used both when porting my game to steam.

  • RabidParrotRabidParrot Formally RabidParrot. Member Posts: 956

    @jonmulcahy said:
    Actually you can capture tweet sheet and scene change information using the game salad html5 API. I used both when porting my game to steam.

    Interesting. Are you able to access the game attributes through html5? I'm not sure how phonegap would intercept the values.

  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408

    @RabidParrot said:

    @jonmulcahy said:
    Actually you can capture tweet sheet and scene change information using the game salad html5 API. I used both when porting my game to steam.

    Interesting. Are you able to access the game attributes through html5? I'm not sure how phonegap would intercept the values.

    nah, just scene changes, the text sent through tweet sheet, and some gameplay controls:

    http://help.gamesalad.com/knowledge-base/does-the-html5-engine-have-any-apis-i-can-interact-with/

    they make themselves available through a javascript function within the index.html

    I went into detail on using it when porting my game to steam here: http://forums.gamesalad.com/discussion/89397/a-long-way-home-greenlit-on-steam

Sign In or Register to comment.