My app has in-app subscription purchases but I am feeling really confused regarding the whole implementation process.
When the app opens I am calling onPurchasesUpdated(int responseCode, @Nullable List<Purchase> purchases)
to check if the user has any active purchases. If the purchase list is null, the app assumes the user has not purchased anything.
Later when user decides to purchase something app calls:
mBillingClient = BillingClient.newBuilder(view.getContext()).setListener(new PurchasesUpdatedListener()
Once the purchase is made again onPurchasesUpdated(int responseCode, @Nullable List<Purchase> purchases)
is called, however, once I reopen the app nothing works, its all back to normal (free version) like user purchased nothing.
Also, user purchase data wasn't stored in the cloud (firebase real-time database). Already three users have made their purchase and it's in Three Day Trial period.