jdicarreira
jdicarreira

Reputation: 159

Missing App Icon after modifying Manifest

I was trying to create a splash screen for my app, so i followed this guide:

http://www.androidhive.info/2013/07/how-to-implement-android-splash-screen-2/

I changed my Manifest in order to launch first from my launcher activity, I booted it from Android Studio and it actually worked. But when I was looking for the app on my launcher I noticed that it doesn't has icon and name like the other applications.

I tried to unnistall and install it again and nothing... The application is listed on the installed applications.

This is part of my manifest fest:

<application
    android:allowBackup="true"
    android:icon="@drawable/bclose_1"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >

    <!-- Splash Screen Activity-->
    <activity
        android:name=".SplashScreen"
        android:label="@string/app_name"
        android:screenOrientation="portrait" >
        <intent-filter>
            <action android:name="android.intent.action.SPLASHSCREEN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

    <!-- Main 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>

    <!-- Preferences Activity-->
    <activity
        android:name=".Preferences"
        android:screenOrientation="portrait">
        <intent-filter>
            <action android:name="android.intent.action.PREFERENCES" />
            <category android:name="android.intent.category.PREFERENCE" />
        </intent-filter>
    </activity>

Upvotes: 0

Views: 1213

Answers (1)

Madhur Ahuja
Madhur Ahuja

Reputation: 22661

I believe LAUNCHER and MAIN action should be combined in order to show it in Launcher.

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

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

Change it to

 <activity
        android:name=".SplashScreen"
        android:label="@string/app_name"
        android:screenOrientation="portrait" >
        <intent-filter>
            <action android:name="android.intent.action.SPLASHSCREEN" />

        </intent-filter>

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

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

Upvotes: 3

Related Questions