Does the book cover the use of Proguard? I've heard good and bad stories on the use of Proguard. Is it workable in your opinion? When do you suggest using it. I mean, it might not matter that much for open source project, but do you recommend using Proguard in any commercial app? Are there any good alternatives to Proguard?
Thanks in advance for the answer!
Johan Pelgrim, The Netherlands
SCJP 1.4, SCWCD 1.4, SCBCD 5.0
Unfortunately, Proguard was not a feature we covered in the book. We wanted to but just couldn't fit it in. We mention it briefly but don't get into the details.
I know what you mean about the good and the bad. The tool does a decent job of obfuscating but sometimes can go too far, which is where it gets difficult to use. You have to go in and tweak the settings so it won't muck up stuff that you need left alone. But it can help you fight piracy of your app. Sometimes the reason for this is that users want to buy your app but they can't get it from their country's Google Android Market. So they look for some other way to get it. This is one reason why you should always consider alternate means of distributing your apps. You can sell through Android Market and also through other sites. We discuss the legalities of Android Market in chapter 28 and this is definitely okay. That way you could make it easier for users to find it so there's less reason for piracy.