Working local media route for audio.

This commit is contained in:
Felix Ableitner 2013-12-22 21:37:56 +01:00
parent 3dd9999e16
commit 598522701e
43 changed files with 440 additions and 113 deletions

30
.gitignore vendored Normal file
View File

@ -0,0 +1,30 @@
# built application files
*.apk
*.ap_
# files for the dex VM
*.dex
# Java class files
*.class
# generated files
bin/
gen/
# Local configuration file (sdk path, etc)
local.properties
# Eclipse project files
.settings/
.classpath
.project
# Proguard folder generated by Eclipse
proguard/
# Intellij project files
*.iml
*.ipr
*.iws
.idea/

View File

@ -1,17 +1,30 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.nutomic.localroute" package="com.github.nutomic.localroute"
android:versionCode="1" android:versionCode="1"
android:versionName="1.0" > android:versionName="0.1.0" >
<uses-sdk <uses-sdk
android:minSdkVersion="8" android:minSdkVersion="8"
android:targetSdkVersion="18" /> android:targetSdkVersion="18" />
<uses-permission android:name="android.permission.INTERNET" />
<application <application
android:allowBackup="true" android:allowBackup="true"
android:icon="@drawable/ic_launcher" android:icon="@drawable/ic_launcher"
android:label="@string/app_name" android:label="@string/app_name"
android:theme="@style/AppTheme" > android:theme="@style/AppTheme" >
<service android:name="com.github.nutomic.controldlna.mediarouter.MediaRouterPlayService" />
<service android:name="com.github.nutomic.controldlna.upnp.RemotePlayService" />
<service android:name="com.github.nutomic.localroute.ProviderService"
android:process=":mrp">
<intent-filter>
<action android:name="android.media.MediaRouteProviderService" />
</intent-filter>
</service>
</application> </application>
</manifest> </manifest>

View File

@ -1,17 +1,30 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.nutomic.localroute" package="com.github.nutomic.localroute"
android:versionCode="1" android:versionCode="1"
android:versionName="1.0" > android:versionName="0.1.0" >
<uses-sdk <uses-sdk
android:minSdkVersion="8" android:minSdkVersion="8"
android:targetSdkVersion="18" /> android:targetSdkVersion="18" />
<uses-permission android:name="android.permission.INTERNET" />
<application <application
android:allowBackup="true" android:allowBackup="true"
android:icon="@drawable/ic_launcher" android:icon="@drawable/ic_launcher"
android:label="@string/app_name" android:label="@string/app_name"
android:theme="@style/AppTheme" > android:theme="@style/AppTheme" >
<service android:name="com.github.nutomic.controldlna.mediarouter.MediaRouterPlayService" />
<service android:name="com.github.nutomic.controldlna.upnp.RemotePlayService" />
<service android:name="com.github.nutomic.localroute.ProviderService"
android:process=":mrp">
<intent-filter>
<action android:name="android.media.MediaRouteProviderService" />
</intent-filter>
</service>
</application> </application>
</manifest> </manifest>

BIN
bin/classes.dex Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
bin/localroute.apk Normal file

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
bin/resources.ap_ Normal file

Binary file not shown.

View File

