请帮忙!我是Android开发的新手。我正在开发一个应用程序,当我重新启动我的应用程序图标时它会重新启动,基本上它应该恢复,因为我的应用程序在后台运行。 当我使用主页按钮,然后从最近的发布中选择我的应用程序时,它恢复完美。
我也通过了这个链接但是没有得到完美的答案或完美的解决方案如何解决这个问题。 https://code.google.com/p/android/issues/detail?id=26658
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.singh"
android:versionCode="20160114"
android:versionName="20160114" >
<uses-sdk
android:minSdkVersion="18"
android:targetSdkVersion="19" />
<supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true"
android:smallScreens="true" android:xlargeScreens="true" />
<uses-feature
android:name="android.hardware.bluetooth_le"
android:required="false" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.NETWORK" />
<uses-permission android:name="android.permission.USE_CREDENTIALS" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.READ_LOGS" >
</uses-permission>
<application
android:name=".ParseApplication"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:largeHeap="true"
android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" >
<meta-data
android:name="com.google.android.gms.version"
android:value="@string/google_play_services_version" />
<activity
android:name="com.example.singh.MainActivity"
android:label="@string/app_name"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".UserDetailsActivity"
android:label="@string/title_activity_login"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".Login"
android:label="@string/title_activity_login"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".Register_activity"
android:label="@string/title_activity_register"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".InsoleConnection"
android:launchMode="singleInstance"
android:label="@string/title_activity_configuration"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".Activities"
android:label="@string/title_activity_activities"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".HistoryActivity"
android:label="@string/title_activity_history"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".HistoryActivity_web"
android:label="@string/title_activity_history"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".SettingsActivity"
android:label="@string/title_activity_settings"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.facebook.LoginActivity"
android:label="@string/title_activity_settings"
android:screenOrientation="portrait" >
</activity>
<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="@string/faceBookAppID" />
<activity
android:name=".ActivitySummery"
android:label="@string/title_activity_activity_summery"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".TreadMillActivity"
android:launchMode="singleInstance"
android:label="@string/title_activity_activity_summery"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".ReportProblem"
android:label="@string/title_activity_activity_summery"
android:screenOrientation="portrait" >
</activity>
<service
android:name="************************"
android:enabled="true" />
<service android:name="******************************" />
</application>