Multi-Resolution Game Development With GameBuilder Studio Check it out!
NEW Version 0.9.7 has arrived! New Blazing Fast Particle Engine & More Game Actions. Check it out
Publish to Android Device
  • Hi all,

    I've got a question.  I'm currently trying to figure out how to deploy my game to my phone so that I can test it before I publish it on the Google Play Store. This is my very first time developing a phone app, and thus, I'm a noob.  I've looked at the following tutorials I found on game builder's website:


    That's all fine and dandy, but I'm more concerned with what I'm doing in the GameBuilder Studio program itself.  When I hit publish, I've set it to target the android platform as well as the configuration.  There are a few fields though concerning certifications and Identification.  To be quit honest, I have no idea what I'm doing with that.  Do I make it up?  Do I get it from Google?  Again, I'm new to this, and they may be dumb questions, but I need help.

    Other than that, I've got my smartphone hooked up to my computer, and when I hit the deploy tab and refresh the connected device list, nothing pops up.  Is there something special needed to do that?

    So far my understanding (correct me if I'm wrong because it's highly likely), is that I need to create a dumby app, publish it to get an apk file, post that to Google, all so I can get something (no clue what).  Then I can finally plug something into my real app and publish it to my phone for testing?  Then after all that I do the same thing to publish it to the store?

    As you can see I'm a bit lost, and I've not been able to find anything on gamebuilderstudio or on google that has been able to break down the process for a noob like me into simple steps.  Any guidance would be appreciated!

    -Ro0ty

  • 10 Comments sorted by
  • Hi @Nathan you will need to upgrade to the PRO version of GameBuilder Studio to publish to Android. I will create a step by step tutorial for you to walk you through the process. Give me a couple days to post it online.

    But just a quick rundown: 

    1. Android apps require a code signing certificate to deploy an app to a device. You can self sign one by checking the self sign check box and providing temporary information and GBs will create one for you if you don't have one. This can only be used while testing on your device locally. The final app store version will require an official signing certificate from a signing authority.

    2. When you publish from GBs it will just generate the final .APK app file on your machine without deploying it to a device. This can be used to get the final APK when ready to publish to the store. 

    3. To deploy direct to your device you will need to turn on USB Debugging mode in the application settings (http://www.maketecheasier.com/activate-usb-debug-on-android-device/). On the new S5s this is a slightly different process because you have to tap a button like seven times (http://www.androidcentral.com/how-enable-samsung-galaxy-s5-developer-options). Once this is turned on you should connect your device to your machine and it should show up in the connected devices list.

    4. The only time you need to create a test APK to upload to the android dev portal is when you are using in-app purchases because Google requires a temporary APK to be upload with the target bundle id to generate the in-app purchase keys. That is a whole other process that is outlined in the tutorials you were referring to.

    Hopefully this answers a few questions to bring clarity but if it doesn't get you going don't worry I will outline all the steps in a tutorial.
  • Thanks for the response.  I'll try this all out as soon as I get a chance.  I'm a bit confused though with the self signing.  Sorry for my lack of understanding.

    In GBs there are a total of 5 required fields (I don't have my computer in front of me so forgive me if I don't get these right).  Those were the Certificate ID, a Certificate File, another field with the certificates, then the bundle ID and version?

    Where do I get a certificate file?  Where do I get the other file that allows a file to be uploaded?  Do I just make up a cert ID, bundle ID, and version number? 

    Again, thanks for your time and thanks for explaining all of this.

  • @Nathan

    During testing you can use a self signed certificate. GameBuilder Studio can create that for you only for the Android builds by selecting "Create Certificate" checkbox.

    image

    When self signing a certificate you can put whatever values you want for certificate name (avoid using spaces in the cert name), certificate company name, and password. Select where to store the generated certificate and where GBs needs to output the final published build file.

    Alternatively, If you already have your signing certificate from an authority you can uncheck "Create Certificate" and the input fields will change.

    image

    Once you have your certificate information filled out then you can specify the build identification information. The bundle Id and version number are set by you. Once you set a bundle id and publish your app to the store don't change it. The industry standard syntax for a bundle id follows a reverse domain format. (i.e. customgame.gbs.com ).
    The version field is just a number value indicating the current version of the build. So whenever you publish a new version to the store you will increase this number.

    image
    SelfSignedCertificate.png
    1040 x 486 - 125K
    PreparedCertificate.png
    1052 x 340 - 94K
    BundleIdFields.png
    1036 x 210 - 28K
  • Awesome.  Thanks for all the help.

    I've got another question though.  I've seen an issue with Android phones where when you click the home screen to back out of the game the music still plays in the background.  Is there a setting to fix that?

    -Ro0ty
  • @Nathan you need to create a Rules component that listens for the system event called "De-activate" this event will trigger whenever your app/game looses focus like when the player hits the back button. At that point you should pause your game using the Pause Game action and automatically shut off music or individually pause all sounds by calling the pause method on a Background Sound component using the Call Method action. (This topic is covered in another post here on the forums)

    It is also a good idea to store any game state or progress either locally or remotely to pick back up where the player left off if they shut down the game. If you want to support that functionality.
  • So here are the steps I took:
    1. Create an object with a rules component called Deactivate Music.
    2. Set it when event captured of system de-activated then it triggers the call method of backgroundsoundplayer.pause and to pause game.
    3. I created another object with rules component to Activate Music.
    4. Set even captured of system activated to trigger Un-pause game as well as a call method of backgroundsoundplayer.start.
    The game will properly stop the music and pause, but it won't turn the music back on or un-pause the game upon reactivation.  What do you recommend doing?  I'm only testing this on my PC and have yet to try it on a phone, but I imagine the functionality should be working the same.
  • @Nathan it is important to remember that when you pause the game your effectively shutting down the game engine. So all actions, all rendering, etc stops executing. So you have to put your pause and un-pause logic on an entity that has its "Ignore Timescale" checkbox selected. This is at the top of every entity properties panel. This will allow for code to execute even while the game is paused so that you can un-pause the game after pausing it. So wherever you have the logic to unpause the game make sure the entity has that checkbox selected.
  • @Lavon I am going through the Android: Preset Up Before Testing In App Purchases on Android Tutortial
    because I am going to have an In App purchase to remove ads.
    I set up a Google Play account,google wallet, got a Base64 license key, and my question is:
    Do I upload a totally blank game from GBS and publish and NOT my game? As in the tutorial it says

    Create a project in GameBuilder Studio and publish a blank game for Android so that you can create an application in the Google Developer Center. Make sure you are happy with the application Bundle ID, title, p12 certificate, and version number 


    Do I publish a blank game and then my game? 

     
  • @BenFromOregon no just upload a build from GBs that has the bundle Id that you will submit to the app store. It doesn't have to be blank. I just said that so that you know your game doesn't have to be completely finished before uploading. The site just needs an apk.
  • Ahh I see.Thanks for clarifying. Much appreciation!

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

Tagged