How can I control the usage of a custom jar library?
<p>I need a way to essentially secure my jar library to allow registered apps to use it in their projects and deny usage to apps that weren't approved by me.</p>

<p>It is fine if I hard code things in the lib for each distribution. I currently have this jar obfuscated.</p>

<p>What are good approaches to restrict the usage of a jar?</p>

<p>One idea was to lock the lib to a specific package so if the developer tries to use it in another project they can't.  But I'm not sure if they can easily provide a custom fake Context to make it work...</p>
