title: android activity in jar library
body: <p>I have copied an activity class from the internet : <a href="https://stackoverflow.com/questions/3061249/opening-a-dialog-with-text-input-from-within-a-view-in-android">get user input</a></p>
  
  <p>When I had the activity class inside the project, as a class file - it worked fine.</p>
  
  <p>When I inserted the class +layout file  into a different project (my dialogs.jar file) I could not start the activity. </p>
  
  <p>The activity (TextEntryActivity) is under "com.xyz.dialogs"
  My project is under "com.xyz.thisproject"</p>
  
  <p>First I got the "activity class not found" error:
  "AndroidRuntime(487): android.content.ActivityNotFoundException: Unable to find explicit activity class ..."</p>
  
  <p>Then I read in an article that I should insert the startActivityForResult into a try/catch and I did.</p>
  
  <p>The result is :</p>
  
  <ol>
  <li>Activity is not shown</li>
  <li>onActivityResult is fired without any action from the user</li>
  </ol>
  
  <p>Notes: </p>
  
  <ol>
  <li>I put the activity in both manifests (first only in jar,then in my project, then both)</li>
  <li>I have another class (not activity!) in that JAR file and its working fine (a OK only dialog I build with dialog builder)</li>
  </ol>
  
  <p>My questions are:</p>
  
  <ol>
  <li>Is it at all possible to put an activity in an external library ?</li>
  <li>Is it ok that that the layout file is in the jar (its only a textbox with two commands ok/cancel)</li>
  <li>Where should I declare the activity (which manifest or both?) </li>
  <li>How should I declare the activity (I saw samples with "ActivityName" and some other samples with ".ActivityName" where should I use what method...)</li>
  </ol>
  
  <p>Thanks in advance 
  Guy</p>