Everyone has their own opinion on this subject so expect lots of different advice. Here's my take on it:
- 1. Obfuscate your code (proguard is recommended)
- 2. Offer a FREE version with full capabilities for a trial period
- 3. Use a serial number routine based on the registering users email or other unique info
Overall you will have to accept a certain amount of piracy, but if your application is worthy people will pay for it. Honest people will be honest and copy protection will not make dishonest people honest.