I'm having a little trouble with in app purchases. My app downloads a JSON file to get the skus of available products. That way I don't have to update my code when I add a new product. So when the user makes a purchase, it sends that sku to Google Play. That works. The question is, how can I retrieve the product information from Google Play to show the user the title and description of the products? I know you can export a CSV from Google play, but you have to be logged in to do that. surely there is a better way.
thanks!
Since end of 2012 Android supports the in app billing version 3.
Using this, you can simply run getSkuDetails with one or multiple SKU (your identifiers) and it will return you for example the price, title and description.
You’ll need to store the product information (such as name, description, etc.) on your own, either within your app or on an external server.
Related
I am trying to use the getSkuDetails() method to get the currency code: https://developer.android.com/google/play/billing/billing_reference. However the privacy_currency_code is always USD. I tried to things:
(1) VPN to another country from my PC and create a google account, then add that account to test device
(2) VPN the test phone to another country
But in both cases the privacy_currency_code in getSkuDetails is still USD, so why that happens? In the play store console the in-app product is marked with USD. Not sure if that's the cause. If that's the cause why it doesn't automatically convert?
In Play Console have you mark the SKU available for non-US countries? If not, then it defaults to US price.
Also, Google Play allows you to change the country but be aware there is a long cool down of 1 year
https://support.google.com/googleplay/answer/7431675?hl=en
Download a vpn, select another country in your phone and create a google account. (important to create a new account, otherwise google "knows" where you are from)
Go to settings, apps, google play, clear cache.
Open your app.
After changing your vpn to another country, clear play store cache. dont need to create one account per country.
First I had created one app, which I uploaded into the Play store with some price, and I got some downloads. Now I want to add in-app purchases to my app and I want make my app free.
If I update my .apk (with in-app purchase) into the Play store then it will send notification to the users who have purchased my app.
If they are updated then it will show in-app purchases also so they have to purchase some modules.
So I want to set in-app purchases as active for users who have purchased my app.
Is there a specific process for accomplishing this?
You can make a paid app be free
Is there a specific process for accomplishing this?
No, their is no official way to do this, Because In-App you have to add items on google play and its show to every user util he/she pay for that In-App Item.
but you can handle by your own way.
Like if user already pay then you have to hide in-app(or whatever your app flow) for that perticular user and enable that future for them.
So no need to pay again for same
in sort you can handle by JAVA code(because you have list of paid user)
If app have same package and current version is new then installed then its update app(make sure both version are signed with same certificate/keystore)
Important:
If you change an app from Paid to Free and save the change, the change is permanent. Once changed to free, the app can't be changed back to a paid app. If you want to charge again for a paid app that you’ve changed to a free app, you would need to create a new app with a new package name and set a price for the new app.
Android Developer Help
first of all you have to add vending inapp billing files in your package, then in manifest you have to give permission. thats from application side, now you have to configure product id and licence key. Below is very useful link which i also had applied, Hope it works for you too :)....
Sample Project && configuration
My little contribution is that setting the app to use in-app purchases is in the Content Rating (of all places) There is one checkbox!!! Lost an hour at least on this.
I have a question regarding in-app billing. I have a published app that currently offers a single in-app product. If I plan to add another in-app product, do I have to push an update? Assume that I fetch the list of products to display to the user from a private server.
Thanks,
Akshay
P.S: This is a hypothetical scenario, which is why I can't try it myself using a publisher account.
Actually, your application only needs to know the product's name to send the billing request, so I think there is no need to update your app on the market, if you have an option to fetch the product names from the server. It's just an assumption, haven't tried it myself.
I am currently working a setup for in-app billing on one of my applications. Is there a way to set up purchases without a product list on the Android Market side? Essentially, I want to do what I am allowed to do in most other merchant APIs, send the product name/id/PRICE/etc to the merchant and get back a response from them if the payment went through or not.
I have too many products to manually add each item to the Android Market Publishing area and want to send the user to the in app market request with a custom title, description, and price (most important), and have Android handle that.
Any ideas?
No you can't.
The reason for this is security. Someone could hack your app and add a new product/ change your product prices, but defining them on the market; they would have to hack your app and have your login for the android market.
I have a few questions connected to Android In-App Billing:
Is it possible to make a purchase from non-Market app? I understand that it would be a vulnerability, but I have no opportunity to find out if it's possible or not.
How can I get purchase state for a particular product? As far as I understand it can be done using RESTORE_TRANSACTIONS request, but it's not recommended to use very often. That's not a theoretical problem. My application allows users to buy content using in-app billing. Content can be downloaded from a server, and server must allow content downloading only if it was purchased. But it can't check if content was purchased or not without using signed response from Android Market.
How can I get price and description of an item from Android Market? Seems that I know the answer and it's "there's no way it can be done", but maybe I'm wrong. It would be very useful to have a possibility of retrieving item's price.
It's very interesting to me how you solved/are going to solve these problems in your apps. Answer to any of these questions will be appreciated.
In order:
1- Nope. The in-app billing process is part of Market. If the app comes from elsewhere, there's no way for Market to verify the origin/authenticity of the application.
2- It's your responsibility to store the purchase state for a particular product. From the doc:
You must set up a database or some other mechanism for storing users' purchase information.
RESTORE_TRANSACTIONS should be reserved for reinstalls or first-time installs on a device.
3- Unfortunately, at this time you're right. File a feature request!
In the meantime, one option is to set up a website with appengine, store listings of all your content & pricing there, and then manually sync prices listed on your appengine server with the updated prices in Market. Then have your Android app pull the data from the AppEngine server. This is much better than hardcoding price values into the app itself, since you don't need to have everyone update the app immediately to see accurate pricing whenever you change something. The only caveat of this method is that if the user is in a different country, in-app billing will display an approximated price in their native currency, and there's no way for you to determine exactly what price will be displayed to them.
Related, One of the Android Developer Advocates is giving a talk on LVL/IAP at IO, called "Evading Pirates and Stopping Vampires using License Verification Library, In-App Billing, and App Engine." - It would definitely be worth your while to watch when they release the session videos on the website.