Open djrain opened 1 month ago
@djrain https://developer.android.com/google/play/billing/integrate#ooap Now that the purchase update functions work like coroutines, you don't need to call them separately. They work all the time. To check the current status of purchases, it is enough to call the function:
queryPurchases(productType: String)
productType: "inapp" for products or "subs" for subscriptions.
Handling purchases made [outside your app](https://developer.android.com/google/play/billing/integrate#ooap).
If the application was launched, restarted, or at any other time, just call it and all current purchases will be received in the query_purchases callback.
I see what you're saying, I think, it's just that the linked docs still instruct to call queryPurchases()
in onResume()
to catch updates that happened while in the background, and currently it's not clear how to handle this in Godot. I suppose one could detect returning to the foreground with NOTIFICATION_APPLICATION_FOCUS_IN
, but this notification was only added in Godot 4.3, and even then I'm not confident if that's quite the same thing as onResume()
. Even if just for parity between our code and the official docs, I think it would be nice to have this signal like the official repo does, if possible
Hey, thanks for the updated plugin! The only issue is that I don't see an equivalent function to
_on_billing_resume()
as in the official repo:Or perhaps this is handled automatically?