I've been implementing an inapp-purchase solution using the google iab v3 api, and it works perfectly when buying items on one device, but I have stumbled upon one problem.
If a user has several devices on which he logs on with the same account and uses my app I would expect to have the function billingService.getPurchases(...) return the same list of purchases.
This is not the case, if I make different purchases on two devices the list of purchases is (randomly) updated on each device.
My best guess is that this is related to the fact that the google play billingService does internal caching? But if I try to buy one item already bought on another device I get the error: "You already own this item", but the list/cache is still not updated.
Is there anyone with similar experiences?
Do you know if it is possible to force the billingservice to update against the google server?
Is there any known schedule on when the billingservice updates the cache?
Thanks
Bernt-Johan
Simple solution is to launch the Google Play Store App, the internal cache should then be updated.
Related
I have some troubles about using in-app billing library v3 in managed devices using android enterprise
In my public app I have two sku objects (subscription items) to be purchased, those objects should load as alert dialog when the app starts, but currently any sku object doesn't load, checking logs I found this message: Google Play In-app Billing API version is less than 3
Doing a research about this issue, I found that probably it could be that there is not account signed up on google play store, it make some sense, because android enterprise generates and signed up an bot account in every device registered, ex: android12312#android23131.com
Another possible solution is update de google play store app, but I'm not sure if I can do it, I suppose that android enterprise does it automatically.
Also, I tested public app in my personal device (it is not using android enterprise) and it loads sku objects correctly and this is reinforcing google's account theory.
Have you ever faced this issue before? I want to know how you solve it or any contribution is welcome. Thanks
I have an Android app that has several features available as in-app purchases. We have published the app on both Google Play and the Amazon App Store. We need to stop offering one of the features as of a certain date. However, customers who have already purchased the feature should be able to use it past that date, even if they install the app on a new device. They should also still be able to purchase other features.
I was thinking that we could simply update our app so that the UI offered no option for purchasing the feature in question. However, that would not prevent a user with an older version of the app from purchasing the feature. So it seems like in addition to removing the feature purchase logic from the app (but not the feature itself), we need to do something to turn off the purchase at the store end. But whatever that something is, it must still allow the app to check whether the user had previously purchased the feature.
I've been unable to figure out from the Google Play or Amazon App Store documentation how to set this up. My understanding, from what I've read, is that removing the item (from either store) will cause checks for previous purchases to fail. Is it possible to do what I've described? We need solutions for both stores.
P.S. I did find one related question on SO: Are Google Play in-app purchases still valid if the app or the product is removed? However, it has no answer and also is a little too narrowly framed. (I'm not assuming that the product has to be removed and I also need to know about the Amazon store.)
I was thinking that we could simply update our app so that the UI
offered no option for purchasing the feature in question. However,
that would not prevent a user with an older version of the app from
purchasing the feature. So it seems like in addition to removing the
feature purchase logic from the app (but not the feature itself), we
need to do something to turn off the purchase at the store end.
For Amazon Appstore, you would need to contact their support team to get the in-app item in question suppressed (it's not a self-service as of today). Once suppressed, that in-app item would no longer be purchasable. It would not affect existing users who purchased that item in the past.
When it comes to in-app purchase I always opt for implementing everything in my own server. when a user buys something, I instantly consume it and notify my server. Then instead of querying Google or Amazon, I query my own server which gives me a lot of flexibility. If I face something like your problem I just add few lines of code!
Since you already published your app this may not work for you unless you willing to force users to update the app to the newer version. (Hoping you can do that!)
You mentioned that you don't know what happens if you deactivate the product and there is no documentation, well you can try it on a test project and see what happens! It shouldn't be that hard. If that doesn't work as you expect there is nothing you can do, your logic is in your app and it's already published so...
I'm developing an Android app that's in beta that downloads music tracks from a separate server. To ensure that the app's purchase functionality is working correctly, I need to rescind the purchases (not just refund from the Dev Console), but the Play Store holds this locked up somehow so that I can't reverse Google Play's record of the purchase. So... my app can't return to the "haven't purchased" state. I've look everywhere for an answer to this. I can't believe that it's not a common issue, or maybe I don't know what exactly to search for.
TIA
Okay, something really dumb happened to my friend.
He submitted an Android application a few weeks ago that offers In-App Purchases to the user.
Now, he needed to update the .apk to fix a bug, but he actually lost the keystore that he used to sign the application the other day (what a dumbass...). He tells me it's definitely lost. He exhausted all options to find or restore it, but without success. So, as he understands, the only way to submit the update is to actually create a new application in the Google Play Developer Console. He is so dumb, I always tell him to do backups of important files, he just won't listen (wow, really, such a blockhead...)!!!! sigh...
Luckily, he only had a handful of users who actually purchased something in his app during that time. However, I would like to know (for my friend) if there is any way to transfer the In App Purchases from the same user from the old app to the new one, so that the users who bought something in the app and now want to update it, won't get punished for his stupidity and have to purchase the same items again....
AFAIK, there is no way to do that. The only option is to refund them and ask them to buy again in the new app. I believe refunding can be done by logging in to Merchant account.
Google Play does not provide any form of content delivery. You are
responsible for delivering the digital content that you sell in your
applications. In-app products are always explicitly associated with
one and only one app. That is, one application cannot purchase an
in-app product published for another app, even if they are from the
same developer.
And BTW, Does the app have any backend? Where in he saved data of all purchases made?
There are other queries on this, but none seem to provide the answer.
I am trying to implement in-app billing. Code in the real app is based on the dungeons code. I have to managed to get it all working fine on the test ids, but cannot get it to work with a real purchase id. I have:
Signed the app by exporting from eclipse.
Installed this version to the phone.
Uploaded same version to google play, saved it, activated it, but left it unpublished.
Created a managed in-app billing item.
Published that, although I notice that it does say 'item will only take on published state when app is published', no way round that as far as I can see.
Checked carefully that product ids match.
Added a gmail test account, made sure this is the primary account on the phone.
Waited several hours to make sure it gets propagated across all servers.
And all I get is 'item is unavailable for purchase'. It finds the item OK because in the background on the screen under the dialog is all the right info about it.
What is especially annoying is that the exact same billing code when built into a pure test app, does work, and I can purchase a real managed item. So I am sure the logic in the code is working. It just does not work in the real app with the real managed item.
I feel therefore that this must be some sort of fault with what I/Google have done at the developer console end, not in the app code.
Any ideas? I'm at my wits end with the whole in app billing system.
It was just time in the end.Took over two days to sort itself out.