- Home /
Restore IAP in Android using Prime 31
can someone please guide me how to restore purchases in android using prime 31.
What my basic understating is to get the list skus which player has purchased after he logs in with his account and restore them accordingly.
What I am not getting is how to get that list.
Answer by shivanshu · Oct 27, 2015 at 09:35 AM
call "GoogleIAB.queryInventory( skus );"//var skus=your IAP keys and in "queryInventorySucceededEvent" check the purchased non-consumable products as
foreach (GooglePurchase purchase in arg1){//where arg1 is first parameter of method //"queryInventorySucceededEvent" debug.Log(purchase); }
please tick right if its working for you.
@shivanshu for this you given good idea. Thanks for this :) Its working on my end.
Hi, Here are my development flow of in app.
I am using unity5.4.0f3 unity personnel version.
openIAB plugin version is 0.9.8.6.
In ios working O$$anonymous$$. Getting problem with restore purchase in android.
Testing account is added in test account in alpha test in google play developer console.
App installing with the same account in android device which is added in google play console.
Android manifest file version is O$$anonymous$$ and also BILLING activity added, checked and tested
Purchasing test order say "You will not charge for test account" etc, and successfully purchasing app. Setting preference But,
When uninstalling app and reinstalling again with same account,
Calling private void OnBillingSupported() { Debug.Log("Billing is supported"); OpenIAB.queryInventory(new string[] {"premium_version_no_ads" }); }
Also getting response -private void OnQueryInventorySucceeded(Inventory inventory) { if (inventory.HasPurchase ("premium_version_no_ads")) { } }
But not getting any previous purchase detail using GETPURCHASE AND HASPURCHASE functions,
just getting inventory object response null.
Please help How to restore purchase in android ?
Thank you.
can you be more specific ??? there is purchase count log, and if purchase count>0 then iI need to check what 's been purchased comparing my store in app item id, how to do that ???