Android: get in-apps list from Android Market - android

I'm implementing in-app billing for my app.
I've downloaded the sample application provided by Google Code, I've adapted it for my app and it works perfectly.
Now, I want to retrieve from Android Market the list of the in-apps published for my app and list them in my activity.
I need this because I won't publish my in-apps all at a time, but I want to publish some of them now, some of them next month and so on. I would like to avoid publishing a new apk version on Google Market as the people who downloaded the first version won't find the new available in-apps if they don't update their app.
Is this possible?

The In-App manager in the developer console does have an export to csv, so it is possible, in theory, to progmatically download the list. It would probably require you having to write to code to "log in" to the developer console, store the access token, and then download file. (I don't think it would be trivial)
Another approach might be to store the list on a common server that's easier to access.
In either case, you are left with having to find the optimal interval in which to check for updates to your products. ie, do you make the user wait each time you start the app, or do you have a manual action in the app where the user can check for updates.
Personally, unless your products are changing really frequently, I'd stick with the static list in the apk file. You are probably going to be pushing out bug fixes, so updating the product list in those times, wouldn't be an issue. As for notifying the user, they will get notified via the update manager that a new version of your App exists. If the release notes are interesting enough, users will update.

Related

Disable one in-app purchase as of a certain date

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...

Transfer In App Purchases from one app to another on Android

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?

How to test in-app-purchases easily, without publishing or signing it first?

Background
My app has some in-app billing (like this one), and I wish to test it out before publishing it.
I've watched some google IO lectures and read some articles, and prepared everything.
According to what i've learnt (talked about here), all I need to do is just add my email to the test accounts, and it won't be charged.
The problem
It seems that in the developer console, the in app items cannot be activated.
I think it's because the app isn't published yet, but that's the whole point of testing - I want to test the app before publishing it...
As I've also found out, in order to test in-app billing, I have to do a lot of things to take care of for making it work, also having many restrictions and annoyances:
sign the app and upload it to the play store . if you don't use a signed app, you get this message ("This version of the application is not configured for Market Billing...") .
make credit cards be used to the devices, even if they won't cost anything.
let others do the testing instead of myself, as my account cannot be used for that. not only that, but instead of adding exactly which you wish to add, you have to create a google group and there put the people who will be able to use the app, and all will have to have a google+ account... You will also need to wait some time till the testers will be able to use in-app-billing of your app and till then they will get an error "User is not eligible for this purchase" .
because of #1, I need to have some kind of mechanism to reset the purchases, within the app itself, but i also shouldn't forget to remove/hide this features for the end users, so that they won't reset it by mistake
because of #1, if I wish to be able to debug the app, I need to change it on the manifest, and choose to debug the app within Eclipse, and also remember to uncheck this flag before actually releasing the app.
since the app is on the play store, you cannot modify in-app purchases items (their Id for example), as opposed to many thing you can modify before publishing the app. It's no longer a development as flexible as it can be using simple development. It's like your app should be sealed with what you choose even though you haven't published it yet.
The question
Why is it this way?
How come there isn't a simple way to allow to test the in-app-billing ?
How would you deal with the problems I've written about?
Is it possible to test the in-app purchases before the app is published?
How come I can't use my own google account ?
Also, suppose I do make a (fake) purchase, how do I reset it (all/specific purchases) in order to check it out again? Is it true I can't do it anywhere besides the app itself?
Am I missing anything?
you dont have to publish the app inorder to test it all you have to do is upload the apk to your developer console, just dont publish it. If your account is linked to your developer console you cannot use that account and have to create a test account to test the IAP's
You will have to public the app but publish in beta mode so that you can test the in app purchases. Beta mode will enable to test the functionality with limited user set.
Yes, you can test your app without publish (and without publish in beta mode too). There are instruction http://developer.android.com/google/play/billing/billing_testing.html#billing-testing-test. Please remember that after 1 point it's maybe need to wait about hour or two.
It seems that in the developer console, the in app items cannot be activated.
it's ok, just check that you mark it as active. It look like not active before you publish the app, but you can test it.
I can use my own google account, right?
I strongly recommended have additional account only for test purchases.
Also, suppose I do make a (fake) purchase, how do I reset it (all/specific purchases) in order to check it out again?
You'll must to fill billing information for your test account. But when you make test purchase, there are no any real money transaction. Every in-app can be tested once again after the app consume it.
I'm also working on how to test In-App-Billing for Android in best way since days.
With real transactions to me it seems to be really too complicated and a lot too much effort. So i'm currently thinking of 'only' testing this stuff with static responses (http://developer.android.com/google/play/billing/billing_testing.html#billing-testing-static).
In theory i guess once this works, it should also be fine in production as in the source code only the SKU id gets changed for live release..

Google Play - update an unpublished app for existing users but not new users?

I have an unpublished app on Google Play which I want to update for my existing users, but not let new users download it.
The Google Play documentation seems to be saying that this can be done by simply uploading an updated apk (and not re-publishing the app):
Unpublished Apps
Existing app users will still be able to receive app updates, even if you unpublish your app. If you don't want new users to find and download your app but still want to provide updates to your existing users, set your app to Unpublished in the Developer Console.
https://support.google.com/googleplay/android-developer/answer/113476?hl=en
But it seems unintuitive that an "unpublished" application would work that way. If the documentation is correct, how does Google Play tell the difference between an 'existing' user and a 'new' user?
Just a follow up: pushing an update to the unpublished app does make the update available to existing users only, but the app does not update automatically for these users. They must browse to the app page, where the app will have an "Update" button which can be triggered manually.
(This is just speculation, I'm not affiliated with Google in any way or anything)
The existing user probably has the app associated with the Google account they use to log in to the Play store.
If you look at your own profile in the store, there's a list of all the apps you've ever installed. I'm guessing the update would be available only for people who have your app in their lists, and the app will still be invisible for new users.
Whenever a user that has the app installed wants to update it, he requests an update of the app, it's different from re-installing the app as data from the app (a save from a game, or some saved preferences etc) are kept untouched, google play can easily detect that since it can detect what apps you have installed.

Allow users to download your own paid app for free in Android

I have a paid app in the Play Store (Profile Widget, in case anyone is wondering ;)) and I want to allow some users (friends, or people who do not have a credit card) to download it for free.
Of course I could just send them the APK, but they wouldn't get the updates automatically, and with every update to the app I would have to send them all the APK file again. And also, by using this method, anyone that had access to the APK file would be able to install the app for free.
I saw that by using the Android Licensing Library you could make some users bypass the License Check, but I want the app to show as "Purchased" for them in the Play Store, and I don't think this would do it.
I searched Stack Overflow but none of the solutions I found (like creating a separate APK and checking for its existence from the "real" app) handled the auto-update part.
Has anyone found a good solution for this?
Thanks in advance!
You can now generate and distribute promo codes to current and new users on Google Play to drive engagement. Under the Promotions tab in the Developer Console, you can set up promo codes for your apps, games, and in-app products to distribute in your own marketing campaigns (up to 500 codes per app, per quarter). Consider using promo codes to reward loyal users and attract new customers.
Reference:
1) http://android-developers.blogspot.in/2016/01/create-promo-codes-for-your-apps-and-in.html
2) https://support.google.com/googleplay/android-developer/answer/6321495
The best solution is to have them buy the app, then refund their purchase. It would still show up as paid. Alternatively, you could give them the app, and license it via the LVL, and configure their email addresses as test accounts listing as purchased., but then they won't get updates.
I have the same problem, I've checked and from what I can see there is no analog to the Apple system (Give out a one-use code to download the app).
If you just give them the APK you don't get Crash/ANRs from them and they won't automatically get updates.
It is something that Google really do need to fix, sorry there isn't a better option.
(I have the same problem for my own device (you can't buy your own app), I had a crash that was rare in the app on my own phone, but I couldn't reproduce it at a computer and the logs had well cycled past the error by the time I did, Being able to get the crash report through the developer console would have saved me a lot of mucking around)
this is an updated and no credit card method.
You can create a free version of the same app in the play store,
but publish it in alpha release.
Then, you can create a google+ provate group of alpha testers and set it as the tester group for the alpha version.
Now add the 'free licensed' users to the alpha testing group and they have your free app.
To push updates, you will have to upload updates also to the 'free alpha', that's not gold, but I think is pretty close to the best you can get at the moment
This method has an issue. As long as licensing is per-App, you will have a different license key, and it may always return TRUE, so if the users share the apks, they may be able to let other people use the app, not totally sure about this occurrence, but you are warned, better if you are sharing the free app to trusted users.
You can set up a sale at price zero for the paid app and let your contacts know about it. Google allows up to 8 days of the sale at a time, but you can also set it up for a single day. This way, you may still get a few downloads from unintended recipients, but the 'problem' will be far more controlled than if you were to mail out APKs. Other problems like updates are also solved automatically.
You can upload in third party app stores like Amazon App Store, Aptoide , www.proapk.in to allow users to download paid Android apps for free.
For downloading the app as a developer: Google Playstore's official word on this, is that you must create a 2nd google account to download the app you are listed as developer for. That way the stats for downloads and terms are not breached. Spoke about same issue today (though its a while after the question was posted, others should see this with similar issues)
For giving it away free: Can't you just change the app to free at a given time then notify those people to hit it during a certain window?

Categories

Resources