I am planning to publish an application with in app billing functionalities. I haven't released the application itself on the playstore yet, but I've activated the in app products. Now when trying to access them via my phone, I get the typical in app purchase window, but saying:
The article You wanted to buy couldn't be found.
Do I have to first publish the application to get the in app billing working or is there some issue with my application?
Some time ago Google made some changes to the testing of In-App purchases. Now you need to publish your application first in order to test them. Luckily it's enough if you publish your application as an alpha-version.
Note: You can do end-to-end testing of your app by publishing it to an alpha distribution channel. This allows you to publish the app to the Google Play store, but limit its availability to just the testers you designate.
Read more in the docs (Testing In-App Billing).
Related
From what I understand reading This link. It appears to me that the only way to test in app purchase is to write the complete code for in app purchase. And then do a proper build. Upload it to beta release. And then download the app via the opt in link.
But how do I develop it in the first place? Am I expected to write some lines of code and then do a build and upload it? That is a huge turn around time. Is there no way for me to have some test account that I can sign in go google play (on phone) with and then just make purchases?
Currently, my code already handles the products
android.test.purchased and android.test.canceled. How do I make it so that I can test my own products Ids? Currently it just says the product you are requesting is not available.
Google allowed to test your in app purchase in for dummy products like you mentioned android.test.purchased. To test real products you must have to deploy application in beta release at least. Following article will help you in detail :
An Android Studio Google Play In-app Billing Tutorial
Hope it will help.
You need to publish your application in beta version in play store to review the application. Without reviewing your application, you cannot test app purchases. After the review you can test your application without redeploying it to play store.
Before asking this question, I have read the developer notes on android developers site and also watched the Google IO video. I have also seen the question posted on SO. Since the question has been asked long ago and its answers are also pretty aged, it doesn't answer my doubts reason being Google has changed quite a few things related to In App Billing and its testing.
I am planning to add in app purchase to my app which I published long ago in play store. I wrote the code of in app billing V3 ytaking help from TrivialDrive example. I have few doubts on how do I proceed further for testing:
[Question]
I have read that I should upload the new apk which includes in app billing code and permission to play store's in-app products. Won't that make the upgrade available to all the users using previous version of app? Once I upload the new apk with in app billing feature, it would replace the older apk in production, right? If yes, how do I make sure the upgrade goes to production only when I am done with testing?
When I click on button for in-app purchase, it displays an alert dialog with following error:
Authentication is required. You need to sign in to your Google Account.
You can upload it to the Alpha or Beta channels first. Add yourself as a test user so you'll be able to make test purchases.
When the version on the Beta channel will be ready, you can make it the production version.
If you choose to upload it to the production, you can choose not to publish it, but save it as draft, and you'll be able to test it.
Authentication is required. You need to sign in to your Google Account error comes when you have not downloaded the app from playstore(i.e. you are testing via IDE).
You can test in app purchases via alpha beta channels from your dev console as told by Udi I.
Additional points:-
Keep in mind that for every real/succesful transaction/purchase Google takes 30% of the fee.
You can re-imburse/cancel the transaction to the user in the first 15 minutes.
User can restore the purchases within 15 Minutes, or the in app purchase amount credited to you will get deducted if the user immediately un-installs the app after doing the transaction.
I was working on in app billing last time about 1 yesr ago. In that time to test in app billing I was need to setup tester account, upload application in draft mode and publish purchases.
Since then Google added "sandbox" mode (which allows to test purchases without money transactions) and I want to use it. I've read documentation but for me it's parts contradict each other.
Here it says that I only need to upload the app (nothing about publishing), add purchases and test accounts. Which is similar to the old mode. But it also says that alpha-testers WILL pay money for purchases.
Here it says that "draft" mode is unsupported so I need to publish my app to Alpha testing. Nothing about setting up alpha-testers list.
So my question is if I need to publish my app to alpha-testing mode to test purchases without money transactions?
P.S. Can I still use IABHelper from demo application? Examples in the documentation doesn't use it anymore.
UPDATE Docs says that purchases may be published before the app. But developer console says that purchases will be activated only after application is published.
You need to publish to alpha or beta (which won't be visible to the public). You do not need to publish to production
What I do is publish to beta with an .apk and install that same .apk on testing devices via side loading (no downloading and installing from the playstore when in beta)
You don't need to publish your app... you can keep it unpublished but you've to upload apk there..
I am going to be supporting In-App billing/ purchases in my app.
From what I have read, it seems the Play Store app must be installed on the device in order to do In-App billing. I have 2 Android devices for testing. Both are missing the Play Store app. I am sure this situation will exist for users of my app.
Question: What does an Android developer do when their app supports In-App billing but the Play Store app is not installed on the device?
As far as I know, there is no way to do a market payment if they do not have the market.
You could see if the market is installed and if not, either provide a clear message saying so, possibly with instructions on how to get it, or link to some other payment method like paypal in a web browser.
I have an Android app that uses In-App-Billing to sell Account Managed Items.
I tested the app with the static response IDs and everything seems to work. I now want to test the app with real product Ids.
I created the app in the Google Play Store and uploaded a draft version of the app with the correct permissions. I now created an In-App-Billing item and published the item.
At the moment the app is unpublished. The item is created and published and I have a test account that is registered in the profile of the developer account and is the only account on the device that I use for testing. The app is signed with the same key as the uploaded draft. Edit:I'm testing with Android 4.1 && 4.03 at the moment
If I try to buy the item the Google Play Store pops up but shows a dialog with the following method: The item you requested is not available for purchase.
How can I test buying the item without publishing the app?
When you test the app, make sure you have exported and correctly signed it (not using debug key). Also make sure that you are using the correct Google account (registered test account) on the device.
Additionally, the registered test account cannot be the developer account.
Apart from this, it should work fine.
Note: Testing your own in-app purchases does require a valid credit card and actual payment.
And finally, it currently takes a few hours for market edits to propagate through the servers and show up.
It may take some time to reflect the changes on google play if you just uploaded the app and added the item there wait for some time near about 2 hr. it will be shown the item you want to purchase.
For others who reach this thread, Now it's not possible to test In-app billing with just a draft version of the app.
Draft Apps are No Longer Supported
Previously, you could publish a "draft" version of your app for testing. This functionality is no longer supported. Instead, there are two ways you can test how a pre-release app functions on the Google Play store:
You can publish an app to the alpha or beta distribution channels. This makes the app available on the Google Play store, but only to the testers you put on a "whitelist".
In a few cases, you can test Google Play functionality with an unpublished app. For example, you can test an unpublished app's in-app billing support by using static responses, special reserved product IDs that always return a specific result (like "purchased" or "refunded").
for details read https://developer.android.com/google/play/billing/billing_testing.html#billing-testing-test
You can test in-app billing by using options, look at this
Edit :
On the link I mentionned, you can see this :
Note: You do not need to publish your application to do end-to-end
testing. You only need to upload your application as a draft
application to perform end-to-end testing.
If you still can not test it, what you can do is to publish it and test it. If you think there might be bugs in your app's in-app billing, refunds are still a solution.
I'm thinking about something, on the dev site, you can see this :
Verify that your device is running a supported version of the Google
Play application or the MyApps application.
On what Android version are you testing on ?
You've to add the products(item sku) in you app product in your play store app account. The SKU you set In-App billine is not available. For testing, set the SKU androidtestpayment. Now you'll now get that error The item you requested is not available for purchase.