title: Android main project with library project - how to pass setting between projects
body: <p>Just started playing with Android and I'm trying to create an app that has free and paid version. I'm new to Java as well but I've managed to create a simple working application in Eclipse which consists of 2 main projects (one for the free version, and one for the paid version).</p>
  
  <p>I also have a library project which contains shared code (activities, resources, strings etc) and is referenced by the main projects. What I want to do (and this may well be the wrong approach) is enable or disable things in the the library code depending on whether I'm running the free or paid version.</p>
  
  <p>So for example I have a Main activity in the library project and I want to do something like:</p>
  
  <pre><code>if (version == "free") //version would somehow be set by the main project
  {
     //disable a paid feature
  }
  </code></pre>
  
  <p>Obviously I need to somehow work out in the library whether I'm running the free or paid main project so I can enable/disable features when I need to. What's the best approach to do this? For example could I use some kind of global setting in the main project, and somehow read this in the library project - I don't want the library project to know about the main project, if that makes sense?</p>
  
  <p>I'm a quick study so feel free to point me in the direction of any articles, etc.</p>