In-App Billing: Adding billing on an existing published app - android

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.

Related

In app purchase not working: item not available for purchase

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.

In-app billing issue: "This version of the application is not configured for Billing through Google Play. Check the help center.."

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.

Testing in-app billing before releasing a new version of an application

I have a free application in which I want to add a premium product.
I'm developing the new code while maintaining the older version for bugfixes. Now I would like to test IAB integration at least with my personal phone (not the best idea), but Google Play doesn't allow me to add in-app products until I add the BILLING permission, and in fact the currently release version doesn't.
The question comes straightforward: how can I add in-app products before releasing a new version of the application? If I must add the BILLING (and also the RECEIVE_BOOT_COMPLETED) permission before implementing the premium feature I fear that users won't receive timely bugfixes to their installed versions, as soon as they have auto update enabled of course.
Do you have any ideas to suggest?
If you want to add In-App products before version release, you must upload an APK of your application with BILLING permission. Use the "advance mode" of the upload APK page form in Android Developer Console. ¡Be careful! Just upload it, don't publish it!
Once you've done that, you will be able to add products from the "In-App products" page of yout application in the ADC.

Android: Publishing draft APKs and In-App Billing Testing - how?

Google's documentation states that you should upload a 'draft' APK and add your In-App Products to that - you will then to able to test with your developer and other linked 'test' accounts - that's what it says...
It also says you need to use the 'new' Developer Console to add products for v3 of the billing API - but uploading an APK with the new console instantly publishes it!!! - WTG there Google!!!!!
You cannot unpublish an APK/revert to an earlier one either - the 'live' versions is now the test version - BEWARE of this nonsense!!
So you re-upload the old version to fix that and then try to figure-out how to upload a 'draft' APK. Switching to the old console, you can upload and not 'Activate' an APK - however this doesn't get marked as 'draft' so I'm not sure that's what they mean!?
You can add your In-APp products to that, but running that APK on a device/attempting to purchase anything, results in a message saying the 'current version of this application is not configured for In-App Billing'...
At this point you realise you're going around in circles with a company who's documentation is a lot of nonsense so you resort to this place for help! - please? :)
Someone must have managed to get this to work - would they care to share the EXACT steps for getting a new APK uploaded as 'Draft' with In-App Products which can actually be purchased (for testing purposes) please?
I'm off to swear a lot on the Google forums now :)
1) Take any version of your code and add the following permission to it:
<uses-permission android:name="com.android.vending.BILLING" />
Having the rest of the billing implementation is completely optional in this apk.
2) Export it and sign the apk with your signing certificate, and make sure you incremented the version code.
3) Upload the apk to Google Play using the old version of the Developer Console, but do not activate it.
You're done. You should now be able to add in app products now. You can now add the rest of the billing code to your app and debug it on the device as usual, and create products in the online interface. It may take a few hours (upto 24) for any products you create to be accessible in your app.
The whole thing is quite confusing, but uploading an APK in the new console doesn't publish it right away, at least not for new applications. It should go into a 'Ready to publish' state and doesn't go live until you change to 'Publish this app' (which is itself confusing because one of the 'states' is a state, while the other is an 'action').

Android billing testing - how do I test with the test user?

I set up test users so that I can test that in-app billing works, but I am a bit confused by the process.
I am following the android developer billing test guide here: http://developer.android.com/guide/google/play/billing/billing_testing.html
It has a few confusing points. It says not to publish your app, but somehow I need to get the app on my phone. So how can I get an un-published app on my phone?
Also, am I supposed to make an area on the app with the 4 product ids that google reserves and try to buy those, and then once I see it works, just get rid of those buttons to buy those test products? Is that how this is meant to be done?
Thanks!!
It says not to publish your app, but somehow I need to get the app on
my phone. So how can I get an un-published app on my phone?
There's no need to publish your app to get it installed. Create a signed build (See http://developer.android.com/tools/publishing/app-signing.html). Then install it on your phone using adb install <apk name> The SAME build you must upload to your playstore dashboard. After uploading, you will see 2 options:
PUBLISH
SAVE
Click on 'SAVE'. After saving your uploaded app, you will be able to add InApp products for that app. You MUST save and publish your inapp products in order to test them.
You should upload the apk to your developer account and fill in the mandatory fields and save it without publishing it and then you can create in-app products for the application and publish it. please note that the in-app products must be published before testing billing. But you don't require to publish the application to test billing.
Try the MoVend library for Android. it supports google play in-app billing, paypal and many more.
http://www.movend.com/
How to sign an android apk file
To install it you can use adb or you can send this file by mail. Then download in the device and install it.
Check that Settings > Applications > Unknown sources is checked in the Device.
If you are having problems implementing in-app purchase I recommend you the library AndroidBillingLibrary.

Categories

Resources