Issue
I'm trying to block/disable the recent apps button in Android. To this end, I've tried to use this answer: Block/disable recent apps button
However, it seems not to work. I'm testing in on a emulated device for API 15. Is that answer right for API15+?
May I be missing something?
My application has two activities and I want it to be disabled for the second one so I have included the overridden onPause code to the second activity.
Thanks in advance
EDIT: This is question is not philosophical, it's about to have it working. I'm not new in Android and I know that what I want to do is against the common way to do the things in Android. I'm totally concious about it. This question is about to have something that others have made working and to know why it is not working .
EDIT2: It does not seem to be too much consistent the criteria if here you are marking this question negatively whereas the referred thread is positively marked being almost the same topic.
EDIT3: Manifest
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.sample"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="15"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.REORDER_TASKS" />
<application android:label="@string/app_name" android:icon="@drawable/ic_launcher">
<activity android:name=".InitPage"
android:label="@string/app_name"
android:theme="@android:style/Theme.Light.NoTitleBar.Fullscreen" >
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity android:name=".MainPage"
android:label="@string/app_name"
android:theme="@android:style/Theme.Light.NoTitleBar.Fullscreen" >
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
<category android:name="android.intent.category.HOME" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
</manifest>
Solution
I've updated the SDK from API15 to API19 and this works.
Answered By - jevora
Answer Checked By - Pedro (JavaFixing Volunteer)