3

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!!

Genadinik
  • 18,153
  • 63
  • 185
  • 284

3 Answers3

2

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.

Saurabh Verma
  • 6,328
  • 12
  • 52
  • 84
  • I see, so while in development/debug mode, the system creates the .apk for me automatically. Should I just upload and save that? But how do I get the debug version on my phone? :) – Genadinik Jul 17 '12 at 13:06
  • I just tried to upload the debug apk and I got this error: Google Play does not accept apks signed with the debug certificate. Create a new certificate that is valid for at least 50 years. – Genadinik Jul 17 '12 at 13:15
  • 1
    You cannot upload that apk. You have to 1st sign your build using a release certificate (that's why i had given that link) – Saurabh Verma Jul 17 '12 at 14:03
  • Yeah I read the link, but I read in there that the debug build gets signed for you. Could you tell me the steps I need to do to make the sign my build with the release certificate? Thanks! – Genadinik Jul 17 '12 at 14:38
  • 1
    Assuming you are using Eclipse with ADT, right click on the project, then select Android tools > export signed application project, just as the link in this answer describes. Upload the APK that this generates, but do not publish, just save. – Bryan Herbst Jul 27 '12 at 03:31
1

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/

0

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.

Community
  • 1
  • 1
Brais Gabin
  • 5,827
  • 6
  • 57
  • 92