Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to test licensed android apk without buying from market?

I would like to publish paid application to android market, so I added android LVL into my apk. I have tested on my mobile. When I install apps, it shows the permission to check phone status, market license. After installation, I try to run and prompt "license not found and go to market to purchase". It seems that it works as apk is not allowed to run without downloading from market.

The problem now, how can I test or emulate the buyer situation ? That means will buyer able to run my apps after they buy my apps. If they cannot run and prompt license not found after purchasing, then my license check has problems. I already include my gmail into "Edit profile" in dashboard of market.android.com. I changed the status to LICENSED, NON-LICENSED, OLD LICENSED. but no response sent to my gmail. So I don't know how to do it.

Does it already done on Google license server or do I need to modify android market license code package? I check that there is code to handle request for the case like license, no license, old license, market error and so on.

It is because there is no market in android emulator, also I cannot add google account(only exchange account) in account and sync in emulator (tried in 1.6,2.2 and 2.3). So I only can test in my real android phone.

Anyone has experience or some methods to test paid apps without buying own apps from market, how can I also test the response from license server as well if anyone buy my apps ?

like image 289
Tom Cheung Avatar asked Nov 06 '22 04:11

Tom Cheung


1 Answers

It's been a few months, but this bump might help someone out there - just answered this question for a friend of mine who claimed to not find the answer here. Sounds like you don't have a Google experience emulator setup. Create a new emulator using the Google API version of android targets, you ought to be able to do that for target level 3 on upwards. With this API in place you'll have access to the authentication servers in your emulator (if you don't have the Google APIs, they're available in the sdk manager under available packages then I think third party packages iirc). You don't even need to upload an unpublished apk unless your testing in-app purchasing (possibly for test accounts other than the dev account, I do all my testing under dev so I'm not entirely sure on that note).

like image 191
celerCalderas Avatar answered Nov 14 '22 20:11

celerCalderas