diff options
Diffstat (limited to 'media/MediaBrowserService/Application/src/main/AndroidManifest.xml')
-rw-r--r-- | media/MediaBrowserService/Application/src/main/AndroidManifest.xml | 33 |
1 files changed, 24 insertions, 9 deletions
diff --git a/media/MediaBrowserService/Application/src/main/AndroidManifest.xml b/media/MediaBrowserService/Application/src/main/AndroidManifest.xml index 52c4011e..570aeb47 100644 --- a/media/MediaBrowserService/Application/src/main/AndroidManifest.xml +++ b/media/MediaBrowserService/Application/src/main/AndroidManifest.xml @@ -1,5 +1,4 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- +<?xml version="1.0" encoding="utf-8"?><!-- Copyright (C) 2014 The Android Open Source Project Licensed under the Apache License, Version 2.0 (the "License"); @@ -18,7 +17,7 @@ xmlns:tools="http://schemas.android.com/tools" package="com.example.android.mediabrowserservice" android:versionCode="1" - android:versionName="1.0" > + android:versionName="1.0"> <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.WAKE_LOCK" /> @@ -30,12 +29,15 @@ android:theme="@style/AppTheme" tools:ignore="GoogleAppIndexingWarning,MissingIntentFilterForMediaSearch"> - <meta-data android:name="com.google.android.gms.car.application" - android:resource="@xml/automotive_app_desc"/> + <meta-data + android:name="com.google.android.gms.car.application" + android:resource="@xml/automotive_app_desc" /> - <activity android:name=".MusicPlayerActivity" - android:label="@string/app_name"> + <activity + android:name=".MusicPlayerActivity" + android:label="@string/app_name" + android:launchMode="singleTop"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> @@ -60,13 +62,26 @@ <service android:name=".MusicService" - android:exported="true" - > + android:exported="true"> <intent-filter> <action android:name="android.media.browse.MediaBrowserService" /> </intent-filter> </service> + <!-- + MediaSession, prior to API 21, uses a broadcast receiver to communicate with a + media session. It does not have to be this broadcast receiver, but it must + handle the action "android.intent.action.MEDIA_BUTTON". + + Additionally, this is used to resume the service from an inactive state upon + receiving a media button event (such as "play"). + --> + <receiver android:name="android.support.v4.media.session.MediaButtonReceiver"> + <intent-filter> + <action android:name="android.intent.action.MEDIA_BUTTON" /> + </intent-filter> + </receiver> + </application> </manifest> |