Adding subscriptions to your android app. Part 1. The UI
Tags: android, mobile, kotlin, tristan
Published: 2023-03-08 21:11:48

### Table of contents
1. [What we are doing](#building)
2. [GitHub code](#github)
3. [YouTube version](#video)
4. [Don't make my mistake](#mistake)
5. [Rules for UI](#rules)
6. [The UI](#ui)

### My app on the Google Playstore
- [HERE](https://play.google.com/store/apps/details?id=com.elliottsoftware.calftracker)

### GitHub code <a name="github"></a>
- [HERE](https://github.com/thePlebDev/CalfTracker)

### YouTube version <a name="video"></a>
- [HERE](https://www.youtube.com/watch?v=kQdRLo1z3Bg)


### What we are doing <a name="building"></a>
- So I want to add a subscription to Android app, which can be found [HERE](https://play.google.com/store/apps/details?id=com.elliottsoftware.calftracker)(I don't mean to brag but I have 3 active users now). As it turns out the documentation is a little confusing and even now I am still confused on how to implement everything. However, this series will document everything I go through to get an active subscription and hopefully make my app profitable.

### Don't make my mistake <a name="mistake"></a>
- If you are just starting out READ [THIS](https://developer.android.com/google/play/billing/getting-ready#products) DOCUMENTATION FIRST!!!!!!!!!!!!!!!!!. You need to integrate the `Google Play Billing Library` and then release your app before you can start building subscription.

### YOU BETTER READ THIS
- READ [THIS](https://developer.android.com/google/play/billing/getting-ready#products) DOCUMENTATION FIRST AND INTEGRATE THE `Google Play Billing Library`..... or else you'll end up like me and have a UI built before getting the functionality working(not ideal)

### Rules for the UI <a name="rules"></a>
- When building the subscription UI there are a few rules we must follow. A list of all the rules can be found [HERE](https://support.google.com/googleplay/android-developer/answer/9900533#zippy=%2Cexamples-of-violations):

`1) Must be transparent about the offer :` This includes being explicit about your offer terms, the cost of your subscription, the frequency of your billing cycle, and whether a subscription is required to use the app. Users should not have to perform any additional action to review the information.

`2) Subscriptions must provide sustained value : ` subscription may not be used to offer what are effectively one-time benefits to users (for example, SKUs that provide lump sum in-app credits/currency, or single-use game boosters). Your subscription may offer incentive or promotional bonuses, but these must be complementary to the sustained or recurring value provided throughout the life of the subscription. Products that do not offer sustained and recurring value must use an in-app product instead of a subscription product.

`3) Clearly disclose how to cancel :` you must ensure that your app(s) clearly disclose how a user can manage or cancel their subscription. You must also include in your app access to an easy-to-use, online method to cancel the subscription. In your app’s account settings (or equivalent page), you can satisfy this requirement by including: A link to Google Play’s Subscription Center (for apps that use Google Play’s billing system);

### The UI <a name="ui"></a>
- Ultimately I have created a very bad looking UI but I believe that it satisfies all the rules Google specifies
- Default Free version:

![Subscription UI](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/roba84516bjf0y6ckcpw.png)

- Premium version:

![Subscription UI](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x8o2rk6dy0a8u8pv216e.png)


###Conclusion
- Thank you for taking the time out of your day to read this blog post of mine. If you have any questions or concerns please comment below or reach out to me on [Twitter](https://twitter.com/AndroidTristan).