1. Hey! Guest! The 35th GMC Jam will take place between November 28th, 12:00 UTC - December 2nd, 12:00 UTC. Why not join in! Click here to find out more!
    Dismiss Notice

GM:S 1.4 In-App Purchases (Consumable) for iOS, Android and Windows Phone

Discussion in 'Tutorials' started by Still57, Jun 24, 2016.

  1. Still57

    Still57 Member

    Joined:
    Jun 23, 2016
    Posts:
    75
    GM Version: GM Studio 1.4.1629
    Target Platform: iOS, Android, Windows Phone
    Download: Link
    Links: N/A

    Summary:
    This tutorial shows you how to integrate in-app purchases in your game in order to sell consumable products.

    Tutorial:
    This guide contains instructions on how to set up in-app purchases on your developer account for iOS, Android and Windows Phone. It also explains what code you need to integrate IAPs in your game. You will also find a IAP_Tutorial.gmx file where all the code is written for testing IAPs. You will have to set up your own in-app products for your tests to work though (the guide explains that in detail).
     
    Last edited: Apr 10, 2017
  2. DarkArtJason

    DarkArtJason Member

    Joined:
    Aug 18, 2016
    Posts:
    15
    I downloaded it but it didn't talk about adding the BILLING permission to your APK. That is what I need assistance with. It is a good tutorial but refers to the old Game Maker when they still had the check box to enable IAP. Now everyone claims all you have to do is use extensions and add "com.android.vending.BILLING". Nope that doesn't work either already tried it. In fact I've been trying things everyday for weeks now with no results. But this tutorial is great assisting with the coding and what not. But without the BILLING permission getting added to your APK project from the get go nothing in this tutorial is going to do anyone any good.
     
  3. bunkerz

    bunkerz Guest

    If you downloaded the Google play services extension from the marketplace, the billing permission is already added by default.

    If not try these steps:
    Double click on the GooglePlayServicesExtension in the Extensions section
    Go to the Android tab
    In the android permissions box, click Add and type in com.android.vending.BILLING

    Good luck.
     
  4. DarkArtJason

    DarkArtJason Member

    Joined:
    Aug 18, 2016
    Posts:
    15
    Again the com.android.vending.BILLING is already there in the GooglePlayServicesExtension. However when trying to create an application build fails. Everything is up to date.

    Someone offered me this link>>>http://help.yoyogames.com/hc/en-us/articles/216753748-SDK-Version-Support But it didn't help seeing how
    Java JD Stable/Beta: 1.7 (32 Bit) is no longer available to the public and Java JD Early Access: 1.8 (64 Bit) is for Early Access: 1.99.493 when I'm using Stable: 1.4.1757.

    I fill out a form and I'm told to come here to the community for further assistance. This run around doing this try that has been going on for weeks now. There has to be more to it than just adding the extension. That is the piece of the puzzle everyone seems to be missing. So instead of telling me how to add something that is already in there let's talk about what needs to be edited or removed or perhaps installed.

    So if you want to talk about the solution and focus on the solution to this problem rather than waste more time on what the problem isn't. Than let's start with the Global settings. What is the correct Java JD's to use? Let's focus on the ones that are still available instead of having people go off on wild goose chases looking for the ones that don't exist any more. Same thing with the
    Android NDK Stable/Beta: 10c can't get it because it is outdated. They now offer android-ndk-r12b-windows-x86.zip.

    Let's talk about more of The Global Settings
    Android SDK




      • Build Tools: 24
      • APIs Required: 23 (However add in whatever your extensions require too)
      • Support Library: 23.2.1
      • Support Repository: 34
    What should those number be if all you are wanting to do is IAP on Android in The Google Play Store?

    Now let's come full circle and talk about the EXTENSIONS. Is there anything that needs to be edited or added or taken away? I'm not asking if com.android.vending.BILLING needs to be added it is already there. I'm asking for deeper knowledge of the extensions.



     
    Last edited: Aug 29, 2016
  5. ShubhamBansod

    ShubhamBansod Member

    Joined:
    Jun 20, 2016
    Posts:
    192
    IAP_is_purchased is no longer supported.. Please UPDATE the tutorial :)
     
  6. DarkArtJason

    DarkArtJason Member

    Joined:
    Aug 18, 2016
    Posts:
    15
    Just a follow up on this. I have been able to fully get my IAP set up on Google Play store. The Codes are still basically the same only a few changes with them. However not only does Google Play Services need to be added to the extension but both Google APK Expansion and Google Play Licensing. Also need to make sure that BLUETOOTH is checked in the permissions in the Global Settings.
     
  7. Howard Lehr

    Howard Lehr Member

    Joined:
    Aug 23, 2016
    Posts:
    57
    DarkArtJason... thanks very much! You provided more clarity on this subject than I could find anywhere else.
     
  8. Howard Lehr

    Howard Lehr Member

    Joined:
    Aug 23, 2016
    Posts:
    57
    OK, thought everything was in the clear, but no such luck. After installing:

    GooglePlayLicensingAsExt
    GooglePlayServicesExtension
    PlayAPKExpansionExtension

    Everything compiles fine, the game publishes to the alpha section of the Google Play Store, and it installs on devices just fine. It also updates devices and the IAP section now allows the addition of IAP items. GREAT, one would think.

    However, when the devices try to run the game the following message appears:

    "Error: APK expansion version is incorrect"

    !?!??! There is only one version of the PlayAPKExpansionExtension in the store, so how can this version problem (if that's the real problem) be fixed???
     
    DarkArtJason likes this.
  9. Howard Lehr

    Howard Lehr Member

    Joined:
    Aug 23, 2016
    Posts:
    57
    In case it helps anyone else... that error about the expansion version being incorrect means that the .zip file that PlayAPKExpansionExtension creates isn't in the right place on Google Play. Just double-check that it's uploaded and complete.
     
    DarkArtJason likes this.
  10. DarkArtJason

    DarkArtJason Member

    Joined:
    Aug 18, 2016
    Posts:
    15
    Getting past this IAP thing has been a great challenge to me over the last month. I had read anything and everything I could. Googled it and searched high and low for any information I could find. When I couldn't find what I was looking for I started doing trial and error. Try it this way,try it that way? My IAP feels more like it was something created out of Frankenstein's lab. But whatever it is I did has worked.

    To help me better understand the APK Expansion I read this>>> http://ankitthakkar90.blogspot.com/2013/01/apk-expansion-files-in-android-with.html But when I last attempted to upload my package I uncheck the boxs Use APK Expansion and Enabled Google Licensing in the Global Settings. I'm not for sure if they are needed or not but know that when they weren't at least in the extensions my build would fail every time or get message my "game had stop unfortunately working". I also had to make sure that in the Android SDK Manager the Google Market APK Expansion was installed along with other things. To help make things easier I am attaching images everyone else can look at to compare notes. I'm not saying my way is the right way just that doing this way some how worked for me.[​IMG] [​IMG] [​IMG]


    I also remember I kept getting a pathway to long error in the compiler when I was trying to make an application. To address this I created two files in my computer (C:) I named GMTemp and another one named GMTempCache. Then in the Preference I changed the pathway to redirect to them to these shorter pathway files instead of the very long path they were taking.
    [​IMG]

    This and a few other thing I learn was a result of reading through many post by members.But this one here is what really help me out>>> https://forum.yoyogames.com/index.php?threads/google-play-services.4193/
     
  11. ShubhamBansod

    ShubhamBansod Member

    Joined:
    Jun 20, 2016
    Posts:
    192
    Please Update the tutorial!!
     
  12. DarkArtJason

    DarkArtJason Member

    Joined:
    Aug 18, 2016
    Posts:
    15
    I'm not sure when they'll get around to updating the tutorial but I have learned a few things and how to get the IAP working in at least one of my games. The game I was successfully able to get the IAP working in is The Seasonal Twelve I posted a thread about here in the Made With Game Maker forms. I'm not sure what kind of IAP you are looking to add to your game but in mine I used one consumable and two non-consumable products.

    In the tutorial
    In App Purchases Example
    They offer a link IAP Event that goes to a page no longer found had thrown me on a tail spin for a bit. In fact everything seemed screwed up from the missing check box to enable IAP to installing Google Play Services Extension.

    As far as the coding goes I was able to use this tutorial and make a little better since of it all. It is about windows phone but it and the example tutorial plus the one on here all together helped me understand the coding part.Everything else was just trial and error.

    Adding the above setting I posted earlier to my Global Settings in my game I was finally able to get the IAP working. I wish there was a simple way of doing the IAPs but there isn't. Plus even if they do a new tutorial who is to say Google won't change everything again about how they handle IAPs?

    But now that The Seasonal Twelve is up and running I'm getting ready to reopen this can of worms as I try to do it all over again with my next game. Who knows? Maybe I'll make a tutorial on IAP step by step if no one else is doing it. But until then Good Luck on your game and if you have any questions about IAP I'll try to help you out all I can.Just let me know what you are having problems with.
     
  13. ShubhamBansod

    ShubhamBansod Member

    Joined:
    Jun 20, 2016
    Posts:
    192
    I want to create remove ads feature but can't get the purchase data from server..
     
  14. DarkArtJason

    DarkArtJason Member

    Joined:
    Aug 18, 2016
    Posts:
    15
    I don't have any ads in my game because I don't have AdMob. AdMob requires a valid AdSense account and AdWords account. I have an AdSense account but the AdWords want a monthly fee of $25 or more. I don't collect that much in ads in a single month so it isn't a good deal to me.However while I was trying to figure out the IAP thing I came across a video on youtube. I bookmarked it and saved it in a file just incase I ever changed my mind about the ads. You can check it out if you like and see if it can help you.
     
  15. ShubhamBansod

    ShubhamBansod Member

    Joined:
    Jun 20, 2016
    Posts:
    192
    I think that is when you want to advertise your game.
     
  16. DarkArtJason

    DarkArtJason Member

    Joined:
    Aug 18, 2016
    Posts:
    15
    Yes that is for me to advertize my game. That is a $25 or more monthly fee I'm not interested in yet. Other people seem to be paying that fee to show off their ads but how many people are really clicking on them? And will any of them actually buy any of the IAP's or just play the free version of the game? Not too many people I know click on ads. And from my data I see that not many are clicking on the ones I have on other sites. Last month made a total of $0.97 off of ads clicks. Ok??? So why would I pay out $25 to create an account to add ads to my game?

    Either way to me it sends out a bad message about the ads when google is requiring people to have both AdSense account and AdWords account just to get a AdMob account. To me $0.97 for an entire month isn't worth me showing ads in my games at all. Showing ads and placing ads are two different things. They should be treated as two different things. So the message that I get is the ad business isn't doing so hot that's why they now require developers to take out ads in order to show off ads. Ads might be great for other people. They just aren't something I'm interested in at this time.

    I just want people to be able to play my games without being harassed or distracted by flashing ads that do very little at making me money.

    If you are for adding ads in your game that is great and I wish you lots of luck.
     
  17. rIKmAN

    rIKmAN Member

    Joined:
    Sep 6, 2016
    Posts:
    4,606
    Unless they have made a big change I missed, you do not need an AdSense or AdWords account to use AdMob ads in your game.

    Where did you read that?
     
  18. DarkArtJason

    DarkArtJason Member

    Joined:
    Aug 18, 2016
    Posts:
    15
  19. Tomás Abad

    Tomás Abad Guest

    Link is broken :(
     
  20. Tomás Abad

    Tomás Abad Guest

    Link is broken :(
     
  21. Still57

    Still57 Member

    Joined:
    Jun 23, 2016
    Posts:
    75
    Link fixed
     
  22. Tomás Abad

    Tomás Abad Guest

    Thanks a lot men.
     
  23. Voidiumz

    Voidiumz Guest

    Using AdMob to show ads in apps/games = FREE
    Using AdWords to PROMOTE your apps/games = PAID

    "AdWords billing currency: Select the desired currency. This is the currency you will use to pay Google if you decide to use AdWords to run paid campaigns. It can't be changed later."
     
    Last edited by a moderator: May 29, 2017
    TibiSoft likes this.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice