user834595
user834595

Reputation:

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 :)

Upvotes: 2

Views: 2737

Answers (2)

Nikolay Elenkov
Nikolay Elenkov

Reputation: 52936

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

Upvotes: 0

Raghav Sood
Raghav Sood

Reputation: 82553

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.

Upvotes: 6

Related Questions