How do I Restore Purchases for In Game Currency using IAP?

Get help using Construct 2

Post » Sat Apr 16, 2016 1:13 am

HZGaming wrote:@Wishy that sounds like it would work but how would I test if its a new install or not?


Hi HZGaming,

the best way in my opinion (requires some knowledge in with AJAX plugin, also MySQL and a little PHP is needed) is, building up your own little framework/api where a user has the option to register (not speaking of Facebook - or something you dont want to have :P ; Username & PW is totally enough.. maybe an optional mail-address for beeing able to recover his password). This enables such great ways and features to extend an app (having the same savegame on different devices, etc.).

I think in any way you should head for some webstored data (speaking of MySQL, PHP-to-TXT-Scripts, etc.). When I read "Restore purchases" I understand "restore them under any circumsances", meaning: even when flashing a new ROM to your device or changing it (after a guarantee repair, for example), I am able to restore them.

An another way could be including Google Play services into your project (there are plenty tutorials in the forums/tutorial-section for it) - but even then, if you want to cover all scenarios of loosing data, you have to store things externally of a device (where MySQL comes back again ;D).

Good luck with your project and have a great weekend,
Proxy
B
24
S
14
G
9
Posts: 118
Reputation: 6,794

Post » Sat Apr 16, 2016 4:02 pm

HZGaming wrote:@Wishy if I set IsFreshInstall to 0 on start of layout and then tested if it was equal to 1, wouldn't it always be equal to 0 making it impossible to restore purchases? For instance, I'm saying If IsFreshInstall is 1 and On clicked button then restore purchases but IsFreshInstall is always 0.

Well you put your restore actions there before you set it to 0.
I also said you'll have to save it into your localstorage.
B
25
S
11
G
9
Posts: 136
Reputation: 6,657

Previous

Return to How do I....?

Who is online

Users browsing this forum: Cubus32 and 4 guests