3

I'm trying to create an Android Library that is kept simple in that whoever implements it only sees one class of that library. I've gotten ProGuard to hide most everything I need hidden, but some package names still appear even after the class names are obfuscated. Example:

com.app.parsers
com.app.camera
com.app

These are my packages, and when I export my .aar into another project, I can still see the package names. However, once I get there, there is no other need for it. Most of the classes are protected, with a a Public class and a Public interface that the public class extends.

For reference, in my project view, the following is visible:

com.app.parsers.jsonParser
com.app.parsers.xmlParser
com.app.parsers.csvParser
com.app.parsers.ManagerInterface(public)
com.app.parsers.ParserManager(public)

Essentially the reason I have parser manager public (and it's interface) is because it acts as an entry point (or proxy) to my various different parsers.So I keep it organized this way. So when I use proguard I don't see anything here I just see an empty package that says com.app.parsers and then a list of just generic cast, instanof or what have you. I want to hide this so that it's not distracting for anyone to use or they wonder why it exist or whats in there.

1 Answer 1

1

I don't think it's a huge deal having them exposed, as long as your code is well documented.

But you could try either using either

@hide annotation or the Facade pattern

1
  • Thank you, my Code is already in a sort of Facade pattern. I have my SDK class that handles all of these things. My problem is again that the package name remains visible despite obfuscating it in proguard. My SDK class implements the parser manager already so my user has no need to even know that a parser package even exist.
    – rubsnick
    Jan 14, 2015 at 17:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.