Android APIs
public abstract class

TvInputService

extends Service
java.lang.Object
   ↳ android.content.Context
     ↳ android.content.ContextWrapper
       ↳ android.app.Service
         ↳ android.media.tv.TvInputService

Class Overview

The TvInputService class represents a TV input or source such as HDMI or built-in tuner which provides pass-through video or broadcast TV programs.

Applications will not normally use this service themselves, instead relying on the standard interaction provided by TvView. Those implementing TV input services should normally do so by deriving from this class and providing their own session implementation based on TvInputService.Session. All TV input services must require that clients hold the BIND_TV_INPUT in order to interact with the service; if this permission is not specified in the manifest, the system will refuse to bind to that TV input service.

Summary

Nested Classes
class TvInputService.Session Base class for derived classes to implement to provide a TV input session. 
Constants
String SERVICE_INTERFACE This is the interface name that a service implementing a TV input should say that it support -- that is, this is the action it uses for its intent filter.
String SERVICE_META_DATA Name under which a TvInputService component publishes information about itself.
[Expand]
Inherited Constants
From class android.app.Service
From class android.content.Context
From interface android.content.ComponentCallbacks2
Public Constructors
TvInputService()
Public Methods
final IBinder onBind(Intent intent)
Return the communication channel to the service.
void onCreate()
Called by the system when the service is first created.
abstract TvInputService.Session onCreateSession()
Returns a concrete implementation of TvInputService.Session.
[Expand]
Inherited Methods
From class android.app.Service
From class android.content.ContextWrapper
From class android.content.Context
From class java.lang.Object
From interface android.content.ComponentCallbacks
From interface android.content.ComponentCallbacks2

Constants

public static final String SERVICE_INTERFACE

This is the interface name that a service implementing a TV input should say that it support -- that is, this is the action it uses for its intent filter. To be supported, the service must also require the BIND_TV_INPUT permission so that other applications cannot abuse it.

Constant Value: "android.media.tv.TvInputService"

public static final String SERVICE_META_DATA

Name under which a TvInputService component publishes information about itself. This meta-data must reference an XML resource containing an <tv-input> tag.

Constant Value: "android.media.tv.input"

Public Constructors

public TvInputService ()

Public Methods

public final IBinder onBind (Intent intent)

Return the communication channel to the service. May return null if clients can not bind to the service. The returned IBinder is usually for a complex interface that has been described using aidl.

Note that unlike other application components, calls on to the IBinder interface returned here may not happen on the main thread of the process. More information about the main thread can be found in Processes and Threads.

Parameters
intent The Intent that was used to bind to this service, as given to Context.bindService. Note that any extras that were included with the Intent at that point will not be seen here.
Returns
  • Return an IBinder through which clients can call on to the service.

public void onCreate ()

Called by the system when the service is first created. Do not call this method directly.

public abstract TvInputService.Session onCreateSession ()

Returns a concrete implementation of TvInputService.Session.

May return null if this TV input service fails to create a session for some reason.