Thank you for the reply.

I'm indeed returning a valid IBinder inside the service's onBind method. 
Here it is:

public class MyService extends IntentService {
    private Messenger myMessenger;

    // Service Constructor
    public MyService() {
        super("MyService");
        *myMessenger = new Messenger(new MyServiceHandler(this))*;
    }

    @Override
    public IBinder onBind(Intent intent) {
        Log.i(APP_TAG, "Inside service onBind");
        return *myMessenger.getBinder()*;
    }
    
    // other methods...
}

Moreover I ensured that my activity calls the *unbindService()* method only 
from inside its *onDestroy()* method and no where else. This is exactly 
what's been puzzling me as to why android still decides to unbind & kill the 
service even if the activity that spawned it is still alive in the first 
place.

Am I missing something here ?? Any pointers ???
Sincere Regards,
Kalyan

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to