Yes you can do this:
public class MyApplication extends Application { public void onCreate() { super.onCreate(); startService(new Intent(this, MyService.class)); } }
EDIT Do not call getApplicationContext (), just call startService (). Also, make sure you declare the service in your manifest.
LuxuryMode
source share