Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

My android app is not being displayed in the app drawer?

I've made an sms application but when it's installed it does not appear on the app drawer (the bit where you launch applications from on the home screen)! I can confirm it is actually installed because i can launch it from intents from other programs and the icon/name even appears in 'manage applications' under settings! Once launched the whole app functions as it should (I even get the option to use it as default for sending sms!) so i don't think its anything to do with my java files, I have a feeling its something to do with my android manifest:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
  package="com.pearson.sms"
  android:versionCode="1"
  android:versionName="1.0">
<uses-sdk android:minSdkVersion="8" />
<uses-permission android:name="android.permission.SEND_SMS">
</uses-permission>
<uses-permission android:name="android.permission.RECEIVE_SMS">
</uses-permission>
<uses-permission android:name="android.permission.READ_SMS">
</uses-permission>
<uses-permission android:name="android.permission.WRITE_SMS">
</uses-permission>
<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:name=".DisplaySMSRecieved"
          android:label="@string/app_name">
    <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
        <data android:scheme="sms" /> 
    </intent-filter>
    <intent-filter>
            <action android:name="com.pearson.sms.LAUNCH" />  
            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
</activity>
<receiver android:name=".PearsonSMSReciever"> 
    <intent-filter> 
        <action android:name="android.provider.Telephony.SMS_RECEIVED" />
            <action android:name="android.intent.action.VIEW" />
            <category android:name="android.intent.category.DEFAULT" />
            <data android:scheme="sms" /> 
    </intent-filter> 
</receiver>
<activity android:name=".PearsonSMS"
          android:label="@string/send_sms">
          <intent-filter>
        <action android:name="android.intent.action.SENDTO" />
        <action android:name="android.intent.action.VIEW" />  
        <category android:name="android.intent.category.DEFAULT" />
        <data android:scheme="sms"/> 
    </intent-filter>
  </activity>
 </application>
</manifest>

It's a bit of a mess as I was struggling to make it work as a proper sms application, but I can't see what I've done wrong to make it not list itself on the app drawer, please help!

EDIT: sorted it, it was the intent filter

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

it shouldn't have the android:scheme in there, i changed it to

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

and it now gets listed in the app drawer :)

like image 792
AndroidNoob Avatar asked May 25 '11 15:05

AndroidNoob


2 Answers

You could try removing the data entry from your first intent filter for DisplaySMSRecieved. To appear on the launcher you need to have an intent filter like:

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

Make sure you have specified an icon and a name for your package so that it can be displayed in the list.

like image 63
fleetway76 Avatar answered Oct 19 '22 23:10

fleetway76


also, you can use double intent-filter like the following one inside your desired activity that uses data

<intent-filter>
    <action android:name="android.intent.action.MAIN" />
    <category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
    <action android:name="android.intent.action.MAIN" />
    <category android:name="android.intent.category.LAUNCHER" />
    <data android:scheme="sms" /> 
</intent-filter>
like image 23
Dasser Basyouni Avatar answered Oct 19 '22 23:10

Dasser Basyouni