0

I want to launch an Activity without having an Launchericon. So I removed the

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

from the Manifest. Now my Icon does not show up in the Launcher, but I my App to start for the first time, after this the User does not need to open the App(so therefor no need for a launcher icon).

So my Question is: Is there a way to not show a launcher Icon, but start the App just for the first time?

Thank you.

Ahmad
  • 69,608
  • 17
  • 111
  • 137

1 Answers1

6

after this the User does not need to open the App(so therefor no need for a launcher icon)

If they force-stop your app, they will need to go back in and launch one of your activities from the launcher, or otherwise cause something to explicitly run one of your components. Otherwise, your app will never run again (Android 3.1+).

Moreover, you need an always-available activity for your:

  • settings for your app (to control the behavior of whatever else your app is supplying)
  • license agreement
  • privacy policy
  • documentation
  • information about where to get support for the app
  • etc.

Hence, I strongly encourage you to have a meaningful activity that is in the launcher for your application.

That being said, you can disable your activity, and thereby have it stop appearing in the launcher, via a call to setComponentEnabledSetting() on PackageManager.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491