Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / GetInAppPurchaseAvailable ( iID ) and google IAP

Author
Message
smallg
Valued Member
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location: steam
Posted: 23rd Dec 2017 19:49
i set up my first in app purchase and it works fine (for the actual buying part) but i noticed that the command GetInAppPurchaseAvailable ( iID ) crashes the app if you try to use it right away (took about an hour or 2 for the app to not crash instantly if calling the command - following the example code as a guide causes the app to crash instantly on successful purchase), i assume there is a delay in google updating the records for the command to return a valid result... now my question is then; how have you (those of you who have used IAP) coded your app to confirm a purchase was completed correctly if the command isn't working?
the code i used is basically exactly the same as the example code (except im using android instead of ios).
example code

basically i have a button set to purchase the removal of ads so i need to check the command when the app loads so i know to show ads or not.

as i say, the app is working fine now that it's been a couple hours since the crash (the crash happened in 2 apps and 100% of the time so it's not a one-off - no changes made in this time so i know i didn't "fix" it), but obviously it's not ideal to make users wait hours to play after they just purchased an item, hopefully this is something that can be fixed in a future update
life's one big game
spec= 4ghz, 16gb ram, AMD R9 2700 gpu
smallg
Valued Member
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location: steam
Posted: 27th Dec 2017 09:37
Nobody else have any experience with this?
life's one big game
spec= 4ghz, 16gb ram, AMD R9 2700 gpu
MikeMax
AGK Academic Backer
12
Years of Service
User Offline
Joined: 13th Dec 2011
Location: Paris
Posted: 27th Dec 2017 12:41
I'm using it on android and i haven't see any problem. it seems you're using it in the good way (with the loop check for getInAppPurchaseState()) .

I'm calling the Setup (with the InAppPurchaseSetKeys, InAppPurchaseSetTitle and finally InAppPurchaseSetup() command) at the beginning of my game.

are your google play services up to date on your devices ?

Login to post a reply

Server time is: 2024-04-19 18:42:49
Your offset time is: 2024-04-19 18:42:49