• Hey! Guest! The 39th GMC Jam will take place between November 26th, 12:00 UTC and November 30th, 12:00 UTC. Why not join in! Click here to find out more!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Android IAP not working anymore

G

Gyppi

Guest
EDIT: A solution to this issue is available in the second post, hope it can help others :)

---------------------------------------------------

Sorry for the long wall of text but i wanted to specify everything I tried so far.


Hello,
I'm having issues updating an old game for Halloween, it seems like that the IAP system is not enabled. The current version of my game on the Google Play Store has working IAP (it was released in September 2015), I'm now using GM:S 1.4.1772 on Windows 7 64Bit (fully updated) and this is what happened in details:

I didn't change my game's code regarding IAP since the previous version, when I uploaded my new APK to the Google Play Console it told me that I needed to add the billing permission to my app. This is not mentioned anywhere in the IAP documentation of GM:S, instead it specifically says to activate the "Enable In app Purchases" checkbox in the App Purchases Tab of my game's Global Game Settings, but it's not there.

Searching the web for a solution, the only official page I could find is this: yoyogames.com/blog/373/gamemaker-studio-1-4-1749-update where it talks about an unspecified "Google/Amazon extension" which I should add, but it doesn't say how.

I kept searching and found some forum threads here on forum.yoyogames.com where other users had my same issue and they suggested to activate "Enable Google Licensing" inside the Extra tab of the Android/Fire tab in Global Game Setting, this prompted me to download an extension (besides the fact that the site didn't work as expected as it kept asking me to login continuously and it crashed few times), I succeeded in adding the extension and to upload the game to the Google Play Console, but that was the only good thing that happen.

With that extension in my game I'm prevented from testing it via USB as it keeps asking to connect to a wi-fi\mobile network only to then say that I don't have a license for the game and that I have to buy it from the store, disabling the extension and\or "Enable Google Licensing" prevents the game from being compiled or it crashes on launch. In order to test my game I had to wait for Google, 3 hours later, to finally send the APK I uploaded before, to me and my testers, and the IAP still were not working.

So I removed the extension, disabled "Enable Google Licensing" and I had to manually delete the cache folder from my HDD as even after using "Clear build" GM:S was still trying to compile the extension and obviously failing.

Right now I created a new empty extension and added the com.android.vending.BILLING permission, this is the only way I can both test my game on my phone and Google Play Console accepts the APK. When I test my game (by clicking on the green arrow or by compiling the APK to my phone via USB or even from a new APK uploaded to Google Play) the IAP are still not working. The IAP event is never triggered after iap_activate is called and a test of iap_status() returns "0". In the console I can read these lines:

I/yoyo (30296): checking 1 extensions for ad interface
I/yoyo (30296): BILLING: setupInAppBilling
I/yoyo (30296): Exception thrown trying to call method InitRunnerBilling on GooglePlayServicesExtension
I/yoyo (30296): BILLING: Google Play permissions not available, selecting NULL billing solution

So I guess that I need this GooglePlayServicesExtension, not GooglePlayLicensingAsExt? Where can I find it?

Other people on the forum said to enable\download Google Licensing and APK Expansion and to enable the bluetooth permission. I sincerely not tried all of this as it seems way too much unrelated stuff to IAP to be a real solution.


So I need to know what I have to do to re-enable billing in my app, adding com.android.vending.BILLING is not enough and using the GooglePlayLicensingAsExt doesn't solve my issue and it adds a lot of new issues.


Thank you in advance!
 
Last edited by a moderator:
G

Gyppi

Guest
SOLVED!

Great news, I found the solution: as I thought Google Licensing and APK Expansion extensions have nothing to do with the IAP not working, the extensions that you need are GooglePlayServicesIAPExtension and GooglePlayServicesExtension (I'm not 100% sure about the second one but it's not damaging so I'm going to leave it in my project, at least for now). To get these two extensions you have to go into your project's Global Game Settings, then on the Android \ Fire tab and then on the Social side tab, there you have to select "Enable Google Services" (this will prompt you to download GooglePlayServicesExtension) and "Enable Google IAPs" (which will prompt you to download GooglePlayServicesIAPExtension). Download them and include then in your project, you don't need any other extension or to edit your previously used game code!

Here's a visual guide:
ipas.jpg

I don't know if you also need an App ID, I had one and I typed it in the App ID box in this tab, if you need it, you can get it in your Google Play console.
Hope this will help until the official documentation gets fixed\updated!
 
Top