I have created a Launcher app. Everything works fine but I get errors when booting up the device. If I turn my phone off and then I turn it back on I found out that the app gets started 2 times and both of them starts about the same time. Any help about this?
I have this in the manifest:
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:largeHeap="true"
android:theme="@style/AppTheme" >
<activity
android:name="com.example.testing"
android:launchMode="singleTask"
android:clearTaskOnLaunch="true"
android:stateNotNeeded="true"
android:configChanges="orientation|keyboardHidden|screenSize"
android:label="@string/app_name"
android:theme="@android:style/Theme.NoTitleBar" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.HOME"/>
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
.....
Of course, I do NOT use any android.intent.action.BOOT_COMPLETED
After booting the phone and after having the error, my app closes. Then, if I press the Home button then it starts normally (just one instance of it) and everything works ok.