title: Changing default activity in android
body: <p>hello I want to change default activity. But when I do that the app doesn't launch at all without any errors</p>
  
  <pre><code>&lt;activity 
          android:name="com.example.dimmer.MainActivity"
          android:label="@string/app_name"&gt;
          &lt;intent-filter&gt;
              &lt;action android:name="android.intent.action.MAIN" /&gt;
              &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
          &lt;/intent-filter&gt;
      &lt;/activity&gt;
  
      &lt;activity
          android:name="com.example.dimmer.DevicesActivity" &gt;
      &lt;/activity&gt;
  </code></pre>
  
  <p>This way MainActivty launches with no proble. It also goes to Device activity when I press the button. So everything works fine.
  Now I need DevcieACtivty to be default one.</p>
  
  <p>I change Manifest like that</p>
  
  <pre><code>&lt;activity 
              android:name="com.example.dimmer.DevicesActivity"
              android:label="@string/app_name"&gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="android.intent.action.MAIN" /&gt;
                  &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
              &lt;/intent-filter&gt;
          &lt;/activity&gt;
  
          &lt;activity
              android:name="com.example.dimmer.MainActivity" &gt;
          &lt;/activity&gt;
  </code></pre>
  
  <p>but now app doesn't launch. no errors. nothing is written in console.
  it's just doesn't do anything,
  what might be a problem?</p>
  
  <p>It starts to write the following error
  ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.example.dimmer/.MainActivity }
  [2014-05-16 21:17:10 - Dimmer] ActivityManager: java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.example.dimmer/.MainActivity } from null (pid=13093, uid=2000) requires null</p>
  
  <p>full Manifest</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.example.dimmer"
      android:versionCode="1"
      android:versionName="1.0" 
      android:hardwareAccelerated="false"&gt;
  
      &lt;uses-sdk
          android:minSdkVersion="9"
          android:targetSdkVersion="14" /&gt;
      &lt;uses-permission android:name="android.permission.INTERNET" /&gt; 
  
      &lt;application
          android:allowBackup="true"
          android:icon="@drawable/ic_launcher"
          android:label="@string/app_name"
          android:theme="@style/AppTheme" &gt;
  
          &lt;activity 
              android:name="com.example.dimmer.DevicesActivity"
              android:label="@string/app_name"&gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="android.intent.action.MAIN" /&gt;
                  &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
              &lt;/intent-filter&gt;
          &lt;/activity&gt;
  
          &lt;activity
              android:name="com.example.dimmer.MainActivity" &gt;
          &lt;/activity&gt;
  
      &lt;/application&gt;
  
  &lt;/manifest&gt;
  
  
  [2014-05-16 22:13:25 - Dimmer] Android Launch!
  [2014-05-16 22:13:25 - Dimmer] adb is running normally.
  [2014-05-16 22:13:25 - Dimmer] Performing com.example.dimmer.MainActivity activity launch
  [2014-05-16 22:13:26 - Dimmer] Uploading Dimmer.apk onto device 'SH17VT514235'
  [2014-05-16 22:13:26 - Dimmer] Installing Dimmer.apk...
  [2014-05-16 22:13:29 - Dimmer] Success!
  [2014-05-16 22:13:29 - Dimmer] Starting activity com.example.dimmer.MainActivity on device SH17VT514235
  [2014-05-16 22:13:29 - Dimmer] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.example.dimmer/.MainActivity }
  [2014-05-16 22:13:29 - Dimmer] ActivityManager: java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.example.dimmer/.MainActivity } from null (pid=15458, uid=2000) requires null
  </code></pre>