Android Custom Launcher
<p>I am building an kid mode app. In my app the an activity called KidModeActivity (this is an launcher to prevent kid from getting out of the activity)</p>

<p>AndroidManifest.xml</p>

<pre><code>&lt;application
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:theme="@android:style/Theme.Holo.Light"&gt;
    &lt;activity android:name=".activity.MainActivity"&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=".activity.KidModeActivity"
        android:enabled="false"
        android:clearTaskOnLaunch="true"
        android:launchMode="singleTask"
        android:stateNotNeeded="true"&gt;
        &lt;intent-filter&gt;
            &lt;action android:name="android.intent.action.MAIN" /&gt;
            &lt;category android:name="android.intent.category.HOME" /&gt;
            &lt;category android:name="android.intent.category.DEFAULT" /&gt;
        &lt;/intent-filter&gt;
    &lt;/activity&gt;
&lt;/application&gt;
</code></pre>

<p>KidModeActivity has android:enabled="false". To get into kid mode, I will enable that activity then create a launcher picker for the users</p>

<pre><code>ComponentName launcherActivity = new ComponentName(this, KidModeActivity.class);
                    getPackageManager().setComponentEnabledSetting(launcherActivity,
                        PackageManager.COMPONENT_ENABLED_STATE_ENABLED, PackageManager.DONT_KILL_APP);
                // Create launcher chooser
                Intent selector = new Intent(Intent.ACTION_MAIN);
                selector.addCategory(Intent.CATEGORY_HOME);
                startActivity(selector);
</code></pre>

<p>I can choose my custom launcher
When in custom launcher:</p>

<ul>
<li><p>Home button is ok when pressed</p></li>
<li><p>Back button is ok</p></li>
<li><p>But I can still press recent button and see my app there (!!!), I can swipe to close my app too</p></li>
</ul>

<p>Anyone helps? Thanks in advance!</p>