Using in app purchase in my application. I have double checked the products are listed at playstore and in active states. plus the application is published but in beta testing. product ids using in my code is very same as in playstore. I'm testing the signed apk on phone.
Problem: whenever i click the button and try to get product it endup like this.
please help. thanks
Step you need to follow, once launches an inapp products in your application.
You have latest In-app Billing Version configured in application
Apk is in published state but in beta testing or any other testing
List the products with unique ids at play store panel
Change the state of products to active state
Product ids are same in source code as well in play store (double check)
You have signed apk installed in phone
versionCode of published apk & testing apk must be same
you have added a tester at play store under same apk
You need to test inapp from very same email, you have added at google play store (as tester)
once i followed all steps this error is gone. In my case it is because of tester's email :)
You have to use a different (test) account than the one you're signed in to the developer console with, and add it in the developer console.
Edit: see here: the item you requested is not available for purchase
I think, you might miss something but to get the missing part, you must share your code of InApp Billing section. By the way, you can also use the library project from https://github.com/anjlab/android-inapp-billing-v3.
Possibly a caching problem with Google Play services. Clear out the cache and try again.
Related
I'm using Cordova Plugin Purchase to use in-app billing in my Android app. However, using the alert with the JSON-stringified product, the product's state is always "invalid". Here is a sample of my code around this issue:
store.register({
id: 'test_walker_01',
alias: 'walker',
type: store.CONSUMABLE
});
item_walker = store.get("test_walker_01");
store.when("product").updated(function (product) {
alert(JSON.stringify(product));
});
store.refresh();
My problem: I cannot access my product's information from Google Play.
After much searching on Google and Stack Overflow, here are the steps I already did/verified to find a solution:
I triple checked that the ID is the same than on Developer Console, and the type is "managed".
The product is activated in Developer Console.
I uploaded the exact same APK on my test phone than uploaded in the Developer Console, in Alpha testing.
I'm using a different Google account than the one in the Developer Console.
I have added this (different) account in the list of authorized test Gmail accounts.
The APK that I am signing and uploading is the release (not debug) version.
As far as I know, I am only using one key to sign all my APKs (referring to this SO question). I'm unsure how using many keys could happen.
I even uninstalled the app completely, rebooted my phone and reinstalled it.
Thank you for your help!
After much searching, I found my answer in the last few comments in this issue on the Plugin's Github: You have to publish your application (in Alpha mode) on Google Play for it to actually work.
Publishing in Alpha mode only lets people in your test group access the application, so no worries about it being public. Just fill the mandatory fields with temporary information.
I integrated Google IAP Billing to an Android application.
I published my application in Alpha version on Google Play Store. I copied the public key that I added in my project on Android Studio. So, I use the good Public API Key with my IabHelper instance.
I signed an APK that I use on a device with an unique account that is different from my developer account. This account is added in the license testing emails field on the Settings part of Google Play Developer Console.
I also checked the SKU ID of the item I want to purchase is the same on my application and on the application signed.
When I launch the buy process, I get a dialog with Please sign in to your google account error. But, I am already connected because I can go on Play Store application and download apps. I also tried to clear cache data for Play Store app and Google Play Services but nothing works for me.
I must mention that on the manage list of alpha testers, I have created a google+ community like asked but there is no link to send to my alpha-testers to opt-in.
Someone has an idea about the problem ? And the solution to solve it ?
The alpha tester has to satisfy these two conditions:
joined the alpha testing community
opted-in for alpha tests
Firs you have to invite the tester to the alpha testing community. Second the alpha tester have to opt-in using this URL: https://play.google.com/apps/testing/your.package.name
It just takes time. Give it couple of hours and it will work.
Also make sure that the file you are running on your phone is signed with the sane certificate that is uploaded on google play (not debug file)
I am using in-app billing in my android application. After signing, I uploaded a draft APK to the market (no debuggable in manifest), also included the com.android.vending.BILLING permission and all the files.I first tried the reserved android.test.purchased product ID for testing. It worked fine.
Now I add a 'In-app Product' with a new price for managed product to my app in the Google Play Develoiper Console and set the product to active. The APK is still in draft. I created a test user and reset my device to make that test user the primary account on my test device. Also mentioned the product id in String SKU in my main activity.(previously it was android.test.purchase)
Now, while trying to install the app, I am seeing this message:
"Error : This version of the application is not configured for Billing through Google Play. Check the help center for more information."
I have waited for more than 2 hours and tried again. Still same. I have also checked the versioncode in the main application and in the phone's installed application is same. I am using In-app Managed Product. Also, I would like to add a product id with yearly subscription if managed product works fine. Please suggest.
Try waiting 12-24 hours. Sometimes it can take quite a while to kick in on Google's servers.
We have an existing app (apk v282) published in Google Play. This app doesn't have in-app products and no BILLING permission.
We have developed an upgrade version (v292) that contains in-app products and BILLING permission.
We face a problem to create the in-app products in Google Play console:
When we upload the v292 apk as a draft in Google Play console, we have two APK listed in the draft: the old and the new:
From this page, we have two alternatives:
1- Either we click on "In-app products" on the left list to create our products, we see a page saying:
To add in-app products, you need to add the BILLING permission to your
APK.
So we cannot create in-app products, probably because v282 still is in draft configuration.
2- Or, we remove the older v282 APK (that hadnt the BILLING permission), in order to leave only the new v292 in the Draft configuration. But then when clicking on "In-app products", we get a popup warning about the configuration not being saved. But there is no button to save it, only publish. Of course we don't want to publish it as it's under test.
To sum it all up: How to test in-app purchase in an application that was previously published without it?
For everyone looking for a solution to this: uploading an apk to alpha will do. So you should add billing permission to your android manifest, build a signed version and load apk to alpha. Afterwards you can configure in app purchase products without uploading an apk to production.
I had the exact same problem. What I ended up doing was uploading a new release with the new permission but without the in app billing option visible. Mine was easy as it was just a preference option to remove ads that was easy to just not show. Once published the site let me create in-app products and I was able to test with a new apk file and published that one shortly afterwards.
You have to temporary change the package name and upload new application in market (Do not need to publish ) for temporary.
Just checking in App purchase so don't choose any package name which you want to use in feature. because Each package name is unique and Google remembers all package names anyway so you could use this a reminder
And then test in that and when you get success full run in that temporary build app then you can change again your previously package name in which you want to upload your next apk and you must have to delete your old version from that and then you can create in app product now.
Now if you want to check in App purchase then you have to buy that product from different account except this account in which you are uploading your apk Dont worry you can rollback your money after checking this functionality.
I recently face this problem and I followed like this So I hope you will get some help from my experience.
I think the issue here is that the Google Play console thinks that you are trying to publish multiple apks. This is only supported if the apks are targeting different device configurations:
publishing multiple apks
I think that once you delete the previous version you will be able to activate the newer version with in-app billing. I'll be trying this out shortly and update this answer if I learn more.
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.