I have a doubt regarding using service. Is it necessary to create an object of a service in order to start it or simply declaring a service variable is sufficient?
I want to know that whether a service is started by creating its object or you need to explicitly start the service by calling the start service method?
GPSService trackerService = new GPSService(RunningActivity.this);
Does the above line start the activity? Or it gets started on calling
Intent serviceIntent = new Intent(RunningActivity.this, GPSService.class);
startService(serviceIntent);
All I need is I want to access the service objects in my activity.
Please help.
Thank you.