Pijusn
Pijusn

Reputation: 11293

Start Android application without launcher

How to start an application that has no launcher activity?

Story behind the problem: I have an application that is basically a BroadcastReceiver that waits for a couple system intents like BOOT_COMPLETED. The problem is that as my application has no Activity, it doesn't get started and so it receives no intent.

Android 3.1 release notes mention that intent options can be overridden to start up applications but I assume it requires another active application to do so.

P.S. Write all the ways you know. ADB commands as well.

Upvotes: 1

Views: 1742

Answers (1)

Richard Le Mesurier
Richard Le Mesurier

Reputation: 29714

First piece of advice would be to make a very simple "Welcome to my App" Activity that could be run. Use it to show a splash screen, some advertising, or be a settings screen. That gets you around the "no Activity" problem.

As far as I know, you cannot have anything hooking into BOOT_COMPLETED until and Activity in your application has been run. So you need to have an Activity of some sort.

Upvotes: 2

Related Questions