Search code examples
androidsplash-screen

App is installed twice


I have a shoppinglist App coded in Android-Studios. My app does have a splash screen. When I install the app, it is installed twice. When I uninstall one, the other one uninstalls too. I tried to delete the first intent filter on splashscreen, but then I did not have a splash screen anymore. I want my splashscreen to be remain. How to solve that? My manifest looks like this:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.projects.buylist">

<application
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:supportsRtl="true"
    android:theme="@style/AppTheme">

    <activity
        android:name=".SplashScreen"
        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=".MainActivity">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
</application>


Solution

  • The app is only one.

    You have simply two activities (and then 2 icons) that can work as launcher.

    If you don't want, you have to remove this part in one Activity

    <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>