Home | History | Annotate | Download | only in main
      1 <?xml version="1.0" encoding="utf-8"?>
      2 <!--
      3   ~ Copyright 2017 The Android Open Source Project
      4   ~
      5   ~ Licensed under the Apache License, Version 2.0 (the "License");
      6   ~ you may not use this file except in compliance with the License.
      7   ~ You may obtain a copy of the License at
      8   ~
      9   ~     http://www.apache.org/licenses/LICENSE-2.0
     10   ~
     11   ~ Unless required by applicable law or agreed to in writing, software
     12   ~ distributed under the License is distributed on an "AS IS" BASIS,
     13   ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     14   ~ See the License for the specific language governing permissions and
     15   ~ limitations under the License.
     16   -->
     17 
     18 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
     19           package="com.example.android.mediasession">
     20 
     21     <uses-permission android:name="android.permission.INTERNET"/>
     22     <uses-permission android:name="android.permission.WAKE_LOCK"/>
     23 
     24     <application
     25             android:allowBackup="true"
     26             android:icon="@mipmap/ic_launcher"
     27             android:label="@string/app_name"
     28             android:supportsRtl="true"
     29             android:theme="@style/AppTheme">
     30         <activity
     31                 android:name=".ui.MainActivity"
     32                 android:launchMode="singleTop">
     33             <intent-filter>
     34                 <action android:name="android.intent.action.MAIN"/>
     35 
     36                 <category android:name="android.intent.category.LAUNCHER"/>
     37             </intent-filter>
     38         </activity>
     39 
     40         <service
     41                 android:name=".service.MusicService"
     42                 android:enabled="true"
     43                 android:exported="true">
     44             <intent-filter>
     45                 <action android:name="android.media.browse.MediaBrowserService"/>
     46             </intent-filter>
     47         </service>
     48 
     49         <!--
     50              MediaSession, prior to API 21, uses a broadcast receiver to communicate with a
     51              media session. It does not have to be this broadcast receiver, but it must
     52              handle the action "android.intent.action.MEDIA_BUTTON".
     53 
     54              Additionally, this is used to resume the service from an inactive state upon
     55              receiving a media button event (such as "play").
     56         -->
     57         <receiver android:name="android.support.v4.media.session.MediaButtonReceiver">
     58             <intent-filter>
     59                 <action android:name="android.intent.action.MEDIA_BUTTON"/>
     60             </intent-filter>
     61         </receiver>
     62     </application>
     63 
     64 </manifest>