Search code examples
androidgoogle-playgoogle-play-billing

When developing Google Play Billing Subscriptions. What is the trigger that puts the "In app purchases" section in the play store?


I am currently looking at adding Google Play Subscription (V5) to an application. But that app is in the store and does not currently have subscriptions. I do not want to prematurely add the "In app purchases" section in the play store until we are done with development on this feature. But, I also need to test Google integrations of this feature while developing it.

In app Purchases section (image taken from another app in the store)

I have already created a test app and I am now moving that code over to the actual app but, I am at the point where I need to activate the subscription to see it in the app. I am currently using the internal test track for testing this feature. While further work is done on the production track.

I'm afraid if I activate the subscription it will flip a flag in the Play Store and show that section.

Can anyone help me understand what actually adds that section to the play store app? and if possible provide a link that proves it.

===== I have tried looking for this question online but have not been able to pin point any answers.


Solution

  • TLDR;

    Edit: The answer that I came to after running a test: The "In-app Purchases" section in the Play Store shows as soon as you activate the Subscription in the Play console and have the Billing Library Dependency as a Dependency in your App on the Production track.

    Full Answer and how I came to that conclusion.

    After a bit more digging and still not finding a definitive answer with documentation stating how it works. I made a test, in this test I built an app and put into the play store. The only thing I added to that app was The gradle dependency line.

        // Billing
        def billing_version = "5.0.0"
    
        implementation "com.android.billingclient:billing:$billing_version"

    This is so that the Play Console's Subscription section is enabled and allows me to create and edit subscriptions.

    As soon as the app was published I opened the Play Store to check for the "In-app purchases" section and did not see one. enter image description here

    After that I open the Play Console and activated a subscription. ( Because the only way to query and test subscriptions during development is to activate the subscription in the play console. )

    After which I checked the Play Store again and I now see the "In-app Purchases" section in the play store. No further code has been written in the app to link to these subscriptions to the app.

    enter image description here

    https://play.google.com/store/apps/details?id=com.flesh.questions.whendoesitshow // Play store Link https://github.com/adfleshner/When-Does-it-show- // Github link with the code that is running in the store.

    Edit: If you remove the Billing Dependency in the app in the production track the "In-App Purchases" section is removed from the play store.

    After removing the Billing Dependency and only having it on the Internal Test Track. I could update the Production app without fear of adding "In-App Purchases" Section to the google play store.

    Production after adding billing code only to the internal track

    I then made an update to production the app(basically making sure that the section doesn't show up if any track has the billing dependency. The billing dependency needs to be on the production track) and did not see the "In-App Purchases" section.

    Only after finally publishing the app on the production track with the Billing Dependency and an active Subscription in the Play console did the "In-App Purchases" Sections show up.

    In short don't add the "com.android.billingclient:billing:X.X.X" dependency or code to the production track and if you have an active subscription in the Play console. Have that code on a separate branch. But, if you do add it, you can just as easily remove the dependency resubmit and "In-App Purchases" section in the play store will be removed. Then once you are ready to release resubmit it and the section will return.

    Sorry for the long answer but, I needed to make sure.