Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to test in-app-purchases easily, without publishing or signing it first?

Background

My app has some in-app billing (like this one), and I wish to test it out before publishing it.

I've watched some google IO lectures and read some articles, and prepared everything.

According to what i've learnt (talked about here), all I need to do is just add my email to the test accounts, and it won't be charged.

The problem

It seems that in the developer console, the in app items cannot be activated.

I think it's because the app isn't published yet, but that's the whole point of testing - I want to test the app before publishing it...

As I've also found out, in order to test in-app billing, I have to do a lot of things to take care of for making it work, also having many restrictions and annoyances:

  1. sign the app and upload it to the play store . if you don't use a signed app, you get this message ("This version of the application is not configured for Market Billing...") .

  2. make credit cards be used to the devices, even if they won't cost anything.

  3. let others do the testing instead of myself, as my account cannot be used for that. not only that, but instead of adding exactly which you wish to add, you have to create a google group and there put the people who will be able to use the app, and all will have to have a google+ account... You will also need to wait some time till the testers will be able to use in-app-billing of your app and till then they will get an error "User is not eligible for this purchase" .

  4. because of #1, I need to have some kind of mechanism to reset the purchases, within the app itself, but i also shouldn't forget to remove/hide this features for the end users, so that they won't reset it by mistake

  5. because of #1, if I wish to be able to debug the app, I need to change it on the manifest, and choose to debug the app within Eclipse, and also remember to uncheck this flag before actually releasing the app.

  6. since the app is on the play store, you cannot modify in-app purchases items (their Id for example), as opposed to many thing you can modify before publishing the app. It's no longer a development as flexible as it can be using simple development. It's like your app should be sealed with what you choose even though you haven't published it yet.

The question

Why is it this way?

How come there isn't a simple way to allow to test the in-app-billing ?

How would you deal with the problems I've written about?

Is it possible to test the in-app purchases before the app is published?

How come I can't use my own google account ?

Also, suppose I do make a (fake) purchase, how do I reset it (all/specific purchases) in order to check it out again? Is it true I can't do it anywhere besides the app itself?

Am I missing anything?

like image 523
android developer Avatar asked Jan 06 '14 20:01

android developer


People also ask

How can I test Android apps without publishing?

You must go in developer console at Settings and add test account (developer.android.com/google/play/billing/…). Then log in your phone at the test account. Then install the APK file in your phone. That's all, you can test purchases.

How do you test in-app billing?

Test in-app billing and subscriptions Once you've set up application licensing, authorized users can also purchase in-app products and subscriptions without charging the users' accounts. When making a purchase from a license test user, you will see two choices for payment method: “Test card, always approves”

How do I know if in-app purchases are free?

In the App Store, applications with in-app purchases will have a disclaimer next to the purchase button. If the app is initially free, this note should be beside the Get button. If it's paid, the disclaimer is beside the price tag.


1 Answers

you dont have to publish the app inorder to test it all you have to do is upload the apk to your developer console, just dont publish it. If your account is linked to your developer console you cannot use that account and have to create a test account to test the IAP's

like image 93
tyczj Avatar answered Sep 20 '22 16:09

tyczj