You can create a dummy activity that simply starts the Service and then ends:
public class MyServiceActivity extends Activity { public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Intent intent = new Intent(this, MyService.class); startService(intent); finish(); } }
Daniel Lew
source share