diff --git a/samples/Support7Demos/src/com/example/android/supportv7/media/SampleMediaRouteProvider.java b/samples/Support7Demos/src/com/example/android/supportv7/media/SampleMediaRouteProvider.java
index ebf7e29..916710c 100644
--- a/samples/Support7Demos/src/com/example/android/supportv7/media/SampleMediaRouteProvider.java
+++ b/samples/Support7Demos/src/com/example/android/supportv7/media/SampleMediaRouteProvider.java
@@ -27,6 +27,7 @@
 import android.net.Uri;
 import android.os.Bundle;
 import android.support.v7.media.MediaControlIntent;
+import android.support.v7.media.MediaItemStatus;
 import android.support.v7.media.MediaRouteProvider;
 import android.support.v7.media.MediaRouter.ControlRequestCallback;
 import android.support.v7.media.MediaRouteProviderDescriptor;
@@ -212,24 +213,40 @@
                 int queueBehavior = intent.getIntExtra(
                         MediaControlIntent.EXTRA_ITEM_QUEUE_BEHAVIOR,
                         MediaControlIntent.ITEM_QUEUE_BEHAVIOR_PLAY_NOW);
-                int position = intent.getIntExtra(
-                        MediaControlIntent.EXTRA_ITEM_POSITION, 0);
+                double contentPosition = intent.getDoubleExtra(
+                        MediaControlIntent.EXTRA_ITEM_CONTENT_POSITION, 0);
                 Bundle metadata = intent.getBundleExtra(MediaControlIntent.EXTRA_ITEM_METADATA);
                 Bundle headers = intent.getBundleExtra(
                         MediaControlIntent.EXTRA_ITEM_HTTP_HEADERS);
-                String streamId = generateStreamId();
 
                 Log.d(TAG, mRouteId + ": Received play request, uri=" + uri
                         + ", queueBehavior=" + queueBehavior
-                        + ", position=" + position
+                        + ", contentPosition=" + contentPosition
                         + ", metadata=" + metadata
                         + ", headers=" + headers);
-                Toast.makeText(getContext(), "Route received play request: uri=" + uri,
-                        Toast.LENGTH_LONG).show();
-                if (callback != null) {
-                    Bundle result = new Bundle();
-                    result.putString(MediaControlIntent.EXTRA_ITEM_ID, streamId);
-                    callback.onResult(ControlRequestCallback.REQUEST_SUCCEEDED, result);
+
+                if (uri.toString().contains("hats")) {
+                    // Simulate generating an error whenever the uri contains the word 'hats'.
+                    Toast.makeText(getContext(), "Route rejected play request: uri=" + uri
+                            + ", no hats allowed!", Toast.LENGTH_LONG).show();
+                    if (callback != null) {
+                        callback.onError("Simulated error.  No hats allowed!", null);
+                    }
+                } else {
+                    Toast.makeText(getContext(), "Route received play request: uri=" + uri,
+                            Toast.LENGTH_LONG).show();
+                    String streamId = generateStreamId();
+                    if (callback != null) {
+                        MediaItemStatus status = new MediaItemStatus.Builder(
+                                MediaItemStatus.PLAYBACK_STATE_PLAYING)
+                                .setContentPosition(contentPosition)
+                                .build();
+
+                        Bundle result = new Bundle();
+                        result.putString(MediaControlIntent.EXTRA_ITEM_ID, streamId);
+                        result.putBundle(MediaControlIntent.EXTRA_ITEM_STATUS, status.asBundle());
+                        callback.onResult(result);
+                    }
                 }
                 return true;
             }
@@ -239,7 +256,7 @@
                 Bundle data = new Bundle();
                 data.putInt(DATA_PLAYBACK_COUNT, mPlaybackCount);
                 if (callback != null) {
-                    callback.onResult(ControlRequestCallback.REQUEST_SUCCEEDED, data);
+                    callback.onResult(data);
                 }
                 return true;
             }
diff --git a/samples/Support7Demos/src/com/example/android/supportv7/media/SampleMediaRouterActivity.java b/samples/Support7Demos/src/com/example/android/supportv7/media/SampleMediaRouterActivity.java
index 1acecc5..7e570f1 100644
--- a/samples/Support7Demos/src/com/example/android/supportv7/media/SampleMediaRouterActivity.java
+++ b/samples/Support7Demos/src/com/example/android/supportv7/media/SampleMediaRouterActivity.java
@@ -189,26 +189,22 @@
             MediaRouter.ControlRequestCallback callback =
                     new MediaRouter.ControlRequestCallback() {
                 @Override
-                public void onResult(int result, Bundle data) {
-                    switch (result) {
-                        case REQUEST_SUCCEEDED: {
-                            String streamId = data != null ? data.getString(
-                                    MediaControlIntent.EXTRA_ITEM_ID) : null;
+                public void onResult(Bundle data) {
+                    String streamId = data != null ? data.getString(
+                            MediaControlIntent.EXTRA_ITEM_ID) : null;
 
-                            Log.d(TAG, "Play request succeeded: streamId=" + streamId);
-                            Toast.makeText(SampleMediaRouterActivity.this,
-                                    "Now playing " + item.mName,
-                                    Toast.LENGTH_LONG).show();
-                            break;
-                        }
+                    Log.d(TAG, "Play request succeeded: data=" + data + " , streamId=" + streamId);
+                    Toast.makeText(SampleMediaRouterActivity.this,
+                            "Now playing " + item.mName,
+                            Toast.LENGTH_LONG).show();
+                }
 
-                        case REQUEST_FAILED:
-                            Log.d(TAG, "Play request failed.");
-                            Toast.makeText(SampleMediaRouterActivity.this,
-                                    "Unable to play " + item.mName,
-                                    Toast.LENGTH_LONG).show();
-                            break;
-                    }
+                @Override
+                public void onError(String error, Bundle data) {
+                    Log.d(TAG, "Play request failed: error=" + error + ", data=" + data);
+                    Toast.makeText(SampleMediaRouterActivity.this,
+                            "Unable to play " + item.mName + ", error: " + error,
+                            Toast.LENGTH_LONG).show();
                 }
             };
 
@@ -227,31 +223,28 @@
         if (route.supportsControlRequest(intent)) {
             MediaRouter.ControlRequestCallback callback = new MediaRouter.ControlRequestCallback() {
                 @Override
-                public void onResult(int result, Bundle data) {
-                    switch (result) {
-                        case REQUEST_SUCCEEDED:
-                            Log.d(TAG, "Statistics request succeeded: data=" + data);
-                            if (data != null) {
-                                int playbackCount = data.getInt(
-                                        SampleMediaRouteProvider.DATA_PLAYBACK_COUNT, -1);
-                                Toast.makeText(SampleMediaRouterActivity.this,
-                                        "Total playback count: " + playbackCount,
-                                        Toast.LENGTH_LONG).show();
-                            } else {
-                                Toast.makeText(SampleMediaRouterActivity.this,
-                                        "Statistics query did not return any data",
-                                        Toast.LENGTH_LONG).show();
-                            }
-                            break;
-
-                        case REQUEST_FAILED:
-                            Log.d(TAG, "Statistics request failed: data=" + data);
-                            Toast.makeText(SampleMediaRouterActivity.this,
-                                    "Unable to query statistics.",
-                                    Toast.LENGTH_LONG).show();
-                            break;
+                public void onResult(Bundle data) {
+                    Log.d(TAG, "Statistics request succeeded: data=" + data);
+                    if (data != null) {
+                        int playbackCount = data.getInt(
+                                SampleMediaRouteProvider.DATA_PLAYBACK_COUNT, -1);
+                        Toast.makeText(SampleMediaRouterActivity.this,
+                                "Total playback count: " + playbackCount,
+                                Toast.LENGTH_LONG).show();
+                    } else {
+                        Toast.makeText(SampleMediaRouterActivity.this,
+                                "Statistics query did not return any data",
+                                Toast.LENGTH_LONG).show();
                     }
                 }
+
+                @Override
+                public void onError(String error, Bundle data) {
+                    Log.d(TAG, "Statistics request failed: error=" + error + ", data=" + data);
+                    Toast.makeText(SampleMediaRouterActivity.this,
+                            "Unable to query statistics, error: " + error,
+                            Toast.LENGTH_LONG).show();
+                }
             };
 
             Log.d(TAG, "Sent statistics request: intent=" + intent);
