tags:

views:

35

answers:

1

Hi,

My Android App has 2 activities. A login screen and a search screen. When i deploy the app on emulator or on my device, i see 2 icons for same app. 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). By logic when i login it should show the search screen. Not sure when i'm making the mistake, would be of help if some one can point me in right direction.

Regards, Aravind. C

+1  A: 

Your manifest file should only have this line in the activity you want to have an icon:

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

Based on your description, it sounds like both activities have this line.

Aaron C
`MAIN` is not a category; it is an action. More generally, do not include an `<intent-filter>` for an activity in the manifest unless you need one. For simple apps, only the activity that needs an icon in the launcher should have an `<intent-filter>`.
CommonsWare
Hi Aaron,Thank you so much for the quick revert. Yes this was the issue and the app works as intended. Thanks again.Regards,Aravind. C
Aravindan. C