UpdatedPurchaserInfoListener
will work across platforms from the same store, meaning that if you have an iOS app, a macOS app, a tvOS app and a watchOS app, for example, UpdatedPurchaserInfoListener
will get triggered when there’s a purchase on any of them.
The same applies if you have multiple Android devices, for example.
However, crossing the boundary between Android and iOS, our SDK doesn’t have the ability to push information into the new devices, so the listener won’t automatically be called on an Android app when you make a purchase on iOS.
You can achieve this behavior, though, by sending a background push notification to devices of users who made a purchase, and then force-refreshing cache.
So, for example, if Alice buys a subscription on an iOS device, you can use webhooks to get notified on your server, and then push a background notification on Alice’s Android device that tells it that there’s new purchaserInfo available.
At that point, on the Android device, you’d call invalidatePurchaserInfoCache()
and then getPurchaserInfo()
. This would trigger a force-refresh on the Android device and get you the latest information, and it would also trigger the UpdatedPurchaserInfoListener
on the Android device.
Hope this helps!
Thank you for your detailed reply. We'll use the described procedure. But instead of notification we'll use Firestore to share the information across all systems.