Just create a regular application, and then add a couple of lines to the application manifest file.
First you need to add the following attribute to your activity:
android:launchMode="singleTask"
Then add two categories to the intent filter:
<category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.HOME" />
The result might look something like this:
<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.dummy.app" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="11" android:targetSdkVersion="19" /> <application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" > <activity android:name="com.dummy.app.MainActivity" android:launchMode="singleTask" android:label="@string/app_name" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.HOME" /> </intent-filter> </activity> </application> </manifest>
It's simple!
Chris Mar 02 '14 at 11:00 2014-03-02 11:00
source share