Home | History | Annotate | Download | only in main
      1 <?xml version="1.0" encoding="utf-8"?>
      2 <!-- Copyright (C) 2015 The Android Open Source Project
      3 
      4      Licensed under the Apache License, Version 2.0 (the "License");
      5      you may not use this file except in compliance with the License.
      6      You may obtain a copy of the License at
      7 
      8           http://www.apache.org/licenses/LICENSE-2.0
      9 
     10      Unless required by applicable law or agreed to in writing, software
     11      distributed under the License is distributed on an "AS IS" BASIS,
     12      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13      See the License for the specific language governing permissions and
     14      limitations under the License.
     15 -->
     16 
     17 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
     18     package="com.example.android.sampletvinput">
     19 
     20     <!-- Required to play internet-based streaming contents. -->
     21     <uses-permission android:name="android.permission.INTERNET"/>
     22     <!-- Required to register a SyncStatusObserver. -->
     23     <uses-permission android:name="android.permission.READ_SYNC_STATS"/>
     24     <!-- Required to enable our SyncAdapter after it's created. -->
     25     <uses-permission android:name="android.permission.WRITE_SYNC_SETTINGS"/>
     26     <!-- Required because we're manually creating a new account. -->
     27     <uses-permission android:name="android.permission.AUTHENTICATE_ACCOUNTS"/>
     28     <!-- Required to update or read existing channel and program information in TvProvider. -->
     29     <uses-permission android:name="com.android.providers.tv.permission.READ_EPG_DATA" />
     30     <!-- Required to update channel and program information in TvProvider. -->
     31     <uses-permission android:name="com.android.providers.tv.permission.WRITE_EPG_DATA" />
     32 
     33     <application android:label="@string/sample_tv_input"
     34             android:icon="@drawable/android_48dp"
     35             android:theme="@style/Theme.Leanback" >
     36         <!-- Launched by the TV app before it uses SimpleTvInputService to set up channels for this
     37         input. -->
     38         <activity android:name=".simple.SimpleTvInputSetupActivity" >
     39             <intent-filter>
     40                 <action android:name="android.intent.action.MAIN" />
     41             </intent-filter>
     42         </activity>
     43         <!-- TV input sample which includes minimal implementation for seeing a video on the TV app.
     44         Requires "android.permission.BIND_TV_INPUT" to ensure that only system services can bind.
     45         Lots of features including EPG and parental controls are left out in favor of keeping this
     46         sample simple. For a fully-featured example, see RichTvInputService. -->
     47         <service android:name=".simple.SimpleTvInputService"
     48             android:permission="android.permission.BIND_TV_INPUT"
     49             android:label="@string/simple_input_label">
     50             <!-- Required filter used by the system to launch our account service. -->
     51             <intent-filter>
     52                 <action android:name="android.media.tv.TvInputService" />
     53             </intent-filter>
     54             <!-- An XML file which describes this input. This provides a pointer to the
     55             SimpleTvInputSetupActivity to the system/TV app. -->
     56             <meta-data android:name="android.media.tv.input"
     57                 android:resource="@xml/simpletvinputservice" />
     58         </service>
     59 
     60         <!-- Launched by the TV app before it uses RichTvInputService. This registers channels and
     61         sets up SyncAdapter to provide program information in the background. -->
     62         <activity android:name=".rich.RichTvInputSetupActivity" >
     63             <intent-filter>
     64                 <action android:name="android.intent.action.MAIN" />
     65             </intent-filter>
     66         </activity>
     67         <!-- Launched by the TV app when user wants to change the settings for this input. The
     68         settings activity is expected to be used for the existing configuration. E.g. subscription
     69         change, fine tuning of the channels, etc. -->
     70         <activity android:name=".rich.RichTvInputSettingsActivity">
     71             <intent-filter>
     72                 <action android:name="android.intent.action.MAIN" />
     73             </intent-filter>
     74         </activity>
     75         <!-- TV input which provides channels based on the streaming contents.
     76         Requires "android.permission.BIND_TV_INPUT" to ensure that only system services can bind.
     77         This provides the full implementation of TvInputService including EPG, subtitles,
     78         multi-audio, parental controls, and overlay view.
     79         -->
     80         <service android:name=".rich.RichTvInputService"
     81             android:permission="android.permission.BIND_TV_INPUT"
     82             android:label="@string/rich_input_label">
     83             <!-- Required filter used by the system to launch our account service. -->
     84             <intent-filter>
     85                 <action android:name="android.media.tv.TvInputService" />
     86             </intent-filter>
     87             <!-- An XML file which describes this input. This provides pointers to the
     88             RichTvInputSetupActivity and RichTvInputSettingsActivity to the system/TV app. -->
     89             <meta-data android:name="android.media.tv.input"
     90                 android:resource="@xml/richtvinputservice" />
     91         </service>
     92 
     93         <!-- This service implements the SyncAdapter for updating program information regularly in
     94         the background. It needs to be exported, so that the sync framework can access it. -->
     95         <service android:name=".syncadapter.SyncService"
     96             android:exported="true">
     97             <intent-filter>
     98                 <action android:name="android.content.SyncAdapter" />
     99             </intent-filter>
    100             <meta-data android:name="android.content.SyncAdapter"
    101                 android:resource="@xml/syncadapter" />
    102         </service>
    103 
    104         <!-- Since the channel/program feed here does not require any authentication, we use a dummy
    105         account used for SyncAdapter. -->
    106         <service android:name=".syncadapter.DummyAccountService">
    107             <intent-filter>
    108                 <action android:name="android.accounts.AccountAuthenticator" />
    109             </intent-filter>
    110             <meta-data android:name="android.accounts.AccountAuthenticator"
    111                 android:resource="@xml/authenticator" />
    112         </service>
    113     </application>
    114 
    115     <uses-feature
    116         android:name="android.hardware.touchscreen"
    117         android:required="false" />
    118     <uses-feature
    119         android:name="android.software.leanback"
    120         android:required="true" />
    121     <!-- Required to expose this app in the store only when the device has TV input framework
    122     with the TV app. -->
    123     <uses-feature
    124         android:name="android.software.live_tv"
    125         android:required="true" />
    126 </manifest>
    127