This PR adds a Sustainer IAP banner that is linked to an active Play Store subscription with Monthly and Yearly subscriptions.
Since we want to get it out relatively quickly, the implementation is a bit on a quick and dirty side :)
Subscription status sync between platforms will be added in subsequent PR.
How it works:
You can access Sustainer banner in sidebar or in the app Settings page.
Tapping on banner brings up the bottom sheet with various subscription duration options (we have Monthly and Yearly).
Tapping on the duration option brings up a purchase flow with corresponding duration and price.
If purchase is successful, you see a Snackbar with "thank you" message, Sustainer banner disappears from both Sidebar and Settings, and "Thank you!" banner appears in Settings screen.
If purchase has failed, you will see an appropriate Snackbar.
Test
Before:
Make sure you are logged in to the latest version of Play Store.
Make sure you are using release version of the app (or the debug version without .debug preffix).
Let me know what account you will be using for purchase testing so I can add it in Play Store. This will allow you to use test cards.
Subscriptions renew every five minutes. You can cancel them from Subscription screen of Play Store.
Testing:
Test purchase flow from sidebar with working test card. Confirm that after purchase is successful, "Thank you!" snackbar appears, Sustainer banner is not visible in sidebar, and black "Thank you" banner is visible in settings.
Test purchase flow from Settings screen with working test card. Confirm that after purchase is successful, "Thank you!" snackbar appears, Sustainer banner is replaced with "Thank you" banner in Settings screen and it is not visible in Sidebar.
Test purchase flow with failing card from both sidebar and settings screen and make sure error Snackbar appears.
Confirm that the subscription and banner visibility status remains the same after app is reinstalled.
This PR adds a Sustainer IAP banner that is linked to an active Play Store subscription with Monthly and Yearly subscriptions.
Since we want to get it out relatively quickly, the implementation is a bit on a quick and dirty side :)
Subscription status sync between platforms will be added in subsequent PR.
How it works:
Test
Before:
.debug
preffix).Testing: