Android Activity with no GUI

Isaac Waller picture Isaac Waller · Feb 8, 2009 · Viewed 34.8k times · Source

I have created a activity that is only meant to be launched from a link (using a intent filter.) I do not want this activity to have a GUI - I just want it to start a service and put a notification in the bar. I have tried to put the intent filter for the link in my service, but that does not work. Is there a better thing to do this that will answer to intent filters - or can I just make my activity not have a GUI?
Sorry if I'm being confusing, Isaac

Answer

JoeHz picture JoeHz · Jun 25, 2011

Echoing previous response, you shouldn't use a broadcast receiver.

In the same situation, what I did was to declare the theme thusly:

<activity android:name="MyActivity"
          android:label="@string/app_name"
          android:theme="@android:style/Theme.NoDisplay">