简体   繁体   中英

How do I add in-app purchase to a published app in play store and test it before going into production?

Before asking this question, I have read the developer notes on android developers site and also watched the Google IO video. I have also seen the question posted on SO. Since the question has been asked long ago and its answers are also pretty aged, it doesn't answer my doubts reason being Google has changed quite a few things related to In App Billing and its testing.

I am planning to add in app purchase to my app which I published long ago in play store. I wrote the code of in app billing V3 ytaking help from TrivialDrive example. I have few doubts on how do I proceed further for testing:

[Question]

  1. I have read that I should upload the new apk which includes in app billing code and permission to play store's in-app products . Won't that make the upgrade available to all the users using previous version of app? Once I upload the new apk with in app billing feature, it would replace the older apk in production, right? If yes, how do I make sure the upgrade goes to production only when I am done with testing?
  2. When I click on button for in-app purchase, it displays an alert dialog with following error:
    Authentication is required. You need to sign in to your Google Account.

You can upload it to the Alpha or Beta channels first. Add yourself as a test user so you'll be able to make test purchases. When the version on the Beta channel will be ready, you can make it the production version.

If you choose to upload it to the production, you can choose not to publish it, but save it as draft, and you'll be able to test it.

Authentication is required. You need to sign in to your Google Account error comes when you have not downloaded the app from playstore(ie you are testing via IDE).

You can test in app purchases via alpha beta channels from your dev console as told by Udi I.

Additional points:-

Keep in mind that for every real/succesful transaction/purchase Google takes 30% of the fee.

You can re-imburse/cancel the transaction to the user in the first 15 minutes.

User can restore the purchases within 15 Minutes, or the in app purchase amount credited to you will get deducted if the user immediately un-installs the app after doing the transaction.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM