I am developing an android app with Min-TargetSDK=3
and TargetSDK=15
.
Previously also I have asked question related to my app not getting minimized to Recent Apps on home button press. Whenever I launch my app it starts from login page instead of showing last viewed screen. But I found no solution until now.
Somehow I managed to bring last viewed activity when user switches to some other task from app by pressing home button. Still app is not being minimized to Recent apps.
Now am facing some different problem:
Scenario 1 - OKAY:
- Install my app from apk file copied to sd card
- clicked Done after installation.
- Then open it by clicking launcher icon.
In this scenario, if user clicks home button when using the app and reopens the app by using launcher icon, last viewed screen is showing up. But still app not listed under Recent Apps list.
Scenario 2 - PROBLEMATIC:
- Install my app from apk file copied to sd card
- Open it by clicking "open" button after installation.
In this scenario, if user clicks home button when using the app and reopens the app by using launcher icon, last viewed screen is NOT showing up. Instead it starts from login page. Also app not listed under Recent Apps list. Here is my manifest file:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.net.elderlyhealth"
android:versionCode="1"
android:versionName="1.0" >
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<uses-permission android:name="android.permission.CALL_PHONE"/>
<uses-sdk android:minSdkVersion="3"
android:targetSdkVersion="15"/>
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".ElderlyActivity" android:alwaysRetainTaskState="true"
android:label="@string/title_activity_elderly" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".ElderlyHealthAct" />
<activity android:name=".account.LoginPage" />
<activity android:name=".account.SignupPage" />
<activity android:name=".account.RoleNavigator" />
<activity android:name=".account.CreateRoleActivity" />
<activity android:name=".account.RoleAdmin"/>
<receiver android:name=".server.AlarmReceiver"></receiver>
</application>
</manifest>