Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

App icon not showing in programs list on Device

I'm working on an Android application and haven't had a problem running it on my HTC Incredible 2. However, the icon will not show up in my programs list. I can get to it only from the Recent Apps and the list of Installed Apps (it shows up under Downloaded). Any suggestions? Here's my AndroidManifest.xml:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.xxxxx.xxxxx" android:versionCode="1"
android:versionName="1.0">

<uses-sdk android:minSdkVersion="8" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

<application android:icon="@drawable/ic_launcher"
    android:label="@string/app_name" android:debuggable="true">
    <activity android:name=".XxxXxxDroidActivity"
        android:label="@string/app_name" android:theme="@android:style/Theme.Black.NoTitleBar">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <action android:name="android.intent.action.MEDIA_MOUNTED" />
            <data android:scheme="file" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <activity android:name=".FileManagerActivity"
        android:theme="@android:style/Theme.Black.NoTitleBar"></activity>
</application>

Any suggestions to fix this problem always involve the presence of the <intent-filter> lines, but Eclipse automatically added them and they make no difference for me one way or the other.

like image 372
superhawk610 Avatar asked Oct 19 '25 06:10

superhawk610


2 Answers

Had this same issue and found out that one caveat is that this correct intent on the main activity tag:

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

has to be in its own intent filter. you may have other items in the main activity's intent filters, and if so, separate the rest out in to a separate intent filter tag right below it. leave the MAIN and LAUNCHER together in its own.

Alot of the answers to this question on SO seem to miss that point.

Hope it helps!

like image 179
zonabi Avatar answered Oct 21 '25 20:10

zonabi


In your manifest, for the class XxxXxxDroidActivity add another intent-filter:

    <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>
like image 37
user Avatar answered Oct 21 '25 20:10

user



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!