Android: how to update Android app using inapp binary?

Another way to ask a question: how to make inapp billing to work with all versions of my application?

I have an inapp billing application. I want to update it.

My active apk on the developer console is in version 1. My problem is this:

  • When installing my updated application (signed package) in version 2 on my device using adb, I get the following message: "This version of the application package is not configured for billing in the market"
  • when installing my updated application (always signed package) in version 1 (the same version as on the console) on my device (which I cannot do on the console ... I need to increase the version number!) using adb, everything works ...

Therefore, it seems that inapp-billing only works with one version of the application: the one that is active in the console. I assume that my users will have the same problem: only users with the latest application update will be able to perform inapp billing ... others will get an error.

Does anyone know how to solve this problem? How can I make sure that all my applications already installed in the world can do inapp billing regardless of version number?

Thanks!!!

+6
source share
3 answers

By "console" do you mean your publisher account?

I think this is not a mistake, but a design feature. If you try to make a purchase that does not have one of the 4 elements of android.test.* , And it launches a debug version or even a release version newer than the one you published, you will get this error:

enter image description here

For example, if you use Release mode on your device, which has one version higher than the market, and you are trying to purchase a real element (not a android.test.* ), You will receive the above error.

For further clarification: if you run an application with a higher version of the code than the one specified on AndroidMarket (with the same package name, of course), you will be able to β€œmake a purchase” if you use one of 4 android.test.* Identifiers of elements.

Please note that this is based on my own experience and observation, as the full documentation on this subject leaves much to be desired.

+6
source

i encounters this error. Solution: Download the apk sign and check your product ID: com.test.purchased and configure it as a product in the application. (1) Runs on your mobile phone using export with apk sign. (2) if an error occurs, then wait 1-2 hours, because someday Google will respond late.

0
source

Here is what I observed when using In-App-Billing.

  • When you download apk release (regardless of Alpha / Beta / Production), IAB will not work right away, you will have to wait a few hours before it can work.

  • Downloading a new apk version (higher version) will also be the same. You will have to wait a few hours for it to work eventually. The old version with IAB will still work. What I usually do is download my apk version as a beta, wait a few hours, and then when it is already working, push the apk to production.

0
source

Source: https://habr.com/ru/post/901320/


All Articles