UnityIAP Android restroing problems,UnityIAP doesn't call ProcessPurchase when session closed (App reload)
Our products are all consumable. When force terminating the app after PurchaseProcessingResult.Pending
is called, ProcessPurchase()
is automatically called after UnityPurchasing.Initialize()
If it doesnt', there are receipts infos at OnInitialized(IStoreController controller, IExtensionProvider extensions)
controller.products.all
and we are using them for purchased item restoring.
But the case when you leave the android purchasing screen (not clicking the purchase button)for a long time, our server judge as a time out and closese the session. After the purchase completed at the android screen, there is a LateUpdate()
function that detects the session closed, and reboot the app by loading the login scene with SceneManager.LoadScene()
. The android purchase sucesses, but it doesn't even call the ProcessPurchase
. The manager class that implements the IStoreListener
is a static singleton class, so it wouldn't bother loading a new scene. Then when we initialize the iap by rebooting the app, ProcessPurchase()
or OnPurchaseFailed()
aren't called, and also there are no receipt info in controller.products.all
so we could not restore them. We are now making the timeout time very long while purchasing to solve the problem. (doesn't think is a good solution)
The question is what is the exact difference of the case when the ProcessPurchase
automatically processes and not. Also, how we should handle it when ProcessPurchase
doens't automatically process and controller.products.all
doens't have any receipt infos.
Unity Version : 5.3.4.f1 IAP Version : 1.18
Your answer
Follow this Question
Related Questions
Android IAP in Thailand payment went though but no rewards 0 Answers
GooglePlayServices Conflict With Unity IAP 0 Answers
Button Disappears even when saving? 0 Answers
Unity IAP Conflict With Google Play Services 0 Answers
In-App Purchasing not initialized 0 Answers