i have an strange issue,
My Icon launcher generated via Plays Store installation is restarting my app, it happens when my app is in background, however my Icon launcher inside my "Apps" sections just open the application on a normal way.
this only happen with my signed app downloaded from Playstore, what would be the reason for that restarting caused by the Play Store´s icon launcher?
I have realized it only happens with Android 4.4 "Kit Kat"
this is my AndroidManifest.xml
:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.jorgesys.news"
android:versionCode="41"
android:versionName="2.7.7" >
<uses-sdk
android:minSdkVersion="9"
android:targetSdkVersion="19" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-feature
android:name="android.hardware.microphone"
android:required="false" />
<uses-feature
android:name="android.hardware.telephony"
android:required="false" />
<uses-feature
android:name="android.hardware.bluetooth"
android:required="false" />
<uses-feature
android:name="android.hardware.camera"
android:required="false" />
<uses-feature
android:name="android.hardware.location.gps"
android:required="false" />
<uses-feature
android:name="android.hardware.wifi"
android:required="false" />
<application
android:name="com.jorgesys.news.MyApplication"
android:allowBackup="false"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:largeHeap="true"
android:theme="@style/AppBaseTheme" >
<activity
android:name="com.jorgesys.news.MainActivity"
android:label="Jorgesys"
android:launchMode="singleTask"
android:windowSoftInputMode="adjustPan"
android:configChanges="keyboardHidden|orientation|screenSize">
<meta-data
android:name="android.app.default_searchable"
android:value="com.jorgesys.news.activities.SearchableActivity" />
</activity>
<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
</application>
</manifest>
hoping to have some help from the experts! thanks in advance!
You might have stumbled upon an known issue in Android. Issues: 2373 , 5277
Here is a fix you can try from a similar question that got more attention:
if (!isTaskRoot()
&& getIntent().hasCategory(Intent.CATEGORY_LAUNCHER)
&& getIntent().getAction() != null
&& getIntent().getAction().equals(Intent.ACTION_MAIN)) {
finish();
return;
}
If this instance is opened by the launcher but it's not the root of the task (you have other activities open) then closing it should bring up the last open activity.
You can also try researching this solution
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.