Creating an Android Activity with no UI

How do you create an Activity based applications with no UI?

The answer is that you need to set the activity theme in the manifest, for RosieUtility I use:


Like this in AndroidManifest.xml:

<activity android:name=".MainActivity"
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />

If you just want to kick off something quick, you’ll also want to call “finish();” after firing the intent in onCreate of Activity

The latest set of activity themes are defined in /res/values/themes.xml in the Android source here.

Note I’m not using the theme ‘NoDisplay’ as I do actually show notifications on the screen as the Activity is going about its business.



One thought on “Creating an Android Activity with no UI

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s