Reputation: 85
Hey I have a bit of a problem trying to locate my application in the App Drawer, it shows up everywhere else - Recent Applications (by holding down home) and it is also in the settings under Applications.
The only place it isn't is in the app drawer, my first guess is the Manifest?
The application runs perfectly fine.
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.zaknorris.brainhacker.v1"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="15" />
<application
android:icon="@drawable/ic_launcher"
android:label="Brain Hacker Pro"
android:theme="@style/AppTheme" >
<activity
android:name=".MainActivity"
android:label="Brain Hacker Pro" >
<intent-filter>
<action android:name="com.zaknorris.brainhacker.v1.Menu" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".attentionbuilder"
android:label="Attention Builder" >
<intent-filter>
<action android:name="com.zaknorris.brainhacker.v1.attentionbuilder" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
The icon is in the drawable is there and everything.
Not sure what's going on :\
New in Java
Upvotes: 7
Views: 6929
Reputation: 3071
Set MainLauncher=true
in IntentFilter
for the activity which you would want to open first. This answer is with respect to Xmarin.android.
For android Java:
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
Upvotes: 0
Reputation: 31466
Change your AndroidManifest to this one:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.zaknorris.brainhacker.v1"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="15" />
<application
android:icon="@drawable/ic_launcher"
android:label="Brain Hacker Pro"
android:theme="@style/AppTheme" >
<activity
android:name=".MainActivity"
android:label="Brain Hacker Pro" >
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".attentionbuilder"
android:label="Attention Builder" >
<intent-filter>
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
Upvotes: 2
Reputation: 46856
you need to have this:
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
inside of one of your activity elements
Upvotes: 13