19

We have an Application which utilizes In App Billing. The problem that we're seeing is as follows:

When the versionCode of the App on the device is the same as the version code of the Application published in the Play Developer Console, Billing works fine.

When a build with a higher versionCode is uploaded to the Play Developer Console, In App Billing stops working on the App on the device (with a lower versionCode) saying that "The Application is not configured for Billing".

This is fine, when testing, but the question is - what is the behavior when the App is in the Google Play Store? When you replace the Application (to perform an update) does the Application that's in the wild (with a lower versionCode) stop working with In App Billing?

If so, what approach do people use to performing updates? Do you force the user to update before purchasing? Or is this problem only true prior to publishing?

Any advice would be greatly appreciated!

Thanks!

Chris Maddern
  • 737
  • 5
  • 12

1 Answers1

9

As long as the "newer" apk that you upload is signed using the same key as the existing one then you shouldn't run into any problems.

I have just tested running my app with a previous version (version code is lower) and in app billing still works.

The caveat is that you must not delete the apk from the market, simply deactivate it.

But what you say about forcing updates, I do prompt the user to update when they open the app regardless.

You may have already read it, but here is the official info on multiple apks.

melodiouscode
  • 2,105
  • 1
  • 20
  • 41
  • interesting that someone has down voted all the answers on this question! – melodiouscode Aug 14 '12 at 12:10
  • 1
    No comments from that particular person either? – Nate-Wilkins Aug 14 '12 at 16:16
  • Looks like it. Don't you just love it when people do that! – melodiouscode Aug 14 '12 at 17:59
  • 2
    "I have just tested running my app with a previous version (version code is lower) and in app billing still works. The caveat is that you must not delete the apk from the market, simply deactivate it." So - to be clear, you have a later version e.g. versionCode 2 in the store, and then loaded up versionCode 1 on a device, and it successfully purchased the IAB item and the receipt validated etc..? If so.. that's the answer!! – Chris Maddern Aug 14 '12 at 18:25
  • 1
    Chris, that is exactly what I am saying. My "live" version (aka the one marked as active in the market) is version 17 currently, I installed the signed APK for version 16 (I keep all my versioned APKs) on my device and was able to complete an in app purchase and successfully validate that purchase. But please note that the version 16 APK still existed in the market, it was just "inactive". – melodiouscode Aug 14 '12 at 19:40
  • Great - thanks. I've marked it as the answer and given you the bounty :D – Chris Maddern Aug 16 '12 at 13:27
  • Wow, that is a huge "gotcha." Just imagine if someone has lots of users and updates the APK while deleting the old one. IAB would become non-functional for ALL users until they updated. GP ought to warn about this. Thanks for the vital info! – Carl May 01 '13 at 01:45
  • Oh, wait - judging from the dates, this info is for IAB2, not IAB3. I wonder what the story is for IAB3? – Carl May 01 '13 at 01:52
  • 1
    Indeed this is for IAB2, however I believe the same applies to IAB3 (but I have only published two versions since converting to IAB3) – melodiouscode May 02 '13 at 12:18
  • @jamesakadamingo, if you have published two versions, then wouldn't this issue have come up when you published the second one? Did you have a test device with your old version on it and did it still work after you uploaded the new one? TIA. – Carl May 29 '13 at 12:43
  • Carl The version in of the app in question is actually a little more complicated. I have a v1 app that was written by another developer (before I joined) that had a few "releases" using version ids 1,2,3 etc. I also have the v2 app that applies to gingerbread and better devices using much higher version ids. Regardless each apps iab still works. To answer the Dev device question, I keep all my signed apks and use the adb install command to force them onto a device so that I can test older versions, upgrade paths (v1>v3 etc), and the like. – melodiouscode May 29 '13 at 17:10