Reputation: 45028
I have two apps to which I'd like to add in-app billing. I've never used IAB before so I'm just piecing it together.
I'd like to use one IAB in way that a purchase in one app also counts as a purchase in the other app. My apps are very simple and don't use any server backends.
Here's a scenario that illustrates what I'm trying to accomplish. A user using app-A makes a purchase to remove ads. If he also has app-B installed, the ad-removal purchase in app-A would remove ads in app-B.
Looking at the IAB docs, it seems that an application can make API requests to check for purchases but I'm not sure if an IAB account is tied to a particular APK.
In case this isn't possible, what would be a way to share an IAB purchase across multiple apps?
Upvotes: 2
Views: 925
Reputation: 39836
I just double checked on my app that have IAP, and yes, the items are directly tied to the actual APK, so you wouldn't be able to define 1 IAP in Google Play and have both apps use it.
As possible work around I'll suggest you:
a different approach from ContentProvider could be done with UID manifest (How do I create a "Licensing add-on" for my Android application?), or also with bound services, probably needing to use some AIDL (http://developer.android.com/guide/components/aidl.html)
all of those approach would have the downside that the user would always need the app that he original purchase the IAP from installed for the other to find about it.
A completely different approach is to have a "license app" that is a normal paid app that is the license for both apps A and B.
Upvotes: 2