Code example for ServiceConnection

Methods: onServiceDisconnected

0
     * This lets us have it run in the background even if this isn't the active activity. 
     */ 
    protected void unbindFromService() { 
        if (mServiceConnection != null) {
            if (DEBUG) Log.d(TAG, "unbind service");
            mServiceConnection.onServiceDisconnected(null /*name*/);
            unbindService(mServiceConnection);
            mServiceConnection = null;
        } 
    } 
}