AnD4D's Forum Posts

  • This is boring. Why are you getting involved if it's tastes? You're happy, I'm not. Let's move on.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • NN81 - Never heard of CLI before. Just had a quick look online, and it looks like you need to do some coding here and there. With PhoneGap, you literally just zip your export and upload it. I would have thought PhoneGap would be capable of updating the version code, but I guess not. I can access the AndroidMenifest.xml using Android Studio to open up the APK, but that's a step I don't deem necessary. It takes seconds to open the config file and add in the line, but it'd be nice if it weren't a step at all.

    My method doesn't require anything but Construct and PhoneGap's auto-sign and build site. It's so much simpler.

    Just had a read of your tutorial, and I still think PhoneGap is easier, excluding the VersionCode, which I'm hoping Scirra can do something about during export. With PhoneGap, I can build Android, iOS and Windows apps all with pretty much a single click.

    For me, fewer steps FTW.

  • NN81 - Before building the APK. Construct doesn't export the APK. I need to then run it through PhoneGap so it'll build the signed APK, then upload that to Google... at which point it demands an updated VersionCode.

  • NN81 - What you're referring to is the release version.

    Taken from my Google Play Console in the Alpha release atm...

    Release: 0.1.0.0 (This is changed by the #.#.#.# code)

    Today, 15:10: Full roll-out

    Supported devices: 5907

    Unsupported devices: 8741

    Excluded devices: 0

    Manage devices

    1 APK version code: 10002 (This is changed by the VersionCode... which is what Google requires.)

  • Problem Description

    The exported XML file when using Cordova doesn't include a VersionCode. It'd be nice if this was included within Construct, or even the export section.

    Attach a Capx

    https://1drv.ms/u/s!Am3CPIM7woZ9zh5jsEb-ZZ5XL_zL

    Description of Capx

    But you can literally use any CAPX with an ID and description. This is just a blank capx (with included properties) because rules...

    Steps to Reproduce Bug

    • Open CAPX
    • Export using Cordova
    • Open exported config.xml
    • Note that there's no line regarding the android-versionCode

    Observed Result

    When you upload an APK to Google Play Store, you see a version code. It defaults to 10000. If you then try to upload another APK, Google will throw up an error telling you that you have to upload an APK with a different version code. Note that the version code is different to the version that is included in Construct's Properties section.

    Expected Result

    Within the config.xml file, you're meant to be able to change the version code.

    I added it in the top line, highlighted below in bold.

    version="1.0.0.0" android-versionCode="10001" xmlns="http://www.w3.org/ns/widgets"

    When I add this line in, build an APK and upload it to the store, it's accepted and works. Surely we should be able to edit this within Construct, rather than opening it up after each and every export, adding this line and then going through the normal process. At the very least, this line should be included in the exported XML already. I do note that if I change the "Version" number within Construct, the XML is changed already.

    Again, I emphasise that Version is not the same as VersionCode.

    Affected Browsers

    N/A

    Operating System and Service Pack

    Windows 10

    Construct 2 Version ID

    r249

  • NN81 - The "version" in properties is different from the version code Google Play requires. You can upload one APK without issue, but the second APK requires a different Version code... as does the next one, and the next one. Editing it each and every time is a little bit annoying, as I need to keep note of the version number each time. Fine for normal games, but annoying for those with many free updates or bug fixes.

  • Ashley - This is a bug??? Also, I'm afraid I don't know who / Iain is. Bug reports typically require a capx to be created and shared, but one could simply export a blank project and see the feature I'm requesting. I only see reference of shortercode on the Construct 3 Github site, while I'm talking about Construct 2.

  • Hi Ashley,

    Quick request

    I've been trying to figure out a way to update my APK on the Google Play Console, but each time it requested I upload an APK with a different Version Code.

    Took me ages to figure out what I needed to do. Trying multiple programs... with no luck.

    In the end, I simply opened the config.xml file and added in this line (in bold) between the other two:

    version="1.0.0.1" android-versionCode="10001" xmlns="http://www.w3.org/ns/widgets"

    Took quite a bit of research to find out that I could add this in, as it's described as optional. Not sure why it isn't included by default.

    My question is, is there a reason why this isn't included when we build the app? Also, is it possible to perhaps make this process a bit easier? Say including a Version Code properties section within Construct itself? Perhaps next to the Version number in the about section?

  • Necro! This is still broken 2 years later. My ad is set to appear at the bottom, but is appearing at the top. I do have scale outer set.

  • Not sure as to why Construct 2 IAP didn't work. I believe it was something on Google Play side of the house, maybe an update that was not incorporate d into C2, but in C3 that issue was fixed.

    Ashley - Is this correct? I've been trying to get IAP working on Construct 2 with PhoneGap for about a week now. Is the solution to upgrade to Construct 3? When I try to upload any app with the IAP plugin included to PhoneGap, I get an error saying:

    "Error - One of your plugins requires a parameter: BILLING_KEY - You can fix this here"

    According to the OP, they just did the exact same thing on Construct 3 and it worked without them seemingly needing to jump through hoops.

    *EDIT - I should add, the "You can fix it here" just takes you to the plugin section... which either creates a malformed config file or doesn't fix the Billing Key issue.

  • NN81 Do you know how or where I'm meant to implement that? As far as I can see, it's just a bunch of code without any instructions of where I need to put it. Sorry for the hassle.

    What I ended up doing was adding the browser plugin to my game and giving the back button a function. This meant when a player pressed it, it didn't close the program.

  • orangpelupa Did you ever get this sorted? Did gumshoe's links help you, because they mean nothing to me.

  • Anyone know how to get this working?

    I've looked at some tutorials, but they all appear to be outdated now, mainly referring to the Intel XDK which is no longer being maintained.

    When I export my app and upload it to PhoneGap, I get an error message for my android upload telling me I'm missing a "BILLING_KEY". Now some tutorials tell me that I get my billing key after I upload my app, which is odd seeing as I can't even get a build I can use.

    Another thread I found had the same issue, but they said "Oh, I switched over to C3 and it works now!". What about those of us that are still using Construct 2?

    Other people have sent me to sites such as GITHUB, where all I see is a wall of text with no explanation as to what I'm meant to do with it. One recently was in Italian, which just confused me even more.

    I can build the app with no issues so long as I don't use the IAP plugin, but as soon as I add that I get errors.

    Am I to assume that Construct 2's IAP plugin is just broken, seeing as it apparently works without issue in Construct 3?

  • Nope, didn't have to follow that link. Just updated IAP from Construct 2 to Mobile IAP in Construct 3 and Google Play store accepted the apk. In app purchases was unlocked afterwards in Google Play Console.

    Sorry for bringing this back up, but I'm experiencing the same issue now. Are you saying Construct 2's IAP is buggy and that we need to use Construct 3 to do this now?

  • Does anyone know how to disable the back button on an Android mobile game?

    In the past, when I pressed it a message popped up asking me if I wanted to close the app. I believe this was with CocoonJS, however I'm now using Cordova.

    Now, when I press it, the game instantly closes without any notifications. I'm building a game that requires the player pass the phone to another player, and on occasion, with my phone (Samsung Note) a player can press the back button by mistake. If they press any other button, including the power button, the game remains open. The back button, however, as I said, closes it, and when you open it again, it starts from the beginning.

    Any ideas?