Move media router samples to new Support7Demos project.

Add media router support library to SDK build.

Bug: 8175766
Change-Id: I2f333d40ad39e820e8d706a7dab086241692a861
diff --git a/samples/Support7Demos/Android.mk b/samples/Support7Demos/Android.mk
new file mode 100644
index 0000000..0e43e3d
--- /dev/null
+++ b/samples/Support7Demos/Android.mk
@@ -0,0 +1,38 @@
+# Copyright (C) 2013 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+LOCAL_PATH:= $(call my-dir)
+
+# Build the samples.
+# We need to add some special AAPT flags to generate R classes
+# for resources that are included from the libraries.
+include $(CLEAR_VARS)
+LOCAL_PACKAGE_NAME := Support7Demos
+LOCAL_MODULE_TAGS := samples tests
+LOCAL_SDK_VERSION := current
+LOCAL_SRC_FILES := $(call all-java-files-under, src)
+LOCAL_STATIC_JAVA_LIBRARIES := \
+        android-support-v4 \
+        android-support-v7-appcompat \
+        android-support-v7-gridlayout \
+        android-support-v7-mediarouter
+LOCAL_RESOURCE_DIR = \
+        $(LOCAL_PATH)/res \
+        frameworks/support/v7/appcompat/res \
+        frameworks/support/v7/gridlayout/res \
+        frameworks/support/v7/mediarouter/res
+LOCAL_AAPT_FLAGS := \
+        --auto-add-overlay \
+        --extra-packages android.support.v7.appcompat:android.support.v7.gridlayout:android.support.v7.mediarouter
+include $(BUILD_PACKAGE)
diff --git a/samples/Support7Demos/AndroidManifest.xml b/samples/Support7Demos/AndroidManifest.xml
new file mode 100644
index 0000000..6d93b62
--- /dev/null
+++ b/samples/Support7Demos/AndroidManifest.xml
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2013 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<!-- Declare the contents of this Android application.  The namespace
+     attribute brings in the Android platform namespace, and the package
+     supplies a unique name for the application.  When writing your
+     own application, the package name must be changed from "com.example.*"
+     to come from a domain that you own or have control over. -->
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.example.android.supportv7">
+
+    <uses-sdk android:minSdkVersion="7" android:targetSdkVersion="17" />
+
+    <!-- The smallest screen this app works on is a phone.  The app will
+         scale its UI to larger screens but doesn't make good use of them
+         so allow the compatibility mode button to be shown (mostly because
+         this is just convenient for testing). -->
+    <supports-screens android:requiresSmallestWidthDp="320"
+            android:compatibleWidthLimitDp="480" />
+
+    <application android:label="@string/activity_sample_code"
+            android:icon="@drawable/app_sample_code"
+            android:hardwareAccelerated="true">
+
+        <activity android:name="Support7Demos">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        
+        <!-- MediaRouter Support Samples -->
+
+        <activity android:name=".media.SampleMediaRouterActivity"
+                android:label="@string/sample_media_router_activity">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="com.example.android.supportv7.SUPPORT4_SAMPLE_CODE" />
+            </intent-filter>
+        </activity>
+
+        <service android:name=".media.SampleMediaRouteProviderService"
+                android:label="@string/sample_media_route_provider_service"
+                android:process=":mediarouteprovider">
+            <intent-filter>
+                <action android:name="android.media.MediaRouteProviderService" />
+            </intent-filter>
+        </service>
+    </application>
+</manifest>
diff --git a/samples/Support7Demos/_index.html b/samples/Support7Demos/_index.html
new file mode 100644
index 0000000..0c017ab
--- /dev/null
+++ b/samples/Support7Demos/_index.html
@@ -0,0 +1,30 @@
+<p>The Support v7 Demos application contains a variety of small sample
+code showing how to use key features of the Android API 7+ Support Library.
+This library contains code that you can
+build in to your application to access new features and common
+utilities while being able to run down to version 2.1 (API 7)
+of the platform.
+</p>
+
+<script type="text/javascript">
+
+// This is a totally temporary hack to display the following content only
+// when the docs are online. This will be changed once the samples get moved.
+
+if (toRoot == "/") {
+
+document.write(""+
+"<p>You'll notice that all the samples are included in a single Android "+
+"project, so the application code and other resource files for all samples are batched "+
+"together.  To help you find the code that's relevant to you, here's a directory that "+
+"points to the program code for the different topics included in the project:</p>"+
+
+"<ul>"+
+"<li><a href='src/com/example/android/supportv7/app/index.html'>App</a></li>"+
+"<li><a href='src/com/example/android/supportv7/media/index.html'>Media</a></li>"+
+"<li><a href='src/com/example/android/supportv7/view/index.html'>Views</a></li>"+
+"</ul>");
+
+}
+
+</script>
diff --git a/samples/Support7Demos/res/drawable-hdpi/app_sample_code.png b/samples/Support7Demos/res/drawable-hdpi/app_sample_code.png
new file mode 100755
index 0000000..66a1984
--- /dev/null
+++ b/samples/Support7Demos/res/drawable-hdpi/app_sample_code.png
Binary files differ
diff --git a/samples/Support7Demos/res/drawable-hdpi/media_route_icon.png b/samples/Support7Demos/res/drawable-hdpi/media_route_icon.png
new file mode 100755
index 0000000..66a1984
--- /dev/null
+++ b/samples/Support7Demos/res/drawable-hdpi/media_route_icon.png
Binary files differ
diff --git a/samples/Support7Demos/res/drawable-mdpi/app_sample_code.png b/samples/Support7Demos/res/drawable-mdpi/app_sample_code.png
new file mode 100644
index 0000000..5ae7701
--- /dev/null
+++ b/samples/Support7Demos/res/drawable-mdpi/app_sample_code.png
Binary files differ
diff --git a/samples/Support7Demos/res/drawable-mdpi/media_route_icon.png b/samples/Support7Demos/res/drawable-mdpi/media_route_icon.png
new file mode 100644
index 0000000..5ae7701
--- /dev/null
+++ b/samples/Support7Demos/res/drawable-mdpi/media_route_icon.png
Binary files differ
diff --git a/samples/Support7Demos/res/layout/sample_media_router.xml b/samples/Support7Demos/res/layout/sample_media_router.xml
new file mode 100644
index 0000000..a8b08b1
--- /dev/null
+++ b/samples/Support7Demos/res/layout/sample_media_router.xml
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2013 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<!-- See corresponding Java code SampleMediaRouterActivity.java. -->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:orientation="vertical">
+
+    <!-- Message to show to use. -->
+    <TextView android:id="@+id/text"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_weight="0"
+        android:gravity="center_vertical|center_horizontal"
+        android:textAppearance="?android:attr/textAppearanceMedium"
+        android:text="@string/sample_media_router_text"/>
+
+    <!-- Some information about what's going on. -->
+    <TextView android:id="@+id/info"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_weight="0"
+        android:gravity="center_vertical|center_horizontal"
+        android:textAppearance="?android:attr/textAppearanceMedium"/>
+
+    <!-- Some media to play. -->
+    <ListView android:id="@+id/media"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_weight="1"/>
+
+    <!-- Control buttons for the currently selected route. -->
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_weight="0">
+        <Button android:id="@+id/play_button"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_weight="0"
+            android:text="@string/play_button_text" />
+
+        <Button android:id="@+id/statistics_button"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_weight="0"
+            android:text="@string/statistics_button_text" />
+    </LinearLayout>
+</LinearLayout>
diff --git a/samples/Support7Demos/res/menu/sample_media_router_menu.xml b/samples/Support7Demos/res/menu/sample_media_router_menu.xml
new file mode 100644
index 0000000..404654f
--- /dev/null
+++ b/samples/Support7Demos/res/menu/sample_media_router_menu.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2012 Google Inc.
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<menu xmlns:android="http://schemas.android.com/apk/res/android">
+<!-- TODO: Use MediaRouter support library -->
+    <item android:id="@+id/menu_media_route"
+        android:title="@string/sample_media_router_play_on"
+        android:showAsAction="always"
+        android:orderInCategory="1"
+        android:actionProviderClass="android.app.MediaRouteActionProvider"/>
+</menu>
diff --git a/samples/Support7Demos/res/values/arrays.xml b/samples/Support7Demos/res/values/arrays.xml
new file mode 100644
index 0000000..f5616a1
--- /dev/null
+++ b/samples/Support7Demos/res/values/arrays.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2013 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<resources>
+    <string-array name="media_names">
+        <item>My favorite video of cats</item>
+        <item>Cats on parade</item>
+        <item>Cats with hats</item>
+        <item>Hats on cats</item>
+        <item>Cats on mats</item>
+    </string-array>
+
+    <string-array name="media_uris">
+        <item>http://cats.example.com/favorite-cats.mp4</item>
+        <item>http://cats.example.com/cats-on-parade.mp4</item>
+        <item>http://cats.example.com/cats-with-hats.mp4</item>
+        <item>http://cats.example.com/hats-on-cats.mp4</item>
+        <item>http://cats.example.com/cats-on-mats.mp4</item>
+    </string-array>
+</resources>
diff --git a/samples/Support7Demos/res/values/strings.xml b/samples/Support7Demos/res/values/strings.xml
new file mode 100644
index 0000000..d7ccc44
--- /dev/null
+++ b/samples/Support7Demos/res/values/strings.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2013 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="activity_sample_code">Support v7 Demos</string>
+
+    <!-- MediaRouter -->
+
+    <string name="sample_media_router_activity">Media/MediaRouter</string>
+    <string name="sample_media_router_text">This activity demonstrates how to
+            use MediaRouter from the support library.  Select a route from the action bar.</string>
+    <string name="sample_media_router_play_on">Play on...</string>
+
+    <string name="play_button_text">Play</string>
+    <string name="statistics_button_text">Show Statistics</string>
+
+    <string name="sample_media_route_provider_service">Media Route Provider Service Support Library Sample</string>
+    <string name="fixed_volume_route_name">Fixed Volume Remote Playback Route</string>
+    <string name="variable_volume_route_name">Variable Volume Remote Playback Route</string>
+</resources>
diff --git a/samples/Support7Demos/src/com/example/android/supportv7/Support7Demos.java b/samples/Support7Demos/src/com/example/android/supportv7/Support7Demos.java
new file mode 100644
index 0000000..d2e6335
--- /dev/null
+++ b/samples/Support7Demos/src/com/example/android/supportv7/Support7Demos.java
@@ -0,0 +1,151 @@
+/*
+ * Copyright (C) 2013 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.example.android.supportv7;
+
+import android.app.ListActivity;
+import android.content.Intent;
+import android.content.pm.PackageManager;
+import android.content.pm.ResolveInfo;
+import android.os.Bundle;
+import android.view.View;
+import android.widget.ListView;
+import android.widget.SimpleAdapter;
+
+import java.text.Collator;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class Support7Demos extends ListActivity {
+
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+
+        Intent intent = getIntent();
+        String path = intent.getStringExtra("com.example.android.apis.Path");
+
+        if (path == null) {
+            path = "";
+        }
+
+        setListAdapter(new SimpleAdapter(this, getData(path),
+                android.R.layout.simple_list_item_1, new String[] { "title" },
+                new int[] { android.R.id.text1 }));
+        getListView().setTextFilterEnabled(true);
+    }
+
+    protected List<Map<String, Object>> getData(String prefix) {
+        List<Map<String, Object>> myData = new ArrayList<Map<String, Object>>();
+
+        Intent mainIntent = new Intent(Intent.ACTION_MAIN, null);
+        mainIntent.addCategory("com.example.android.supportv7.SUPPORT4_SAMPLE_CODE");
+
+        PackageManager pm = getPackageManager();
+        List<ResolveInfo> list = pm.queryIntentActivities(mainIntent, 0);
+
+        if (null == list)
+            return myData;
+
+        String[] prefixPath;
+        String prefixWithSlash = prefix;
+
+        if (prefix.equals("")) {
+            prefixPath = null;
+        } else {
+            prefixPath = prefix.split("/");
+            prefixWithSlash = prefix + "/";
+        }
+
+        int len = list.size();
+
+        Map<String, Boolean> entries = new HashMap<String, Boolean>();
+
+        for (int i = 0; i < len; i++) {
+            ResolveInfo info = list.get(i);
+            CharSequence labelSeq = info.loadLabel(pm);
+            String label = labelSeq != null
+                    ? labelSeq.toString()
+                    : info.activityInfo.name;
+
+            if (prefixWithSlash.length() == 0 || label.startsWith(prefixWithSlash)) {
+
+                String[] labelPath = label.split("/");
+
+                String nextLabel = prefixPath == null ? labelPath[0] : labelPath[prefixPath.length];
+
+                if ((prefixPath != null ? prefixPath.length : 0) == labelPath.length - 1) {
+                    addItem(myData, nextLabel, activityIntent(
+                            info.activityInfo.applicationInfo.packageName,
+                            info.activityInfo.name));
+                } else {
+                    if (entries.get(nextLabel) == null) {
+                        addItem(myData, nextLabel, browseIntent(
+                                prefix.equals("") ? nextLabel : prefix + "/" + nextLabel));
+                        entries.put(nextLabel, true);
+                    }
+                }
+            }
+        }
+
+        Collections.sort(myData, sDisplayNameComparator);
+
+        return myData;
+    }
+
+    private final static Comparator<Map<String, Object>> sDisplayNameComparator =
+        new Comparator<Map<String, Object>>() {
+        private final Collator   collator = Collator.getInstance();
+
+        @Override
+        public int compare(Map<String, Object> map1, Map<String, Object> map2) {
+            return collator.compare(map1.get("title"), map2.get("title"));
+        }
+    };
+
+    protected Intent activityIntent(String pkg, String componentName) {
+        Intent result = new Intent();
+        result.setClassName(pkg, componentName);
+        return result;
+    }
+
+    protected Intent browseIntent(String path) {
+        Intent result = new Intent();
+        result.setClass(this, Support7Demos.class);
+        result.putExtra("com.example.android.apis.Path", path);
+        return result;
+    }
+
+    protected void addItem(List<Map<String, Object>> data, String name, Intent intent) {
+        Map<String, Object> temp = new HashMap<String, Object>();
+        temp.put("title", name);
+        temp.put("intent", intent);
+        data.add(temp);
+    }
+
+    @Override
+    @SuppressWarnings("unchecked")
+    protected void onListItemClick(ListView l, View v, int position, long id) {
+        Map<String, Object> map = (Map<String, Object>)l.getItemAtPosition(position);
+
+        Intent intent = (Intent) map.get("intent");
+        startActivity(intent);
+    }
+}
diff --git a/samples/Support7Demos/src/com/example/android/supportv7/_package.html b/samples/Support7Demos/src/com/example/android/supportv7/_package.html
new file mode 100644
index 0000000..be85e78
--- /dev/null
+++ b/samples/Support7Demos/src/com/example/android/supportv7/_package.html
@@ -0,0 +1,24 @@
+<html>
+<head>
+<link rel="stylesheet" type="text/css" href="assets/style.css" />
+<script type="text/javascript" src="http://www.corp.google.com/style/prettify.js"></script>
+<script src="http://www.corp.google.com/eng/techpubs/include/navbar.js" type="text/javascript"></script>
+
+
+
+</head>
+
+<body>
+
+<p>
+Examples of how to use support library APIs.  See:
+
+<ol>
+    <li> <a href="com.example.android.supportv7.app">sdk.app</a> for examples
+        of using the application package support APIs.
+</ol>
+</p>
+
+
+</body>
+</html>
diff --git a/samples/Support7Demos/src/com/example/android/supportv7/app/_index.html b/samples/Support7Demos/src/com/example/android/supportv7/app/_index.html
new file mode 100644
index 0000000..d203ffb
--- /dev/null
+++ b/samples/Support7Demos/src/com/example/android/supportv7/app/_index.html
@@ -0,0 +1,102 @@
+
+<p>This section includes samples showing the use of the application
+package features of the static support library, in particular fragments
+and loaders.</p>
+<ul>
+  <li><a href="#Fragment">Fragment</a></li>
+  <li><a href="#LoaderManager">LoaderManager</a></li>
+</ul>
+
+
+<h3 id="Fragment">Fragment</h3>
+<dl>
+  <dt><a href="FragmentAlertDialogSupport.html">Fragment Alert Dialog</a></dt>
+  <dd>Demonstrates how to use a DialogFragment to show and manage an
+  AlertDialog.</dd>
+  
+  <dt><a href="FragmentArgumentsSupport.html">Fragment Arguments</a></dt>
+  <dd>Demonstrates how a fragment can be initialized with arguments,
+  supplying them either as an argument Bundle at runtime or XML attributes
+  in a &lt;fragment> tag.</dd>
+  
+  <dt><a href="FragmentContextMenuSupport.html">Fragment Context Menu</a></dt>
+  <dd>Demonstrates how to display and respond to a context menu that is
+  display from a fragment's view hierarchy.</dd>
+  
+  <dt><a href="FragmentCustomAnimationSupport.html">Fragment Custom Animation</a></dt>
+  <dd>Demonstrates the use of a custom animation for pushing and popping fragments
+  on the back stack.</dd>
+
+  <dt><a href="FragmentDialogSupport.html">Fragment Dialog</a></dt>
+  <dd>Demonstrates use of DialogFragment to show various types of dialogs.</dd>
+  
+  <dt><a href="FragmentDialogOrActivitySupport.html">Fragment Dialog or Activity</a></dt>
+  <dd>Demonstrates how the same Fragment implementation can be used to provide the UI
+  for either an Activity or Dialog.</dd>
+  
+  <dt><a href="FragmentHideShowSupport.html">Fragment Hide Show</a></dt>
+  <dd>Demonstrates hiding and showing fragments.</dd>
+  
+  <dt><a href="FragmentLayoutSupport.html">Fragment Layout</a></dt>
+  <dd>Demonstrates use of the &lt;fragment&gt; tag to embed a Fragment in
+  an Activity's content view layout, and making the layout change based on
+  configuration to achieve different UI flows.</dd>
+  
+  <dt><a href="FragmentListArraySupport.html">Fragment List Array</a></dt>
+  <dd>Demonstrates use of ListFragment to show the contents of a simple ArrayAdapter.</dd>
+  
+  <dt><a href="FragmentMenuSupport.html">Fragment Menu</a></dt>
+  <dd>Demonstrates populating custom menu items from a Fragment.</dd>
+  
+  <dt><a href="FragmentPagerSupport.html">Fragment Pager Support</a></dt>
+  <dd>Demonstrates the use of the support class ViewPager with a
+  FragmentPagerAdapter to build a user interface where the user can fling
+  left or right to switch between fragments.</dd>
+
+  <dt><a href="FragmentStatePagerSupport.html">Fragment State Pager Support</a></dt>
+  <dd>Demonstrates the use of the support class ViewPager with a
+  FragmentStatePagerAdapter to build a user interface where the user can fling
+  left or right to switch between fragments.  This versions of the adapter
+  doesn't keep around the fragment instances that ViewPager has destroyed.</dd>
+
+  <dt><a href="FragmentReceiveResultSupport.html">Fragment Receive Result</a></dt>
+  <dd>Demonstrates starting a new Activity from a Fragment, and receiving
+  a result back from it.</dd>
+  
+  <dt><a href="FragmentRetainInstanceSupport.html">Fragment Retain Instance</a></dt>
+  <dd>Demonstrates a Fragment can be used to easily retain active state across
+  an Activity's configuration change.</dd>
+  
+  <dt><a href="FragmentStackSupport.html">Fragment Stack</a></dt>
+  <dd>Demonstrates creating a stack of Fragment instances similar to the
+  traditional stack of activities.</dd>
+  
+  <dt><a href="FragmentTabs.html">Fragment Tabs</a></dt>
+  <dd>Demonstrates the use of fragments to implement switching between
+  tabs in a TabHost.</dd>
+
+  <dt><a href="FragmentTabsPager.html">Fragment Tabs Pager</a></dt>
+  <dd>Demonstrates the use of fragments to implement switching between
+  tabs in a TabHost, using a ViewPager to manager the fragments so that
+  the user can also fling left and right to switch tabs.</dd>
+
+</dl>
+
+<h3 id="LoaderManager">LoaderManager</h3>
+<dl>
+  <dt><a href="LoaderCursorSupport.html">Loader Cursor</a></dt>
+  <dd>Demonstrates use of LoaderManager to perform a query for a Cursor that
+  populates a ListFragment.</dd>
+
+  <dt><a href="LoaderCustomSupport.html">Loader Custom</a></dt>
+  <dd>Demonstrates implementation and use of a custom Loader class.  The
+  custom class here "loads" the currently installed applications.</dd>
+  
+  <dt><a href="LoaderThrottleSupport.html">Loader Throttle</a></dt>
+  <dd>Complete end-to-end demonstration of a simple content provider that
+  populates data in a list through a cursor loader.  The UI allows the list
+  to be populated with a series of items, showing how AsyncTaskLoader's
+  throttling facility can be used to control how much a Loader is refreshed
+  in this case.</dd>
+</dl>
+ 
\ No newline at end of file
diff --git a/samples/Support7Demos/src/com/example/android/supportv7/media/SampleMediaRouteProvider.java b/samples/Support7Demos/src/com/example/android/supportv7/media/SampleMediaRouteProvider.java
new file mode 100644
index 0000000..3d8abc9
--- /dev/null
+++ b/samples/Support7Demos/src/com/example/android/supportv7/media/SampleMediaRouteProvider.java
@@ -0,0 +1,218 @@
+/*
+ * Copyright (C) 2013 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.example.android.supportv7.media;
+
+import com.example.android.supportv7.R;
+
+import android.content.Context;
+import android.content.Intent;
+import android.content.IntentFilter;
+import android.content.IntentFilter.MalformedMimeTypeException;
+import android.content.res.Resources;
+import android.media.MediaRouter;
+import android.net.Uri;
+import android.os.Bundle;
+import android.support.v7.media.MediaControlIntent;
+import android.support.v7.media.MediaRouteProvider;
+import android.support.v7.media.MediaRouter.ControlRequestCallback;
+import android.util.Log;
+import android.widget.Toast;
+
+/**
+ * Demonstrates how to create a custom media route provider.
+ *
+ * @see SampleMediaRouteProviderService
+ */
+final class SampleMediaRouteProvider extends MediaRouteProvider {
+    private static final String TAG = "SampleMediaRouteProvider";
+
+    private static final String FIXED_VOLUME_ROUTE_ID = "fixed";
+    private static final String VARIABLE_VOLUME_ROUTE_ID = "variable";
+    private static final int VOLUME_MAX = 10;
+
+    /**
+     * A custom media control intent category for special requests that are
+     * supported by this provider's routes.
+     */
+    public static final String CATEGORY_SAMPLE_ROUTE =
+            "com.example.android.supportv4.media.CATEGORY_SAMPLE_ROUTE";
+
+    /**
+     * A custom media control intent action for special requests that are
+     * supported by this provider's routes.
+     * <p>
+     * This particular request is designed to return a bundle of not very
+     * interesting statistics for demonstration purposes.
+     * </p>
+     *
+     * @see #DATA_PLAYBACK_COUNT
+     */
+    public static final String ACTION_GET_STATISTICS =
+            "com.example.android.supportv4.media.ACTION_GET_STATISTICS";
+
+    /**
+     * {@link #ACTION_GET_STATISTICS} result data: Number of times the
+     * playback action was invoked.
+     */
+    public static final String DATA_PLAYBACK_COUNT =
+            "com.example.android.supportv4.media.EXTRA_PLAYBACK_COUNT";
+
+    private static final IntentFilter[] CONTROL_FILTERS;
+    static {
+        CONTROL_FILTERS = new IntentFilter[2];
+
+        CONTROL_FILTERS[0] = new IntentFilter();
+        CONTROL_FILTERS[0].addCategory(CATEGORY_SAMPLE_ROUTE);
+        CONTROL_FILTERS[0].addAction(ACTION_GET_STATISTICS);
+
+        CONTROL_FILTERS[1] = new IntentFilter();
+        CONTROL_FILTERS[1].addCategory(MediaControlIntent.CATEGORY_REMOTE_PLAYBACK);
+        CONTROL_FILTERS[1].addAction(MediaControlIntent.ACTION_PLAY);
+        CONTROL_FILTERS[1].addDataScheme("http");
+        CONTROL_FILTERS[1].addDataScheme("https");
+        addDataTypeUnchecked(CONTROL_FILTERS[1], "video/*");
+    }
+
+    private static void addDataTypeUnchecked(IntentFilter filter, String type) {
+        try {
+            filter.addDataType(type);
+        } catch (MalformedMimeTypeException ex) {
+            throw new RuntimeException(ex);
+        }
+    }
+
+    private int mVolume = 5;
+    private int mPlaybackCount;
+
+    public SampleMediaRouteProvider(Context context) {
+        super(context);
+
+        publishRoutes();
+    }
+
+    @Override
+    public RouteController onCreateRouteController(String routeId) {
+        return new SampleRouteController(routeId);
+    }
+
+    private void publishRoutes() {
+        Resources r = getContext().getResources();
+
+        RouteDescriptor routeDescriptor1 = new RouteDescriptor(
+                FIXED_VOLUME_ROUTE_ID,
+                r.getString(R.string.fixed_volume_route_name));
+        routeDescriptor1.setControlFilters(CONTROL_FILTERS);
+        routeDescriptor1.setIconResource(R.drawable.media_route_icon);
+        routeDescriptor1.setPlaybackType(MediaRouter.RouteInfo.PLAYBACK_TYPE_REMOTE);
+        routeDescriptor1.setVolumeHandling(MediaRouter.RouteInfo.PLAYBACK_VOLUME_FIXED);
+        routeDescriptor1.setVolume(VOLUME_MAX);
+
+        RouteDescriptor routeDescriptor2 = new RouteDescriptor(
+                VARIABLE_VOLUME_ROUTE_ID,
+                r.getString(R.string.variable_volume_route_name));
+        routeDescriptor2.setControlFilters(CONTROL_FILTERS);
+        routeDescriptor2.setIconResource(R.drawable.media_route_icon);
+        routeDescriptor2.setPlaybackType(MediaRouter.RouteInfo.PLAYBACK_TYPE_REMOTE);
+        routeDescriptor2.setVolumeHandling(MediaRouter.RouteInfo.PLAYBACK_VOLUME_VARIABLE);
+        routeDescriptor2.setVolumeMax(VOLUME_MAX);
+        routeDescriptor2.setVolume(mVolume);
+
+        ProviderDescriptor providerDescriptor = new ProviderDescriptor();
+        providerDescriptor.setRoutes(new RouteDescriptor[] {
+            routeDescriptor1, routeDescriptor2
+        });
+        setDescriptor(providerDescriptor);
+    }
+
+    private final class SampleRouteController extends MediaRouteProvider.RouteController {
+        private final String mRouteId;
+
+        public SampleRouteController(String routeId) {
+            mRouteId = routeId;
+            Log.d(TAG, mRouteId + ": Controller created");
+        }
+
+        @Override
+        public void release() {
+            Log.d(TAG, mRouteId + ": Controller released");
+        }
+
+        @Override
+        public void select() {
+            Log.d(TAG, mRouteId + ": Selected");
+        }
+
+        @Override
+        public void unselect() {
+            Log.d(TAG, mRouteId + ": Unselected");
+        }
+
+        @Override
+        public void setVolume(int volume) {
+            Log.d(TAG, mRouteId + ": Set volume to " + volume);
+            if (mRouteId.equals(VARIABLE_VOLUME_ROUTE_ID)) {
+                setVolumeInternal(volume);
+            }
+        }
+
+        @Override
+        public void updateVolume(int delta) {
+            Log.d(TAG, mRouteId + ": Update volume by " + delta);
+            if (mRouteId.equals(VARIABLE_VOLUME_ROUTE_ID)) {
+                setVolumeInternal(mVolume + delta);
+            }
+        }
+
+        private void setVolumeInternal(int volume) {
+            if (volume >= 0 && volume <= VOLUME_MAX) {
+                mVolume = volume;
+                Log.d(TAG, mRouteId + ": New volume is " + mVolume);
+                publishRoutes();
+            }
+        }
+
+        @Override
+        public boolean sendControlRequest(Intent intent, ControlRequestCallback callback) {
+            Log.d(TAG, mRouteId + ": Received control request " + intent);
+            if (intent.getAction().equals(MediaControlIntent.ACTION_PLAY)
+                    && intent.hasCategory(MediaControlIntent.CATEGORY_REMOTE_PLAYBACK)
+                    && intent.getData() != null) {
+                mPlaybackCount +=1;
+
+                Uri uri = intent.getData();
+                Log.d(TAG, mRouteId + ": Received play request, uri=" + uri);
+                Toast.makeText(getContext(), "Route received play request: uri=" + uri,
+                        Toast.LENGTH_LONG).show();
+                if (callback != null) {
+                    callback.onResult(ControlRequestCallback.REQUEST_SUCCEEDED, null);
+                }
+                return true;
+            }
+
+            if (intent.getAction().equals(ACTION_GET_STATISTICS)
+                    && intent.hasCategory(CATEGORY_SAMPLE_ROUTE)) {
+                Bundle data = new Bundle();
+                data.putInt(DATA_PLAYBACK_COUNT, mPlaybackCount);
+                if (callback != null) {
+                    callback.onResult(ControlRequestCallback.REQUEST_SUCCEEDED, data);
+                }
+                return true;
+            }
+            return false;
+        }
+    }
+}
\ No newline at end of file
diff --git a/samples/Support7Demos/src/com/example/android/supportv7/media/SampleMediaRouteProviderService.java b/samples/Support7Demos/src/com/example/android/supportv7/media/SampleMediaRouteProviderService.java
new file mode 100644
index 0000000..bb0aa07
--- /dev/null
+++ b/samples/Support7Demos/src/com/example/android/supportv7/media/SampleMediaRouteProviderService.java
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2013 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.example.android.supportv7.media;
+
+import android.support.v7.media.MediaRouteProvider;
+import android.support.v7.media.MediaRouteProviderService;
+
+/**
+ * Demonstrates how to register a custom media route provider service
+ * using the support library.
+ *
+ * @see SampleMediaRouteProvider
+ */
+public class SampleMediaRouteProviderService extends MediaRouteProviderService {
+    @Override
+    public MediaRouteProvider onCreateMediaRouteProvider() {
+        return new SampleMediaRouteProvider(this);
+    }
+}
diff --git a/samples/Support7Demos/src/com/example/android/supportv7/media/SampleMediaRouterActivity.java b/samples/Support7Demos/src/com/example/android/supportv7/media/SampleMediaRouterActivity.java
new file mode 100644
index 0000000..c3ead3c
--- /dev/null
+++ b/samples/Support7Demos/src/com/example/android/supportv7/media/SampleMediaRouterActivity.java
@@ -0,0 +1,340 @@
+/*
+ * Copyright (C) 2013 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.example.android.supportv7.media;
+
+import com.example.android.supportv7.R;
+
+import android.app.Activity;
+import android.app.MediaRouteActionProvider;
+import android.content.Intent;
+import android.net.Uri;
+import android.os.Bundle;
+import android.support.v7.media.MediaControlIntent;
+import android.support.v7.media.MediaRouter;
+import android.support.v7.media.MediaRouter.RouteInfo;
+import android.support.v7.media.MediaRouter.ProviderInfo;
+import android.util.Log;
+import android.view.Menu;
+import android.view.MenuItem;
+import android.view.View;
+import android.view.View.OnClickListener;
+import android.widget.AdapterView.OnItemClickListener;
+import android.widget.AdapterView;
+import android.widget.ArrayAdapter;
+import android.widget.Button;
+import android.widget.ListView;
+import android.widget.TextView;
+import android.widget.Toast;
+
+/**
+ * <h3>Media Router Support Activity</h3>
+ *
+ * <p>
+ * This demonstrates how to use the {@link MediaRouter} API to build an
+ * application that allows the user to send content to various rendering
+ * targets.
+ * </p>
+ */
+public class SampleMediaRouterActivity extends Activity {
+    private final String TAG = "MediaRouterSupport";
+
+    private MediaRouter mMediaRouter;
+    private ArrayAdapter<MediaItem> mMediaItems;
+    private TextView mInfoTextView;
+    private ListView mMediaListView;
+    private Button mPlayButton;
+    private Button mStatisticsButton;
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        // Be sure to call the super class.
+        super.onCreate(savedInstanceState);
+
+        // Get the media router service.
+        mMediaRouter = MediaRouter.getInstance(this);
+
+        // Populate an array adapter with fake media items.
+        String[] mediaNames = getResources().getStringArray(R.array.media_names);
+        String[] mediaUris = getResources().getStringArray(R.array.media_uris);
+        mMediaItems = new ArrayAdapter<MediaItem>(this,
+                android.R.layout.simple_list_item_single_choice, android.R.id.text1);
+        for (int i = 0; i < mediaNames.length; i++) {
+            mMediaItems.add(new MediaItem(mediaNames[i], Uri.parse(mediaUris[i])));
+        }
+
+        // Initialize the layout.
+        setContentView(R.layout.sample_media_router);
+
+        mInfoTextView = (TextView)findViewById(R.id.info);
+
+        mMediaListView = (ListView)findViewById(R.id.media);
+        mMediaListView.setAdapter(mMediaItems);
+        mMediaListView.setChoiceMode(ListView.CHOICE_MODE_SINGLE);
+        mMediaListView.setOnItemClickListener(new OnItemClickListener() {
+            @Override
+            public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
+                updateButtons();
+            }
+        });
+
+        mPlayButton = (Button)findViewById(R.id.play_button);
+        mPlayButton.setOnClickListener(new OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                play();
+            }
+        });
+
+        mStatisticsButton = (Button)findViewById(R.id.statistics_button);
+        mStatisticsButton.setOnClickListener(new OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                showStatistics();
+            }
+        });
+    }
+
+    @Override
+    protected void onResume() {
+        // Be sure to call the super class.
+        super.onResume();
+
+        // Listen for changes to media routes.
+        mMediaRouter.addCallback(mMediaRouterCallback);
+        updateRouteStatus();
+    }
+
+    @Override
+    protected void onPause() {
+        // Be sure to call the super class.
+        super.onPause();
+
+        // Stop listening for changes to media routes.
+        mMediaRouter.removeCallback(mMediaRouterCallback);
+    }
+
+    // TODO: Use ActionBar support library.
+    @Override
+    public boolean onCreateOptionsMenu(Menu menu) {
+        // Be sure to call the super class.
+        super.onCreateOptionsMenu(menu);
+
+        // Inflate the menu and configure the media router action provider.
+        getMenuInflater().inflate(R.menu.sample_media_router_menu, menu);
+
+        // TODO: Use support library media route action provider.
+        MenuItem mediaRouteMenuItem = menu.findItem(R.id.menu_media_route);
+        MediaRouteActionProvider mediaRouteActionProvider =
+                (MediaRouteActionProvider)mediaRouteMenuItem.getActionProvider();
+        mediaRouteActionProvider.setRouteTypes(
+                android.media.MediaRouter.ROUTE_TYPE_LIVE_AUDIO
+                | android.media.MediaRouter.ROUTE_TYPE_LIVE_VIDEO
+                | android.media.MediaRouter.ROUTE_TYPE_USER);
+
+        // Return true to show the menu.
+        return true;
+    }
+
+    private void updateRouteStatus() {
+        RouteInfo route = mMediaRouter.getSelectedRoute();
+        mInfoTextView.setText("Currently selected route: " + route.getName()
+                + " from provider " + route.getProvider().getPackageName()
+                + ", status: " + route.getStatus());
+        updateButtons();
+    }
+
+    private void updateButtons() {
+        MediaRouter.RouteInfo route = mMediaRouter.getSelectedRoute();
+
+        MediaItem item = getCheckedMediaItem();
+        if (item != null) {
+            mPlayButton.setEnabled(route.supportsControlRequest(makePlayIntent(item)));
+        } else {
+            mPlayButton.setEnabled(false);
+        }
+
+        mStatisticsButton.setEnabled(route.supportsControlRequest(makeStatisticsIntent()));
+    }
+
+    private void play() {
+        final MediaItem item = getCheckedMediaItem();
+        if (item == null) {
+            return;
+        }
+
+        MediaRouter.RouteInfo route = mMediaRouter.getSelectedRoute();
+        Intent intent = makePlayIntent(item);
+        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, "Play request succeeded: data=" + data);
+                            Toast.makeText(SampleMediaRouterActivity.this,
+                                    "Now playing " + item.mName,
+                                    Toast.LENGTH_LONG).show();
+                            break;
+
+                        case REQUEST_FAILED:
+                            Log.d(TAG, "Play request failed: data=" + data);
+                            Toast.makeText(SampleMediaRouterActivity.this,
+                                    "Unable to play " + item.mName,
+                                    Toast.LENGTH_LONG).show();
+                            break;
+                    }
+                }
+            };
+
+            Log.d(TAG, "Sending play request: intent=" + intent);
+            route.sendControlRequest(intent, callback);
+        } else {
+            Log.d(TAG, "Play request not supported: intent=" + intent);
+            Toast.makeText(SampleMediaRouterActivity.this,
+                    "Play not supported for " + item.mName, Toast.LENGTH_LONG).show();
+        }
+    }
+
+    private void showStatistics() {
+        MediaRouter.RouteInfo route = mMediaRouter.getSelectedRoute();
+        Intent intent = makeStatisticsIntent();
+        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;
+                    }
+                }
+            };
+
+            Log.d(TAG, "Sent statistics request: intent=" + intent);
+            route.sendControlRequest(intent, callback);
+        } else {
+            Log.d(TAG, "Statistics request not supported: intent=" + intent);
+            Toast.makeText(SampleMediaRouterActivity.this,
+                    "Statistics not supported.", Toast.LENGTH_LONG).show();
+        }
+    }
+
+    private Intent makePlayIntent(MediaItem item) {
+        Intent intent = new Intent(MediaControlIntent.ACTION_PLAY);
+        intent.addCategory(MediaControlIntent.CATEGORY_REMOTE_PLAYBACK);
+        intent.setDataAndType(item.mUri, "video/mp4");
+        return intent;
+    }
+
+    private Intent makeStatisticsIntent() {
+        Intent intent = new Intent(SampleMediaRouteProvider.ACTION_GET_STATISTICS);
+        intent.addCategory(SampleMediaRouteProvider.CATEGORY_SAMPLE_ROUTE);
+        return intent;
+    }
+
+    private MediaItem getCheckedMediaItem() {
+        int index = mMediaListView.getCheckedItemPosition();
+        if (index >= 0 && index < mMediaItems.getCount()) {
+            return mMediaItems.getItem(index);
+        }
+        return null;
+    }
+
+    private final MediaRouter.Callback mMediaRouterCallback = new MediaRouter.Callback() {
+        @Override
+        public void onRouteAdded(MediaRouter router, RouteInfo route) {
+            Log.d(TAG, "onRouteAdded: route=" + route);
+        }
+
+        @Override
+        public void onRouteChanged(MediaRouter router, RouteInfo route) {
+            Log.d(TAG, "onRouteChanged: route=" + route);
+            updateRouteStatus();
+        }
+
+        @Override
+        public void onRouteRemoved(MediaRouter router, RouteInfo route) {
+            Log.d(TAG, "onRouteRemoved: route=" + route);
+        }
+
+        @Override
+        public void onRouteSelected(MediaRouter router, RouteInfo route) {
+            Log.d(TAG, "onRouteSelected: route=" + route);
+            updateRouteStatus();
+        }
+
+        @Override
+        public void onRouteUnselected(MediaRouter router, RouteInfo route) {
+            Log.d(TAG, "onRouteUnselected: route=" + route);
+            updateRouteStatus();
+        }
+
+        @Override
+        public void onRouteVolumeChanged(MediaRouter router, RouteInfo route) {
+            Log.d(TAG, "onRouteVolumeChanged: route=" + route);
+        }
+
+        @Override
+        public void onRoutePresentationDisplayChanged(MediaRouter router, RouteInfo route) {
+            Log.d(TAG, "onRoutePresentationDisplayChanged: route=" + route);
+        }
+
+        @Override
+        public void onProviderAdded(MediaRouter router, ProviderInfo provider) {
+            Log.d(TAG, "onRouteProviderAdded: provider=" + provider);
+        }
+
+        @Override
+        public void onProviderRemoved(MediaRouter router, ProviderInfo provider) {
+            Log.d(TAG, "onRouteProviderRemoved: provider=" + provider);
+        }
+    };
+
+    private static final class MediaItem {
+        public final String mName;
+        public final Uri mUri;
+
+        public MediaItem(String name, Uri uri) {
+            mName = name;
+            mUri = uri;
+        }
+
+        @Override
+        public String toString() {
+            return mName;
+        }
+    }
+}
diff --git a/samples/Support7Demos/src/com/example/android/supportv7/media/_index.html b/samples/Support7Demos/src/com/example/android/supportv7/media/_index.html
new file mode 100644
index 0000000..a443287
--- /dev/null
+++ b/samples/Support7Demos/src/com/example/android/supportv7/media/_index.html
@@ -0,0 +1,23 @@
+
+<p>This section includes samples showing the use of the application
+package features of the static support library.</p>
+<ul>
+  <li><a href="#MediaRouter">MediaRouter</a></li>
+</ul>
+
+
+<h3 id="MediaRouter">MediaRouter</h3>
+<dl>
+  <dt><a href="SampleMediaRouteProvider.html">Media Route Provider</a></dt>
+  <dd>Demonstrates how to implement a MediaRouteProvider to discover,
+  publish and control custom media routes.</dd>
+  
+  <dt><a href="SampleMediaRouteProviderService.html">Media Route Provider Service</a></dt>
+  <dd>Demonstrates how to make a MediaRouteProvider available to all
+  running applications by registering it as a service.</dd>
+  
+  <dt><a href="SampleMediaRouterActivity.html">Media Router Activity</a></dt>
+  <dd>Demonstrates how to use MediaRouter within an Activity to support
+  remote media playback.</dd>
+</dl>
+ 
\ No newline at end of file