title: Set Intents category programmatically
body: <p>I have an application with the following lines in the AndroidManifest:</p>
  
  <pre><code>&lt;category android:name="android.intent.category.HOME" /&gt; 
  &lt;category android:name="android.intent.category.DEFAULT" /&gt;                            
  &lt;category android:name="android.intent.category.MONKEY"/&gt;
  </code></pre>
  
  <p>My question is: is it possible to set these options programmatically? I mean, some users will be able to enable or disable the options above.</p>
  
  <p>What this does is to keep my app as a launcher.</p>
  
  <p>So, is it possible to put a condition on this, so I can make it depending on the user?</p>
  
  <p>EDITION: I edited this question to add the suggestion of Rawr.</p>
  
  <p>Here is what I am doing before calling my main activity:</p>
  
  <pre><code>        Intent myIntent = new Intent(v.getContext(), MainActivity.class);
  
          myIntent.addCategory(Intent.CATEGORY_HOME);
          myIntent.addCategory(Intent.CATEGORY_DEFAULT);              
          myIntent.addCategory(Intent.CATEGORY_MONKEY);
          startActivity(myIntent);
  </code></pre>
  
  <p>If I use these commands inside my manifest, they work. One cannot leave my app by pressing home button. Adding categories manually like above doesn't work.</p>
  
  <p>Any suggestions?</p>
  
  <p>Thank you in advance!</p>