Is there any way to stop app running multiple instance? I have tried single instance in manifest also but did not succeed.
I have make a demo app for fetching Facebook friends. It works good in 4.2.2 and other but in kitkat 4.4.2 after login when i fatch friends it crashes and in DDMS app shows multiple instance running of the same app.
Can anyone help me or guide what is the issue?
Here is the manifest file
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="18" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme"
android:name="com.example.MyApplication" >
<activity
android:name=".Splash"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.example.ui.newHome"
android:screenOrientation="portrait" />
<activity
android:name="com.example.ui.FriendsList"
android:screenOrientation="portrait" />
<activity
android:name="com.facebook.LoginActivity"
android:label="@string/app_name"
android:theme="@android:style/Theme.Translucent.NoTitleBar" />
<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="@string/app_id" />
</application>
android:launchMode="singleTask"
for your activty in your manifest – Swine