Android Activity without UI


Is it possible to create a Android activity without UI?

Yes it is. Android provides a theme for this requirement. Add the following line to your AndroidManifest.xml and call finish() at the end of the Activity’s onCreate() method.



public static final class – Added in API level 3
int Theme_NoDisplay
Default theme for activities that don’t actually display a UI; that is, they finish themselves before being resumed.

Constant Value: 16973909 (0x01030055)