Reputation: 49
I have found a minor problem when i install my application on real android device or run my App on emulator then it will shows the as many icons of my App as many Activities in my application for e.g. In my App I have three activity one for web service second one for web site or on for main Activity then after installation it show three icons with the App name one icon for full app, second icon for second activity and third one is for another activity. Please tell me how can I resolve this problem.
Thanks in advance for any suggestion or help.
Upvotes: 0
Views: 519
Reputation: 45493
You probably copied the following over to all three activities in your manifest file?
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
The first tells the system that the activity associated with this action is a 'main' entry point in your app. In other words: your telling Android that the activity can be launched/started from outside without providing extra data.
The launcher category says that the entry point should be listed in the (top-level) application launcher.
Usually you will only want to add above action and category to a single activity (the main entry point to your app). Or at least, I cannot think of a lot of cases in which you (should) want every activity to have both.
Upvotes: 2