My activity service starts and (when the service is still running in the background). What is the reference of the service after the activity is over?
I should only run the service. I really do not need any activity - it is used only for starting the service.
Public class increases main activity activity {@ Override Protected Zero (Bundled Saved Instance) {super.onCreate (savedInstanceState); If (BootDemoService.isInstanceCreated ()) {Intent Service Segment = New Intent (this, BootDemoService.class); StartService (serviceIntent); } This.finish (); } @ Override Public Boolean On Crate Option Menus (Menu Menu) {Return Correct; }}
In your case the same reference should be ApplicationContext.
Comments
Post a Comment