How to start a service on its own?? I dont want to start the service from another activity.but i want to bind to the service to the activity.. my problem is exactly as described in this link. onServiceConnected never called after bindService method i.e my onserviceconnected is never called.
Messenger mService = null;
public void onServiceConnected(ComponentName className, IBinder service) {
mService = new Messenger(service);
Log.d("IMSLogging", "inside onServiceConnected");
}
from oncreate of my activity i am calling bindService.but i am getting a nullpointerexception when i am doing mService.send(msg); from oncreate.(after the bindService is called, of course.) though bindService is returning true.,