RemotePlaybackClient, stop() not getting callback

Solution 1:

I beleive all Answer reside on how you make connection. Because in google code ,code says that client which you had made shold not leave session and should not be null.

if (!mClient.hasSession()) {
   // ignore if no session
   return;
}

/*********Rest of the code would be unreachable***********/

@Override
public void pause() {
    if (!mClient.hasSession()) {
        // ignore if no session
        return;
    }
    if (DEBUG) {
        Log.d(TAG, "pause");
    }
    mClient.pause(null, new SessionActionCallback() {
        @Override
        public void onResult(Bundle data, String sessionId, MediaSessionStatus sessionStatus) {
            logStatus("pause: succeeded", sessionId, sessionStatus, null, null);
            if (mCallback != null) {
                mCallback.onPlaylistChanged();
            }
        }
        @Override
        public void onError(String error, int code, Bundle data) {
            logError("pause: failed", error, code);
        }
    });
}