Google Finally Lets you Check Android Market Licensing07/29/2010 09:18 PM
Glad Google is listening:
http://developer.android.com/guide/publishing/licensing.html
This should at least prevent the easy piracy hack w/ the 24hr return policy
Now if they could only sik their lawyers after all the warez sites and shut them down :-P
p.s., when implementing this, I found that if you're in a low cell signal area (i.e., slow data connection), the initial check can time out but once it's checked properly, it gets cached. To fix this initial timeout problem, find LicenseChecker.java in the source code for the licensing library and change the 10 to 30:
// Timeout value (in milliseconds) for calls to service.
//kky: increased timeout per http://androidforums.com/android-developers/154625-licensing-always-denies-caching-issue.html
privatestaticfinalintTIMEOUT_MS = 30 * 1000;