Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Test inapp purchase with debug key

I'm trying to test inapp purchase, but every time when I deploy with eclipse (signed with the debug key), it says: "This version of the application is not configured for Market billing. Check the help center for more information." When I export a release version of the apk (signed with my private key), it's ok. My question is this: I have to export an apk, upload it to the device, to run a test? That's a LOT of time wasted, and I cannot run tests either. Am I missing something?

like image 548
Mate Gulyas Avatar asked Aug 14 '11 13:08

Mate Gulyas


People also ask

How do I debug in app purchases?

Open the app on the device. From Android Studio's Run menu, last option is "Attach debugger to Android Process" - select your device. You are now debugging.

Can I test in app purchase in Testflight?

you can test in-app purchase with test account. then create an account for testing your in app purchase. when test in app purchase try to logout from app store which uses your real account. then it will ask for itunes account while in testing in app purchase then enter your test account credentials.


2 Answers

You can buy the test product 'android.test.purchased' using a debug version. For a 'real' product, you need to sign with the release key and upload a draft version to market. To save time you should use the test product until you get your app working, and use the real product ID for final testing only. Check out the documentation for more details

like image 200
Nikolay Elenkov Avatar answered Sep 21 '22 13:09

Nikolay Elenkov


Exporting signed APKs through ADT in Eclipse is indeed rather cumbersome. A much more effective build mechanism is to build debug or release versions through an Ant build script (see "Building and Running from the Command Line"). I have added some Ant targets to install those freshly built APKs immediately onto the attached device.

If you create a new project through android create project (see "Managing Projects from the Command Line"), you'll get a basic build.xml to get started with.

like image 41
Paul Lammertsma Avatar answered Sep 22 '22 13:09

Paul Lammertsma