@ -1,5 +1,5 @@
/** Automatically generated file. DO NOT MODIFY */ /** Automatically generated file. DO NOT MODIFY */
package com.nutomic.localroute; package com.github.nutomic.localroute;
public final class BuildConfig { public final class BuildConfig {
public final static boolean DEBUG = true; public final static boolean DEBUG = true;

View File

@ -5,7 +5,7 @@
* should not be modified by hand. * should not be modified by hand.
*/ */
package com.nutomic.localroute; package com.github.nutomic.localroute;
public final class R { public final class R {
public static final class anim { public static final class anim {
@ -1430,26 +1430,26 @@ containing a value of this type.
<colgroup align="left" /> <colgroup align="left" />
<colgroup align="left" /> <colgroup align="left" />
<tr><th>Attribute</th><th>Description</th></tr> <tr><th>Attribute</th><th>Description</th></tr>
<tr><td><code>{@link #ActionBar_background com.nutomic.localroute:background}</code></td><td> Specifies a background drawable for the action bar.</td></tr> <tr><td><code>{@link #ActionBar_background com.github.nutomic.localroute:background}</code></td><td> Specifies a background drawable for the action bar.</td></tr>
<tr><td><code>{@link #ActionBar_backgroundSplit com.nutomic.localroute:backgroundSplit}</code></td><td> Specifies a background drawable for the bottom component of a split action bar.</td></tr> <tr><td><code>{@link #ActionBar_backgroundSplit com.github.nutomic.localroute:backgroundSplit}</code></td><td> Specifies a background drawable for the bottom component of a split action bar.</td></tr>
<tr><td><code>{@link #ActionBar_backgroundStacked com.nutomic.localroute:backgroundStacked}</code></td><td> Specifies a background drawable for a second stacked row of the action bar.</td></tr> <tr><td><code>{@link #ActionBar_backgroundStacked com.github.nutomic.localroute:backgroundStacked}</code></td><td> Specifies a background drawable for a second stacked row of the action bar.</td></tr>
<tr><td><code>{@link #ActionBar_customNavigationLayout com.nutomic.localroute:customNavigationLayout}</code></td><td> Specifies a layout for custom navigation.</td></tr> <tr><td><code>{@link #ActionBar_customNavigationLayout com.github.nutomic.localroute:customNavigationLayout}</code></td><td> Specifies a layout for custom navigation.</td></tr>
<tr><td><code>{@link #ActionBar_displayOptions com.nutomic.localroute:displayOptions}</code></td><td> Options affecting how the action bar is displayed.</td></tr> <tr><td><code>{@link #ActionBar_displayOptions com.github.nutomic.localroute:displayOptions}</code></td><td> Options affecting how the action bar is displayed.</td></tr>
<tr><td><code>{@link #ActionBar_divider com.nutomic.localroute:divider}</code></td><td> Specifies the drawable used for item dividers.</td></tr> <tr><td><code>{@link #ActionBar_divider com.github.nutomic.localroute:divider}</code></td><td> Specifies the drawable used for item dividers.</td></tr>
<tr><td><code>{@link #ActionBar_height com.nutomic.localroute:height}</code></td><td> Specifies a fixed height.</td></tr> <tr><td><code>{@link #ActionBar_height com.github.nutomic.localroute:height}</code></td><td> Specifies a fixed height.</td></tr>
<tr><td><code>{@link #ActionBar_homeLayout com.nutomic.localroute:homeLayout}</code></td><td> Specifies a layout to use for the "home" section of the action bar.</td></tr> <tr><td><code>{@link #ActionBar_homeLayout com.github.nutomic.localroute:homeLayout}</code></td><td> Specifies a layout to use for the "home" section of the action bar.</td></tr>
<tr><td><code>{@link #ActionBar_icon com.nutomic.localroute:icon}</code></td><td> Specifies the drawable used for the application icon.</td></tr> <tr><td><code>{@link #ActionBar_icon com.github.nutomic.localroute:icon}</code></td><td> Specifies the drawable used for the application icon.</td></tr>
<tr><td><code>{@link #ActionBar_indeterminateProgressStyle com.nutomic.localroute:indeterminateProgressStyle}</code></td><td> Specifies a style resource to use for an indeterminate progress spinner.</td></tr> <tr><td><code>{@link #ActionBar_indeterminateProgressStyle com.github.nutomic.localroute:indeterminateProgressStyle}</code></td><td> Specifies a style resource to use for an indeterminate progress spinner.</td></tr>
<tr><td><code>{@link #ActionBar_itemPadding com.nutomic.localroute:itemPadding}</code></td><td> Specifies padding that should be applied to the left and right sides of <tr><td><code>{@link #ActionBar_itemPadding com.github.nutomic.localroute:itemPadding}</code></td><td> Specifies padding that should be applied to the left and right sides of
system-provided items in the bar.</td></tr> system-provided items in the bar.</td></tr>
<tr><td><code>{@link #ActionBar_logo com.nutomic.localroute:logo}</code></td><td> Specifies the drawable used for the application logo.</td></tr> <tr><td><code>{@link #ActionBar_logo com.github.nutomic.localroute:logo}</code></td><td> Specifies the drawable used for the application logo.</td></tr>
<tr><td><code>{@link #ActionBar_navigationMode com.nutomic.localroute:navigationMode}</code></td><td> The type of navigation to use.</td></tr> <tr><td><code>{@link #ActionBar_navigationMode com.github.nutomic.localroute:navigationMode}</code></td><td> The type of navigation to use.</td></tr>
<tr><td><code>{@link #ActionBar_progressBarPadding com.nutomic.localroute:progressBarPadding}</code></td><td> Specifies the horizontal padding on either end for an embedded progress bar.</td></tr> <tr><td><code>{@link #ActionBar_progressBarPadding com.github.nutomic.localroute:progressBarPadding}</code></td><td> Specifies the horizontal padding on either end for an embedded progress bar.</td></tr>
<tr><td><code>{@link #ActionBar_progressBarStyle com.nutomic.localroute:progressBarStyle}</code></td><td> Specifies a style resource to use for an embedded progress bar.</td></tr> <tr><td><code>{@link #ActionBar_progressBarStyle com.github.nutomic.localroute:progressBarStyle}</code></td><td> Specifies a style resource to use for an embedded progress bar.</td></tr>
<tr><td><code>{@link #ActionBar_subtitle com.nutomic.localroute:subtitle}</code></td><td> Specifies subtitle text used for navigationMode="normal" </td></tr> <tr><td><code>{@link #ActionBar_subtitle com.github.nutomic.localroute:subtitle}</code></td><td> Specifies subtitle text used for navigationMode="normal" </td></tr>
<tr><td><code>{@link #ActionBar_subtitleTextStyle com.nutomic.localroute:subtitleTextStyle}</code></td><td> Specifies a style to use for subtitle text.</td></tr> <tr><td><code>{@link #ActionBar_subtitleTextStyle com.github.nutomic.localroute:subtitleTextStyle}</code></td><td> Specifies a style to use for subtitle text.</td></tr>
<tr><td><code>{@link #ActionBar_title com.nutomic.localroute:title}</code></td><td> Specifies title text used for navigationMode="normal" </td></tr> <tr><td><code>{@link #ActionBar_title com.github.nutomic.localroute:title}</code></td><td> Specifies title text used for navigationMode="normal" </td></tr>
<tr><td><code>{@link #ActionBar_titleTextStyle com.nutomic.localroute:titleTextStyle}</code></td><td> Specifies a style to use for title text.</td></tr> <tr><td><code>{@link #ActionBar_titleTextStyle com.github.nutomic.localroute:titleTextStyle}</code></td><td> Specifies a style to use for title text.</td></tr>
</table> </table>
@see #ActionBar_background @see #ActionBar_background
@see #ActionBar_backgroundSplit @see #ActionBar_backgroundSplit
@ -1487,7 +1487,7 @@ containing a value of this type.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>This is a private symbol. <p>This is a private symbol.
@attr name com.nutomic.localroute:background @attr name com.github.nutomic.localroute:background
*/ */
public static final int ActionBar_background = 10; public static final int ActionBar_background = 10;
/** /**
@ -1501,7 +1501,7 @@ or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>na
<p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", <p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>". "<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
<p>This is a private symbol. <p>This is a private symbol.
@attr name com.nutomic.localroute:backgroundSplit @attr name com.github.nutomic.localroute:backgroundSplit
*/ */
public static final int ActionBar_backgroundSplit = 12; public static final int ActionBar_backgroundSplit = 12;
/** /**
@ -1515,7 +1515,7 @@ or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>na
<p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", <p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>". "<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
<p>This is a private symbol. <p>This is a private symbol.
@attr name com.nutomic.localroute:backgroundStacked @attr name com.github.nutomic.localroute:backgroundStacked
*/ */
public static final int ActionBar_backgroundStacked = 11; public static final int ActionBar_backgroundStacked = 11;
/** /**
@ -1527,7 +1527,7 @@ or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>na
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>This is a private symbol. <p>This is a private symbol.
@attr name com.nutomic.localroute:customNavigationLayout @attr name com.github.nutomic.localroute:customNavigationLayout
*/ */
public static final int ActionBar_customNavigationLayout = 13; public static final int ActionBar_customNavigationLayout = 13;
/** /**
@ -1550,7 +1550,7 @@ or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>na
<tr><td><code>disableHome</code></td><td>0x20</td><td></td></tr> <tr><td><code>disableHome</code></td><td>0x20</td><td></td></tr>
</table> </table>
<p>This is a private symbol. <p>This is a private symbol.
@attr name com.nutomic.localroute:displayOptions @attr name com.github.nutomic.localroute:displayOptions
*/ */
public static final int ActionBar_displayOptions = 3; public static final int ActionBar_displayOptions = 3;
/** /**
@ -1562,7 +1562,7 @@ or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>na
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>This is a private symbol. <p>This is a private symbol.
@attr name com.nutomic.localroute:divider @attr name com.github.nutomic.localroute:divider
*/ */
public static final int ActionBar_divider = 9; public static final int ActionBar_divider = 9;
/** /**
@ -1580,7 +1580,7 @@ theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type. containing a value of this type.
<p>This is a private symbol. <p>This is a private symbol.
@attr name com.nutomic.localroute:height @attr name com.github.nutomic.localroute:height
*/ */
public static final int ActionBar_height = 1; public static final int ActionBar_height = 1;
/** /**
@ -1592,7 +1592,7 @@ containing a value of this type.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>This is a private symbol. <p>This is a private symbol.
@attr name com.nutomic.localroute:homeLayout @attr name com.github.nutomic.localroute:homeLayout
*/ */
public static final int ActionBar_homeLayout = 14; public static final int ActionBar_homeLayout = 14;
/** /**
@ -1604,7 +1604,7 @@ or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>na
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>This is a private symbol. <p>This is a private symbol.
@attr name com.nutomic.localroute:icon @attr name com.github.nutomic.localroute:icon
*/ */
public static final int ActionBar_icon = 7; public static final int ActionBar_icon = 7;
/** /**
@ -1616,7 +1616,7 @@ or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>na
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>This is a private symbol. <p>This is a private symbol.
@attr name com.nutomic.localroute:indeterminateProgressStyle @attr name com.github.nutomic.localroute:indeterminateProgressStyle
*/ */
public static final int ActionBar_indeterminateProgressStyle = 16; public static final int ActionBar_indeterminateProgressStyle = 16;
/** /**
@ -1635,7 +1635,7 @@ theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type. containing a value of this type.
<p>This is a private symbol. <p>This is a private symbol.
@attr name com.nutomic.localroute:itemPadding @attr name com.github.nutomic.localroute:itemPadding
*/ */
public static final int ActionBar_itemPadding = 18; public static final int ActionBar_itemPadding = 18;
/** /**
@ -1647,7 +1647,7 @@ containing a value of this type.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>This is a private symbol. <p>This is a private symbol.
@attr name com.nutomic.localroute:logo @attr name com.github.nutomic.localroute:logo
*/ */
public static final int ActionBar_logo = 8; public static final int ActionBar_logo = 8;
/** /**
@ -1667,7 +1667,7 @@ or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>na
<tr><td><code>tabMode</code></td><td>2</td><td> The action bar will use a series of horizontal tabs for navigation. </td></tr> <tr><td><code>tabMode</code></td><td>2</td><td> The action bar will use a series of horizontal tabs for navigation. </td></tr>
</table> </table>
<p>This is a private symbol. <p>This is a private symbol.
@attr name com.nutomic.localroute:navigationMode @attr name com.github.nutomic.localroute:navigationMode
*/ */
public static final int ActionBar_navigationMode = 2; public static final int ActionBar_navigationMode = 2;
/** /**
@ -1685,7 +1685,7 @@ theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type. containing a value of this type.
<p>This is a private symbol. <p>This is a private symbol.
@attr name com.nutomic.localroute:progressBarPadding @attr name com.github.nutomic.localroute:progressBarPadding
*/ */
public static final int ActionBar_progressBarPadding = 17; public static final int ActionBar_progressBarPadding = 17;
/** /**
@ -1697,7 +1697,7 @@ containing a value of this type.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>This is a private symbol. <p>This is a private symbol.
@attr name com.nutomic.localroute:progressBarStyle @attr name com.github.nutomic.localroute:progressBarStyle
*/ */
public static final int ActionBar_progressBarStyle = 15; public static final int ActionBar_progressBarStyle = 15;
/** /**
@ -1713,7 +1713,7 @@ theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type. containing a value of this type.
<p>This is a private symbol. <p>This is a private symbol.
@attr name com.nutomic.localroute:subtitle @attr name com.github.nutomic.localroute:subtitle
*/ */
public static final int ActionBar_subtitle = 4; public static final int ActionBar_subtitle = 4;
/** /**
@ -1725,7 +1725,7 @@ containing a value of this type.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>This is a private symbol. <p>This is a private symbol.
@attr name com.nutomic.localroute:subtitleTextStyle @attr name com.github.nutomic.localroute:subtitleTextStyle
*/ */
public static final int ActionBar_subtitleTextStyle = 6; public static final int ActionBar_subtitleTextStyle = 6;
/** /**
@ -1741,7 +1741,7 @@ theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type. containing a value of this type.
<p>This is a private symbol. <p>This is a private symbol.
@attr name com.nutomic.localroute:title @attr name com.github.nutomic.localroute:title
*/ */
public static final int ActionBar_title = 0; public static final int ActionBar_title = 0;
/** /**
@ -1753,7 +1753,7 @@ containing a value of this type.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>This is a private symbol. <p>This is a private symbol.
@attr name com.nutomic.localroute:titleTextStyle @attr name com.github.nutomic.localroute:titleTextStyle
*/ */
public static final int ActionBar_titleTextStyle = 5; public static final int ActionBar_titleTextStyle = 5;
/** Valid LayoutParams for views placed in the action bar as custom views. /** Valid LayoutParams for views placed in the action bar as custom views.
@ -1784,9 +1784,9 @@ or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>na
<colgroup align="left" /> <colgroup align="left" />
<colgroup align="left" /> <colgroup align="left" />
<tr><th>Attribute</th><th>Description</th></tr> <tr><th>Attribute</th><th>Description</th></tr>
<tr><td><code>{@link #ActionBarWindow_windowActionBar com.nutomic.localroute:windowActionBar}</code></td><td></td></tr> <tr><td><code>{@link #ActionBarWindow_windowActionBar com.github.nutomic.localroute:windowActionBar}</code></td><td></td></tr>
<tr><td><code>{@link #ActionBarWindow_windowActionBarOverlay com.nutomic.localroute:windowActionBarOverlay}</code></td><td></td></tr> <tr><td><code>{@link #ActionBarWindow_windowActionBarOverlay com.github.nutomic.localroute:windowActionBarOverlay}</code></td><td></td></tr>
<tr><td><code>{@link #ActionBarWindow_windowSplitActionBar com.nutomic.localroute:windowSplitActionBar}</code></td><td></td></tr> <tr><td><code>{@link #ActionBarWindow_windowSplitActionBar com.github.nutomic.localroute:windowSplitActionBar}</code></td><td></td></tr>
</table> </table>
@see #ActionBarWindow_windowActionBar @see #ActionBarWindow_windowActionBar
@see #ActionBarWindow_windowActionBarOverlay @see #ActionBarWindow_windowActionBarOverlay
@ -1796,7 +1796,7 @@ or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>na
0x7f010000, 0x7f010001, 0x7f010002 0x7f010000, 0x7f010001, 0x7f010002
}; };
/** /**
<p>This symbol is the offset where the {@link com.nutomic.localroute.R.attr#windowActionBar} <p>This symbol is the offset where the {@link com.github.nutomic.localroute.R.attr#windowActionBar}
attribute's value can be found in the {@link #ActionBarWindow} array. attribute's value can be found in the {@link #ActionBarWindow} array.
@ -1806,11 +1806,11 @@ or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>na
theme attribute (in the form theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type. containing a value of this type.
@attr name com.nutomic.localroute:windowActionBar @attr name com.github.nutomic.localroute:windowActionBar
*/ */
public static final int ActionBarWindow_windowActionBar = 0; public static final int ActionBarWindow_windowActionBar = 0;
/** /**
<p>This symbol is the offset where the {@link com.nutomic.localroute.R.attr#windowActionBarOverlay} <p>This symbol is the offset where the {@link com.github.nutomic.localroute.R.attr#windowActionBarOverlay}
attribute's value can be found in the {@link #ActionBarWindow} array. attribute's value can be found in the {@link #ActionBarWindow} array.
@ -1820,11 +1820,11 @@ containing a value of this type.
theme attribute (in the form theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type. containing a value of this type.
@attr name com.nutomic.localroute:windowActionBarOverlay @attr name com.github.nutomic.localroute:windowActionBarOverlay
*/ */
public static final int ActionBarWindow_windowActionBarOverlay = 1; public static final int ActionBarWindow_windowActionBarOverlay = 1;
/** /**
<p>This symbol is the offset where the {@link com.nutomic.localroute.R.attr#windowSplitActionBar} <p>This symbol is the offset where the {@link com.github.nutomic.localroute.R.attr#windowSplitActionBar}
attribute's value can be found in the {@link #ActionBarWindow} array. attribute's value can be found in the {@link #ActionBarWindow} array.
@ -1834,7 +1834,7 @@ containing a value of this type.
theme attribute (in the form theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type. containing a value of this type.
@attr name com.nutomic.localroute:windowSplitActionBar @attr name com.github.nutomic.localroute:windowSplitActionBar
*/ */
public static final int ActionBarWindow_windowSplitActionBar = 2; public static final int ActionBarWindow_windowSplitActionBar = 2;
/** Attributes that can be used with a ActionMenuItemView. /** Attributes that can be used with a ActionMenuItemView.
@ -1867,11 +1867,11 @@ containing a value of this type.
<colgroup align="left" /> <colgroup align="left" />
<colgroup align="left" /> <colgroup align="left" />
<tr><th>Attribute</th><th>Description</th></tr> <tr><th>Attribute</th><th>Description</th></tr>
<tr><td><code>{@link #ActionMode_background com.nutomic.localroute:background}</code></td><td> Specifies a background for the action mode bar.</td></tr> <tr><td><code>{@link #ActionMode_background com.github.nutomic.localroute:background}</code></td><td> Specifies a background for the action mode bar.</td></tr>
<tr><td><code>{@link #ActionMode_backgroundSplit com.nutomic.localroute:backgroundSplit}</code></td><td> Specifies a background for the split action mode bar.</td></tr> <tr><td><code>{@link #ActionMode_backgroundSplit com.github.nutomic.localroute:backgroundSplit}</code></td><td> Specifies a background for the split action mode bar.</td></tr>
<tr><td><code>{@link #ActionMode_height com.nutomic.localroute:height}</code></td><td> Specifies a fixed height for the action mode bar.</td></tr> <tr><td><code>{@link #ActionMode_height com.github.nutomic.localroute:height}</code></td><td> Specifies a fixed height for the action mode bar.</td></tr>
<tr><td><code>{@link #ActionMode_subtitleTextStyle com.nutomic.localroute:subtitleTextStyle}</code></td><td> Specifies a style to use for subtitle text.</td></tr> <tr><td><code>{@link #ActionMode_subtitleTextStyle com.github.nutomic.localroute:subtitleTextStyle}</code></td><td> Specifies a style to use for subtitle text.</td></tr>
<tr><td><code>{@link #ActionMode_titleTextStyle com.nutomic.localroute:titleTextStyle}</code></td><td> Specifies a style to use for title text.</td></tr> <tr><td><code>{@link #ActionMode_titleTextStyle com.github.nutomic.localroute:titleTextStyle}</code></td><td> Specifies a style to use for title text.</td></tr>
</table> </table>
@see #ActionMode_background @see #ActionMode_background
@see #ActionMode_backgroundSplit @see #ActionMode_backgroundSplit
@ -1892,7 +1892,7 @@ containing a value of this type.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>This is a private symbol. <p>This is a private symbol.
@attr name com.nutomic.localroute:background @attr name com.github.nutomic.localroute:background
*/ */
public static final int ActionMode_background = 3; public static final int ActionMode_background = 3;
/** /**
@ -1906,7 +1906,7 @@ or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>na
<p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", <p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>". "<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
<p>This is a private symbol. <p>This is a private symbol.
@attr name com.nutomic.localroute:backgroundSplit @attr name com.github.nutomic.localroute:backgroundSplit
*/ */
public static final int ActionMode_backgroundSplit = 4; public static final int ActionMode_backgroundSplit = 4;
/** /**
@ -1924,7 +1924,7 @@ theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type. containing a value of this type.
<p>This is a private symbol. <p>This is a private symbol.
@attr name com.nutomic.localroute:height @attr name com.github.nutomic.localroute:height
*/ */
public static final int ActionMode_height = 0; public static final int ActionMode_height = 0;
/** /**
@ -1936,7 +1936,7 @@ containing a value of this type.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>This is a private symbol. <p>This is a private symbol.
@attr name com.nutomic.localroute:subtitleTextStyle @attr name com.github.nutomic.localroute:subtitleTextStyle
*/ */
public static final int ActionMode_subtitleTextStyle = 2; public static final int ActionMode_subtitleTextStyle = 2;
/** /**
@ -1948,7 +1948,7 @@ or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>na
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>This is a private symbol. <p>This is a private symbol.
@attr name com.nutomic.localroute:titleTextStyle @attr name com.github.nutomic.localroute:titleTextStyle
*/ */
public static final int ActionMode_titleTextStyle = 1; public static final int ActionMode_titleTextStyle = 1;
/** Attrbitutes for a ActivityChooserView. /** Attrbitutes for a ActivityChooserView.
@ -1957,8 +1957,8 @@ or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>na
<colgroup align="left" /> <colgroup align="left" />
<colgroup align="left" /> <colgroup align="left" />
<tr><th>Attribute</th><th>Description</th></tr> <tr><th>Attribute</th><th>Description</th></tr>
<tr><td><code>{@link #ActivityChooserView_expandActivityOverflowButtonDrawable com.nutomic.localroute:expandActivityOverflowButtonDrawable}</code></td><td> The drawable to show in the button for expanding the activities overflow popup.</td></tr> <tr><td><code>{@link #ActivityChooserView_expandActivityOverflowButtonDrawable com.github.nutomic.localroute:expandActivityOverflowButtonDrawable}</code></td><td> The drawable to show in the button for expanding the activities overflow popup.</td></tr>
<tr><td><code>{@link #ActivityChooserView_initialActivityCount com.nutomic.localroute:initialActivityCount}</code></td><td> The maximal number of items initially shown in the activity list.</td></tr> <tr><td><code>{@link #ActivityChooserView_initialActivityCount com.github.nutomic.localroute:initialActivityCount}</code></td><td> The maximal number of items initially shown in the activity list.</td></tr>
</table> </table>
@see #ActivityChooserView_expandActivityOverflowButtonDrawable @see #ActivityChooserView_expandActivityOverflowButtonDrawable
@see #ActivityChooserView_initialActivityCount @see #ActivityChooserView_initialActivityCount
@ -1980,7 +1980,7 @@ or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>na
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>This is a private symbol. <p>This is a private symbol.
@attr name com.nutomic.localroute:expandActivityOverflowButtonDrawable @attr name com.github.nutomic.localroute:expandActivityOverflowButtonDrawable
*/ */
public static final int ActivityChooserView_expandActivityOverflowButtonDrawable = 1; public static final int ActivityChooserView_expandActivityOverflowButtonDrawable = 1;
/** /**
@ -1996,7 +1996,7 @@ theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type. containing a value of this type.
<p>This is a private symbol. <p>This is a private symbol.
@attr name com.nutomic.localroute:initialActivityCount @attr name com.github.nutomic.localroute:initialActivityCount
*/ */
public static final int ActivityChooserView_initialActivityCount = 0; public static final int ActivityChooserView_initialActivityCount = 0;
/** Attributes that can be used with a CompatTextView. /** Attributes that can be used with a CompatTextView.
@ -2005,7 +2005,7 @@ containing a value of this type.
<colgroup align="left" /> <colgroup align="left" />
<colgroup align="left" /> <colgroup align="left" />
<tr><th>Attribute</th><th>Description</th></tr> <tr><th>Attribute</th><th>Description</th></tr>
<tr><td><code>{@link #CompatTextView_textAllCaps com.nutomic.localroute:textAllCaps}</code></td><td> Present the text in ALL CAPS.</td></tr> <tr><td><code>{@link #CompatTextView_textAllCaps com.github.nutomic.localroute:textAllCaps}</code></td><td> Present the text in ALL CAPS.</td></tr>
</table> </table>
@see #CompatTextView_textAllCaps @see #CompatTextView_textAllCaps
*/ */
@ -2022,7 +2022,7 @@ containing a value of this type.
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>May be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>May be a boolean value, either "<code>true</code>" or "<code>false</code>".
<p>This is a private symbol. <p>This is a private symbol.
@attr name com.nutomic.localroute:textAllCaps @attr name com.github.nutomic.localroute:textAllCaps
*/ */
public static final int CompatTextView_textAllCaps = 0; public static final int CompatTextView_textAllCaps = 0;
/** Attributes that can be used with a LinearLayoutICS. /** Attributes that can be used with a LinearLayoutICS.
@ -2031,9 +2031,9 @@ or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>na
<colgroup align="left" /> <colgroup align="left" />
<colgroup align="left" /> <colgroup align="left" />
<tr><th>Attribute</th><th>Description</th></tr> <tr><th>Attribute</th><th>Description</th></tr>
<tr><td><code>{@link #LinearLayoutICS_divider com.nutomic.localroute:divider}</code></td><td> Drawable to use as a vertical divider between buttons.</td></tr> <tr><td><code>{@link #LinearLayoutICS_divider com.github.nutomic.localroute:divider}</code></td><td> Drawable to use as a vertical divider between buttons.</td></tr>
<tr><td><code>{@link #LinearLayoutICS_dividerPadding com.nutomic.localroute:dividerPadding}</code></td><td> Size of padding on either end of a divider.</td></tr> <tr><td><code>{@link #LinearLayoutICS_dividerPadding com.github.nutomic.localroute:dividerPadding}</code></td><td> Size of padding on either end of a divider.</td></tr>
<tr><td><code>{@link #LinearLayoutICS_showDividers com.nutomic.localroute:showDividers}</code></td><td> Setting for which dividers to show.</td></tr> <tr><td><code>{@link #LinearLayoutICS_showDividers com.github.nutomic.localroute:showDividers}</code></td><td> Setting for which dividers to show.</td></tr>
</table> </table>
@see #LinearLayoutICS_divider @see #LinearLayoutICS_divider
@see #LinearLayoutICS_dividerPadding @see #LinearLayoutICS_dividerPadding
@ -2051,7 +2051,7 @@ or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>na
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>This is a private symbol. <p>This is a private symbol.
@attr name com.nutomic.localroute:divider @attr name com.github.nutomic.localroute:divider
*/ */
public static final int LinearLayoutICS_divider = 0; public static final int LinearLayoutICS_divider = 0;
/** /**
@ -2069,7 +2069,7 @@ theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type. containing a value of this type.
<p>This is a private symbol. <p>This is a private symbol.
@attr name com.nutomic.localroute:dividerPadding @attr name com.github.nutomic.localroute:dividerPadding
*/ */
public static final int LinearLayoutICS_dividerPadding = 2; public static final int LinearLayoutICS_dividerPadding = 2;
/** /**
@ -2090,7 +2090,7 @@ containing a value of this type.
<tr><td><code>end</code></td><td>4</td><td></td></tr> <tr><td><code>end</code></td><td>4</td><td></td></tr>
</table> </table>
<p>This is a private symbol. <p>This is a private symbol.
@attr name com.nutomic.localroute:showDividers @attr name com.github.nutomic.localroute:showDividers
*/ */
public static final int LinearLayoutICS_showDividers = 1; public static final int LinearLayoutICS_showDividers = 1;
/** Attributes that can be used with a MediaRouteButton. /** Attributes that can be used with a MediaRouteButton.
@ -2101,7 +2101,7 @@ containing a value of this type.
<tr><th>Attribute</th><th>Description</th></tr> <tr><th>Attribute</th><th>Description</th></tr>
<tr><td><code>{@link #MediaRouteButton_android_minHeight android:minHeight}</code></td><td></td></tr> <tr><td><code>{@link #MediaRouteButton_android_minHeight android:minHeight}</code></td><td></td></tr>
<tr><td><code>{@link #MediaRouteButton_android_minWidth android:minWidth}</code></td><td></td></tr> <tr><td><code>{@link #MediaRouteButton_android_minWidth android:minWidth}</code></td><td></td></tr>
<tr><td><code>{@link #MediaRouteButton_externalRouteEnabledDrawable com.nutomic.localroute:externalRouteEnabledDrawable}</code></td><td> This drawable is a state list where the "checked" state <tr><td><code>{@link #MediaRouteButton_externalRouteEnabledDrawable com.github.nutomic.localroute:externalRouteEnabledDrawable}</code></td><td> This drawable is a state list where the "checked" state
indicates active media routing.</td></tr> indicates active media routing.</td></tr>
</table> </table>
@see #MediaRouteButton_android_minHeight @see #MediaRouteButton_android_minHeight
@ -2135,7 +2135,7 @@ containing a value of this type.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>This is a private symbol. <p>This is a private symbol.
@attr name com.nutomic.localroute:externalRouteEnabledDrawable @attr name com.github.nutomic.localroute:externalRouteEnabledDrawable
*/ */
public static final int MediaRouteButton_externalRouteEnabledDrawable = 2; public static final int MediaRouteButton_externalRouteEnabledDrawable = 2;
/** Base attributes that are available to all groups. /** Base attributes that are available to all groups.
@ -2224,10 +2224,10 @@ or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>na
<colgroup align="left" /> <colgroup align="left" />
<colgroup align="left" /> <colgroup align="left" />
<tr><th>Attribute</th><th>Description</th></tr> <tr><th>Attribute</th><th>Description</th></tr>
<tr><td><code>{@link #MenuItem_actionLayout com.nutomic.localroute:actionLayout}</code></td><td> An optional layout to be used as an action view.</td></tr> <tr><td><code>{@link #MenuItem_actionLayout com.github.nutomic.localroute:actionLayout}</code></td><td> An optional layout to be used as an action view.</td></tr>
<tr><td><code>{@link #MenuItem_actionProviderClass com.nutomic.localroute:actionProviderClass}</code></td><td> The name of an optional ActionProvider class to instantiate an action view <tr><td><code>{@link #MenuItem_actionProviderClass com.github.nutomic.localroute:actionProviderClass}</code></td><td> The name of an optional ActionProvider class to instantiate an action view
and perform operations such as default action for that menu item.</td></tr> and perform operations such as default action for that menu item.</td></tr>
<tr><td><code>{@link #MenuItem_actionViewClass com.nutomic.localroute:actionViewClass}</code></td><td> The name of an optional View class to instantiate and use as an <tr><td><code>{@link #MenuItem_actionViewClass com.github.nutomic.localroute:actionViewClass}</code></td><td> The name of an optional View class to instantiate and use as an
action view.</td></tr> action view.</td></tr>
<tr><td><code>{@link #MenuItem_android_alphabeticShortcut android:alphabeticShortcut}</code></td><td> The alphabetic shortcut key.</td></tr> <tr><td><code>{@link #MenuItem_android_alphabeticShortcut android:alphabeticShortcut}</code></td><td> The alphabetic shortcut key.</td></tr>
<tr><td><code>{@link #MenuItem_android_checkable android:checkable}</code></td><td> Whether the item is capable of displaying a check mark.</td></tr> <tr><td><code>{@link #MenuItem_android_checkable android:checkable}</code></td><td> Whether the item is capable of displaying a check mark.</td></tr>
@ -2243,7 +2243,7 @@ or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>na
<tr><td><code>{@link #MenuItem_android_title android:title}</code></td><td> The title associated with the item.</td></tr> <tr><td><code>{@link #MenuItem_android_title android:title}</code></td><td> The title associated with the item.</td></tr>
<tr><td><code>{@link #MenuItem_android_titleCondensed android:titleCondensed}</code></td><td> The condensed title associated with the item.</td></tr> <tr><td><code>{@link #MenuItem_android_titleCondensed android:titleCondensed}</code></td><td> The condensed title associated with the item.</td></tr>
<tr><td><code>{@link #MenuItem_android_visible android:visible}</code></td><td> Whether the item is shown/visible.</td></tr> <tr><td><code>{@link #MenuItem_android_visible android:visible}</code></td><td> Whether the item is shown/visible.</td></tr>
<tr><td><code>{@link #MenuItem_showAsAction com.nutomic.localroute:showAsAction}</code></td><td> How this item should display in the Action Bar, if present.</td></tr> <tr><td><code>{@link #MenuItem_showAsAction com.github.nutomic.localroute:showAsAction}</code></td><td> How this item should display in the Action Bar, if present.</td></tr>
</table> </table>
@see #MenuItem_actionLayout @see #MenuItem_actionLayout
@see #MenuItem_actionProviderClass @see #MenuItem_actionProviderClass
@ -2281,7 +2281,7 @@ or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>na
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>This is a private symbol. <p>This is a private symbol.
@attr name com.nutomic.localroute:actionLayout @attr name com.github.nutomic.localroute:actionLayout
*/ */
public static final int MenuItem_actionLayout = 14; public static final int MenuItem_actionLayout = 14;
/** /**
@ -2300,7 +2300,7 @@ theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type. containing a value of this type.
<p>This is a private symbol. <p>This is a private symbol.
@attr name com.nutomic.localroute:actionProviderClass @attr name com.github.nutomic.localroute:actionProviderClass
*/ */
public static final int MenuItem_actionProviderClass = 16; public static final int MenuItem_actionProviderClass = 16;
/** /**
@ -2318,7 +2318,7 @@ theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type. containing a value of this type.
<p>This is a private symbol. <p>This is a private symbol.
@attr name com.nutomic.localroute:actionViewClass @attr name com.github.nutomic.localroute:actionViewClass
*/ */
public static final int MenuItem_actionViewClass = 15; public static final int MenuItem_actionViewClass = 15;
/** /**
@ -2474,7 +2474,7 @@ containing a value of this type.
larger segment of its container. </td></tr> larger segment of its container. </td></tr>
</table> </table>
<p>This is a private symbol. <p>This is a private symbol.
@attr name com.nutomic.localroute:showAsAction @attr name com.github.nutomic.localroute:showAsAction
*/ */
public static final int MenuItem_showAsAction = 13; public static final int MenuItem_showAsAction = 13;
/** Attributes that can be used with a MenuView. /** Attributes that can be used with a MenuView.
@ -2585,8 +2585,8 @@ containing a value of this type.
<tr><td><code>{@link #SearchView_android_imeOptions android:imeOptions}</code></td><td> The IME options to set on the query text field.</td></tr> <tr><td><code>{@link #SearchView_android_imeOptions android:imeOptions}</code></td><td> The IME options to set on the query text field.</td></tr>
<tr><td><code>{@link #SearchView_android_inputType android:inputType}</code></td><td> The input type to set on the query text field.</td></tr> <tr><td><code>{@link #SearchView_android_inputType android:inputType}</code></td><td> The input type to set on the query text field.</td></tr>
<tr><td><code>{@link #SearchView_android_maxWidth android:maxWidth}</code></td><td> An optional maximum width of the SearchView.</td></tr> <tr><td><code>{@link #SearchView_android_maxWidth android:maxWidth}</code></td><td> An optional maximum width of the SearchView.</td></tr>
<tr><td><code>{@link #SearchView_iconifiedByDefault com.nutomic.localroute:iconifiedByDefault}</code></td><td> The default state of the SearchView.</td></tr> <tr><td><code>{@link #SearchView_iconifiedByDefault com.github.nutomic.localroute:iconifiedByDefault}</code></td><td> The default state of the SearchView.</td></tr>
<tr><td><code>{@link #SearchView_queryHint com.nutomic.localroute:queryHint}</code></td><td> An optional query hint string to be displayed in the empty query field.</td></tr> <tr><td><code>{@link #SearchView_queryHint com.github.nutomic.localroute:queryHint}</code></td><td> An optional query hint string to be displayed in the empty query field.</td></tr>
</table> </table>
@see #SearchView_android_imeOptions @see #SearchView_android_imeOptions
@see #SearchView_android_inputType @see #SearchView_android_inputType
@ -2639,7 +2639,7 @@ theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type. containing a value of this type.
<p>This is a private symbol. <p>This is a private symbol.
@attr name com.nutomic.localroute:iconifiedByDefault @attr name com.github.nutomic.localroute:iconifiedByDefault
*/ */
public static final int SearchView_iconifiedByDefault = 3; public static final int SearchView_iconifiedByDefault = 3;
/** /**
@ -2655,7 +2655,7 @@ theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type. containing a value of this type.
<p>This is a private symbol. <p>This is a private symbol.
@attr name com.nutomic.localroute:queryHint @attr name com.github.nutomic.localroute:queryHint
*/ */
public static final int SearchView_queryHint = 4; public static final int SearchView_queryHint = 4;
/** Attributes that can be used with a Spinner. /** Attributes that can be used with a Spinner.
@ -2672,12 +2672,12 @@ containing a value of this type.
<tr><td><code>{@link #Spinner_android_dropDownWidth android:dropDownWidth}</code></td><td> Width of the dropdown in spinnerMode="dropdown".</td></tr> <tr><td><code>{@link #Spinner_android_dropDownWidth android:dropDownWidth}</code></td><td> Width of the dropdown in spinnerMode="dropdown".</td></tr>
<tr><td><code>{@link #Spinner_android_gravity android:gravity}</code></td><td> Gravity setting for positioning the currently selected item.</td></tr> <tr><td><code>{@link #Spinner_android_gravity android:gravity}</code></td><td> Gravity setting for positioning the currently selected item.</td></tr>
<tr><td><code>{@link #Spinner_android_popupBackground android:popupBackground}</code></td><td> Background drawable to use for the dropdown in spinnerMode="dropdown".</td></tr> <tr><td><code>{@link #Spinner_android_popupBackground android:popupBackground}</code></td><td> Background drawable to use for the dropdown in spinnerMode="dropdown".</td></tr>
<tr><td><code>{@link #Spinner_disableChildrenWhenDisabled com.nutomic.localroute:disableChildrenWhenDisabled}</code></td><td> Whether this spinner should mark child views as enabled/disabled when <tr><td><code>{@link #Spinner_disableChildrenWhenDisabled com.github.nutomic.localroute:disableChildrenWhenDisabled}</code></td><td> Whether this spinner should mark child views as enabled/disabled when
the spinner itself is enabled/disabled.</td></tr> the spinner itself is enabled/disabled.</td></tr>
<tr><td><code>{@link #Spinner_popupPromptView com.nutomic.localroute:popupPromptView}</code></td><td> Reference to a layout to use for displaying a prompt in the dropdown for <tr><td><code>{@link #Spinner_popupPromptView com.github.nutomic.localroute:popupPromptView}</code></td><td> Reference to a layout to use for displaying a prompt in the dropdown for
spinnerMode="dropdown".</td></tr> spinnerMode="dropdown".</td></tr>
<tr><td><code>{@link #Spinner_prompt com.nutomic.localroute:prompt}</code></td><td> The prompt to display when the spinner's dialog is shown.</td></tr> <tr><td><code>{@link #Spinner_prompt com.github.nutomic.localroute:prompt}</code></td><td> The prompt to display when the spinner's dialog is shown.</td></tr>
<tr><td><code>{@link #Spinner_spinnerMode com.nutomic.localroute:spinnerMode}</code></td><td> Display mode for spinner options.</td></tr> <tr><td><code>{@link #Spinner_spinnerMode com.github.nutomic.localroute:spinnerMode}</code></td><td> Display mode for spinner options.</td></tr>
</table> </table>
@see #Spinner_android_dropDownHorizontalOffset @see #Spinner_android_dropDownHorizontalOffset
@see #Spinner_android_dropDownSelector @see #Spinner_android_dropDownSelector
@ -2765,7 +2765,7 @@ theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type. containing a value of this type.
<p>This is a private symbol. <p>This is a private symbol.
@attr name com.nutomic.localroute:disableChildrenWhenDisabled @attr name com.github.nutomic.localroute:disableChildrenWhenDisabled
*/ */
public static final int Spinner_disableChildrenWhenDisabled = 9; public static final int Spinner_disableChildrenWhenDisabled = 9;
/** /**
@ -2779,7 +2779,7 @@ containing a value of this type.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>This is a private symbol. <p>This is a private symbol.
@attr name com.nutomic.localroute:popupPromptView @attr name com.github.nutomic.localroute:popupPromptView
*/ */
public static final int Spinner_popupPromptView = 8; public static final int Spinner_popupPromptView = 8;
/** /**
@ -2791,7 +2791,7 @@ or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>na
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>This is a private symbol. <p>This is a private symbol.
@attr name com.nutomic.localroute:prompt @attr name com.github.nutomic.localroute:prompt
*/ */
public static final int Spinner_prompt = 6; public static final int Spinner_prompt = 6;
/** /**
@ -2811,7 +2811,7 @@ or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>na
anchored to the spinner widget itself. </td></tr> anchored to the spinner widget itself. </td></tr>
</table> </table>
<p>This is a private symbol. <p>This is a private symbol.
@attr name com.nutomic.localroute:spinnerMode @attr name com.github.nutomic.localroute:spinnerMode
*/ */
public static final int Spinner_spinnerMode = 7; public static final int Spinner_spinnerMode = 7;
/** These are the standard attributes that make up a complete theme. /** These are the standard attributes that make up a complete theme.
@ -2820,12 +2820,12 @@ or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>na
<colgroup align="left" /> <colgroup align="left" />
<colgroup align="left" /> <colgroup align="left" />
<tr><th>Attribute</th><th>Description</th></tr> <tr><th>Attribute</th><th>Description</th></tr>
<tr><td><code>{@link #Theme_actionDropDownStyle com.nutomic.localroute:actionDropDownStyle}</code></td><td> Default ActionBar dropdown style.</td></tr> <tr><td><code>{@link #Theme_actionDropDownStyle com.github.nutomic.localroute:actionDropDownStyle}</code></td><td> Default ActionBar dropdown style.</td></tr>
<tr><td><code>{@link #Theme_dropdownListPreferredItemHeight com.nutomic.localroute:dropdownListPreferredItemHeight}</code></td><td> The preferred item height for dropdown lists.</td></tr> <tr><td><code>{@link #Theme_dropdownListPreferredItemHeight com.github.nutomic.localroute:dropdownListPreferredItemHeight}</code></td><td> The preferred item height for dropdown lists.</td></tr>
<tr><td><code>{@link #Theme_listChoiceBackgroundIndicator com.nutomic.localroute:listChoiceBackgroundIndicator}</code></td><td> Drawable used as a background for selected list items.</td></tr> <tr><td><code>{@link #Theme_listChoiceBackgroundIndicator com.github.nutomic.localroute:listChoiceBackgroundIndicator}</code></td><td> Drawable used as a background for selected list items.</td></tr>
<tr><td><code>{@link #Theme_panelMenuListTheme com.nutomic.localroute:panelMenuListTheme}</code></td><td> Default Panel Menu style.</td></tr> <tr><td><code>{@link #Theme_panelMenuListTheme com.github.nutomic.localroute:panelMenuListTheme}</code></td><td> Default Panel Menu style.</td></tr>
<tr><td><code>{@link #Theme_panelMenuListWidth com.nutomic.localroute:panelMenuListWidth}</code></td><td> Default Panel Menu width.</td></tr> <tr><td><code>{@link #Theme_panelMenuListWidth com.github.nutomic.localroute:panelMenuListWidth}</code></td><td> Default Panel Menu width.</td></tr>
<tr><td><code>{@link #Theme_popupMenuStyle com.nutomic.localroute:popupMenuStyle}</code></td><td> Default PopupMenu style.</td></tr> <tr><td><code>{@link #Theme_popupMenuStyle com.github.nutomic.localroute:popupMenuStyle}</code></td><td> Default PopupMenu style.</td></tr>
</table> </table>
@see #Theme_actionDropDownStyle @see #Theme_actionDropDownStyle
@see #Theme_dropdownListPreferredItemHeight @see #Theme_dropdownListPreferredItemHeight
@ -2847,7 +2847,7 @@ or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>na
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>This is a private symbol. <p>This is a private symbol.
@attr name com.nutomic.localroute:actionDropDownStyle @attr name com.github.nutomic.localroute:actionDropDownStyle
*/ */
public static final int Theme_actionDropDownStyle = 0; public static final int Theme_actionDropDownStyle = 0;
/** /**
@ -2865,7 +2865,7 @@ theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type. containing a value of this type.
<p>This is a private symbol. <p>This is a private symbol.
@attr name com.nutomic.localroute:dropdownListPreferredItemHeight @attr name com.github.nutomic.localroute:dropdownListPreferredItemHeight
*/ */
public static final int Theme_dropdownListPreferredItemHeight = 1; public static final int Theme_dropdownListPreferredItemHeight = 1;
/** /**
@ -2877,7 +2877,7 @@ containing a value of this type.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>This is a private symbol. <p>This is a private symbol.
@attr name com.nutomic.localroute:listChoiceBackgroundIndicator @attr name com.github.nutomic.localroute:listChoiceBackgroundIndicator
*/ */
public static final int Theme_listChoiceBackgroundIndicator = 5; public static final int Theme_listChoiceBackgroundIndicator = 5;
/** /**
@ -2889,7 +2889,7 @@ or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>na
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>This is a private symbol. <p>This is a private symbol.
@attr name com.nutomic.localroute:panelMenuListTheme @attr name com.github.nutomic.localroute:panelMenuListTheme
*/ */
public static final int Theme_panelMenuListTheme = 4; public static final int Theme_panelMenuListTheme = 4;
/** /**
@ -2907,7 +2907,7 @@ theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type. containing a value of this type.
<p>This is a private symbol. <p>This is a private symbol.
@attr name com.nutomic.localroute:panelMenuListWidth @attr name com.github.nutomic.localroute:panelMenuListWidth
*/ */
public static final int Theme_panelMenuListWidth = 3; public static final int Theme_panelMenuListWidth = 3;
/** /**
@ -2919,7 +2919,7 @@ containing a value of this type.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>This is a private symbol. <p>This is a private symbol.
@attr name com.nutomic.localroute:popupMenuStyle @attr name com.github.nutomic.localroute:popupMenuStyle
*/ */
public static final int Theme_popupMenuStyle = 2; public static final int Theme_popupMenuStyle = 2;
/** Attributes that can be used with a View. /** Attributes that can be used with a View.
@ -2929,8 +2929,8 @@ or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>na
<colgroup align="left" /> <colgroup align="left" />
<tr><th>Attribute</th><th>Description</th></tr> <tr><th>Attribute</th><th>Description</th></tr>
<tr><td><code>{@link #View_android_focusable android:focusable}</code></td><td> Boolean that controls whether a view can take focus.</td></tr> <tr><td><code>{@link #View_android_focusable android:focusable}</code></td><td> Boolean that controls whether a view can take focus.</td></tr>
<tr><td><code>{@link #View_paddingEnd com.nutomic.localroute:paddingEnd}</code></td><td> Sets the padding, in pixels, of the end edge; see {@link android.R.attr#padding}.</td></tr> <tr><td><code>{@link #View_paddingEnd com.github.nutomic.localroute:paddingEnd}</code></td><td> Sets the padding, in pixels, of the end edge; see {@link android.R.attr#padding}.</td></tr>
<tr><td><code>{@link #View_paddingStart com.nutomic.localroute:paddingStart}</code></td><td> Sets the padding, in pixels, of the start edge; see {@link android.R.attr#padding}.</td></tr> <tr><td><code>{@link #View_paddingStart com.github.nutomic.localroute:paddingStart}</code></td><td> Sets the padding, in pixels, of the start edge; see {@link android.R.attr#padding}.</td></tr>
</table> </table>
@see #View_android_focusable @see #View_android_focusable
@see #View_paddingEnd @see #View_paddingEnd
@ -2968,7 +2968,7 @@ theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type. containing a value of this type.
<p>This is a private symbol. <p>This is a private symbol.
@attr name com.nutomic.localroute:paddingEnd @attr name com.github.nutomic.localroute:paddingEnd
*/ */
public static final int View_paddingEnd = 2; public static final int View_paddingEnd = 2;
/** /**
@ -2986,7 +2986,7 @@ theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type. containing a value of this type.
<p>This is a private symbol. <p>This is a private symbol.
@attr name com.nutomic.localroute:paddingStart @attr name com.github.nutomic.localroute:paddingStart
*/ */
public static final int View_paddingStart = 1; public static final int View_paddingStart = 1;
}; };

View File

@ -0,0 +1,145 @@
package com.github.nutomic.localroute;
import java.io.IOException;
import android.content.Context;
import android.content.Intent;
import android.media.AudioManager;
import android.media.MediaPlayer;
import android.os.Bundle;
import android.os.SystemClock;
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;
public class Controller extends MediaRouteProvider.RouteController implements
MediaPlayer.OnCompletionListener {
private Context mContext;
private AudioManager mAudio;
AudioManager.OnAudioFocusChangeListener mFocusListener;
private final String mRouteId;
private String mItemId;
private int mState;
MediaPlayer mPlayer = new MediaPlayer();
public Controller(String routeId, Context context) {
mContext = context;
mRouteId = routeId;
mAudio = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE);
mPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);
}
@Override
public void onRelease() {
mPlayer.release();
}
@Override
public void onSelect() {
mAudio.requestAudioFocus(mFocusListener, AudioManager.STREAM_MUSIC,
AudioManager.AUDIOFOCUS_GAIN);
}
@Override
public void onUnselect() {
mAudio.abandonAudioFocus(mFocusListener);
}
@Override
public void onSetVolume(int volume) {
mAudio.setStreamVolume(AudioManager.STREAM_MUSIC, volume, 0);
}
@Override
public void onUpdateVolume(int delta) {
int currentVolume = mAudio.getStreamVolume(AudioManager.STREAM_MUSIC);
mAudio.setStreamVolume(AudioManager.STREAM_MUSIC, currentVolume + delta, 0);
}
@Override
public boolean onControlRequest(Intent intent, ControlRequestCallback callback) {
String sessionId = intent.getStringExtra(MediaControlIntent.EXTRA_SESSION_ID);
String itemId = intent.getStringExtra(MediaControlIntent.EXTRA_ITEM_ID);
if (intent.getAction().equals(MediaControlIntent.ACTION_PLAY)) {
try {
mPlayer.reset();
mPlayer.setDataSource(mContext, intent.getData());
mPlayer.prepare();
mPlayer.start();
mItemId = intent.getDataString();
mState = MediaItemStatus.PLAYBACK_STATE_PLAYING;
getStatus(mItemId, mRouteId, callback);
return true;
} catch (IllegalArgumentException e) {
mState = MediaItemStatus.PLAYBACK_STATE_ERROR;
e.printStackTrace();
} catch (IOException e) {
mState = MediaItemStatus.PLAYBACK_STATE_ERROR;
e.printStackTrace();
}
}
else if (intent.getAction().equals(MediaControlIntent.ACTION_PAUSE)) {
mPlayer.pause();
mState = MediaItemStatus.PLAYBACK_STATE_PAUSED;
return true;
}
else if (intent.getAction().equals(MediaControlIntent.ACTION_RESUME)) {
mPlayer.start();
mState = MediaItemStatus.PLAYBACK_STATE_PLAYING;
return true;
}
else if (intent.getAction().equals(MediaControlIntent.ACTION_STOP)) {
mPlayer.stop();
mState = MediaItemStatus.PLAYBACK_STATE_CANCELED;
return true;
}
else if (intent.getAction().equals(MediaControlIntent.ACTION_SEEK)) {
mPlayer.seekTo((int) intent.getLongExtra(
MediaControlIntent.EXTRA_ITEM_CONTENT_POSITION, 0));
getStatus(itemId, sessionId, callback);
return true;
}
else if(intent.getAction().equals(MediaControlIntent.ACTION_GET_STATUS)) {
getStatus(itemId, sessionId, callback);
return true;
}
return false;
}
private void getStatus(String itemId, String sessionId, ControlRequestCallback callback) {
if (callback == null)
return;
Bundle status = null;
if (mItemId.equals(itemId)) {
status = new MediaItemStatus.Builder(mState)
.setContentPosition(mPlayer.getCurrentPosition())
.setContentDuration(mPlayer.getDuration())
.setTimestamp(SystemClock.elapsedRealtime())
.build().asBundle();
status.putString(MediaControlIntent.EXTRA_SESSION_ID, mRouteId);
status.putString(MediaControlIntent.EXTRA_ITEM_ID, mItemId);
}
else
status = new MediaItemStatus.Builder(MediaItemStatus.PLAYBACK_STATE_INVALIDATED)
.build().asBundle();
callback.onResult(status);
}
@Override
public void onCompletion(MediaPlayer mp) {
mState = MediaItemStatus.PLAYBACK_STATE_FINISHED;
}
}

View File

@ -0,0 +1,77 @@
package com.github.nutomic.localroute;
import java.util.ArrayList;
import android.content.Context;
import android.content.IntentFilter;
import android.content.IntentFilter.MalformedMimeTypeException;
import android.content.res.Resources;
import android.media.AudioManager;
import android.support.v7.media.MediaControlIntent;
import android.support.v7.media.MediaRouteDescriptor;
import android.support.v7.media.MediaRouteProvider;
import android.support.v7.media.MediaRouteProviderDescriptor;
import android.support.v7.media.MediaRouter;
/**
* Demonstrates how to create a custom media route provider.
*
* @see SampleMediaRouteProviderService
*/
final class Provider extends MediaRouteProvider {
private static final String ROUTE_ID = "local_route";
AudioManager mAudio = (AudioManager) getContext().getSystemService(Context.AUDIO_SERVICE);
private static final ArrayList<IntentFilter> CONTROL_FILTERS;
static {
IntentFilter f = new IntentFilter();
f.addCategory(MediaControlIntent.CATEGORY_REMOTE_PLAYBACK);
f.addAction(MediaControlIntent.ACTION_PLAY);
f.addAction(MediaControlIntent.ACTION_PAUSE);
f.addAction(MediaControlIntent.ACTION_SEEK);
f.addAction(MediaControlIntent.ACTION_STOP);
f.addDataScheme("http");
f.addDataScheme("https");
addDataTypeUnchecked(f, "audio/*");
CONTROL_FILTERS = new ArrayList<IntentFilter>();
CONTROL_FILTERS.add(f);
}
private static void addDataTypeUnchecked(IntentFilter filter, String type) {
try {
filter.addDataType(type);
} catch (MalformedMimeTypeException ex) {
throw new RuntimeException(ex);
}
}
public Provider(Context context) {
super(context);
Resources r = context.getResources();
MediaRouteDescriptor routeDescriptor = new MediaRouteDescriptor.Builder(
ROUTE_ID,
r.getString(R.string.local_device))
.addControlFilters(CONTROL_FILTERS)
.setPlaybackType(MediaRouter.RouteInfo.PLAYBACK_TYPE_REMOTE)
.setVolumeHandling(MediaRouter.RouteInfo.PLAYBACK_VOLUME_VARIABLE)
.setVolume(mAudio.getStreamMaxVolume(AudioManager.STREAM_MUSIC))
.build();
MediaRouteProviderDescriptor providerDescriptor =
new MediaRouteProviderDescriptor.Builder()
.addRoute(routeDescriptor)
.build();
setDescriptor(providerDescriptor);
}
@Override
public RouteController onCreateRouteController(String routeId) {
return new Controller(routeId, getContext());
}
}

View File

@ -0,0 +1,49 @@
/*
Copyright (c) 2013, Felix Ableitner
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of the <organization> nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package com.github.nutomic.localroute;
import android.support.v7.media.MediaRouteProvider;
import android.support.v7.media.MediaRouteProviderService;
public class ProviderService extends MediaRouteProviderService {
private Provider mProvider;
@Override
public MediaRouteProvider onCreateMediaRouteProvider() {
if (mProvider == null)
mProvider = new Provider(this);
return mProvider;
}
@Override
public void onDestroy() {
super.onDestroy();
mProvider = null;
}
}