I launch the application from eclipse and run it twice: first I launch the application and then restart again after a few seconds
My application Popup --- β Main action (Both open twice).
I already tried adding android: launchMode = "singleInstance" to my manifest file, but did not succeed.
I tried 3 different applications from my eclipse still opening twice in my Kitkat, Lollipop real device (created a new project that also opens twice)
EDIT 1:
I tried adding this line to the manifest file, but not Success- android: launchMode = "singleTop"
Please let me know how to solve this problem.
manifest file:
<application android:allowBackup="true" android:icon="@drawable/logo" android:label="@string/app_name" android:largeHeap="true" android:launchMode="singleInstance" android:theme="@style/AppTheme2" > <activity android:name=".Start" 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=".MainActivity" android:screenOrientation="portrait" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter> </activity> </application>
My launch of Activity.java
public class Start extends Activity { SessionManagerFor_Signin session; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);
android eclipse android-manifest main-activity
Kumar
source share