Android apps installed as multiple icons

There are 2 events in my Android app. Login screen and search screen. When I deploy an application on an emulator or on my device, I see two icons for one application. When I click on icon 1, it opens screen 1 (login screen), and when I click on icon 2, it opens screen 2 (search screen). Logic should display a search screen when entering the system. Not sure when I make a mistake.

+50
android
Aug 20 '10 at 0:05
source share
3 answers

In the manifest file, only this line should be indicated in the action in which you want to have the icon:

<category android:name="android.intent.category.MAIN" /> 

Based on your description, it sounds as if both actions have this line.

+76
Aug 20 '10 at 0:09
source share

In your mainfest file, when you have the following tag in two different activity tags at the time, the Android app seems to be installed twice.

 <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> 
+20
04 Oct 2018-11-11T00:
source share

The comment made by @Adrian C on his answer solved our problem.

The manifest file of our main application contained only one intent-filter tag that defines only one action as launch activity for the application.

So I had to look deeper ...

We included library projects (fortunately written by us), and the manifest file of one of the library projects had an intent-filter tag in its activity, indicating that the activity is the launch activity.

When we included this library project in our main application (which has its own intent-filter that defines startup activity), the full source code saw two intent-filter tags that defined two actions as startup actions, and therefore two application icons were created.

When we removed the intent-filter , indicating the launch activity in the library project, the second application launch icon disappeared.

+2
Mar 22 '17 at 6:57
source share



All Articles