App launcher icon behaving in strange ways.

I have an app that has many activities, the main one being a splash screen that launches the proper main activity after doing some background work. When I drag an icon from the installed app list to the start screen of the phone, then launch the app, do something, press home - pressing the app icon brings the app from background instantly, returning to the last displayed activity and state. That's the behavior I want.

But after publishing the app, when I download it form Play Store it makes an automatic icon on the phones start screen. But that icon always launches the main activity of my app - a splash screen. When I make another icon next to it my dragging from the app list - it acts the way I expect - bringing the app from background instead of launching the splash screen. So now I have 2 app icons on the screen, that look the same yet behave in different ways.

Does anyone now how can I change the behavior of the automatic icon Google Play makes after installation, to that of the user dragged icon?

Posted May 16, 2013, 1:57 PM UTC

12
jonba2Trulia | PAST: WillowTree•

I'm guessing that, in your manifest, multiple activities are marked as entry points. You'll recognize it because they'll contain intent filter items like this:

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

Make sure that only your splash screen activity has this and it should work as intended.

1
AndroidWorkerOP•

Only my splash screen activity has that filter set. It is the single entry point to the activity.

1