java.lang.Object | |
↳ | android.media.tv.TvInputService.Session |
Base class for derived classes to implement to provide a TV input session.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Called when an application requests to create an overlay view.
| |||||||||||
Implement this method to handle generic motion events on the current input session.
| |||||||||||
Default implementation of
KeyEvent.Callback.onKeyDown() : always returns false (doesn't handle the event). | |||||||||||
Default implementation of
KeyEvent.Callback.onKeyLongPress() : always returns false (doesn't handle the event). | |||||||||||
Default implementation of
KeyEvent.Callback.onKeyMultiple() : always returns false (doesn't handle the event). | |||||||||||
Default implementation of
KeyEvent.Callback.onKeyUp() : always returns false (doesn't handle the event). | |||||||||||
Called when the session is released.
| |||||||||||
Sets the relative stream volume of the current TV input session to handle the change of
audio focus by setting.
| |||||||||||
Sets the
Surface for the current input session on which the TV input renders
video. | |||||||||||
Implement this method to handle touch screen motion events on the current input session.
| |||||||||||
Implement this method to handle trackball events on the current input session.
| |||||||||||
Tunes to a given channel.
| |||||||||||
Enables or disables the overlay view.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
android.view.KeyEvent.Callback
|
Called when an application requests to create an overlay view. Each session implementation can override this method and return its own view.
Implement this method to handle generic motion events on the current input session.
event | The motion event being received. |
---|
true
. If you want to allow the event to
be handled by the next receiver, return false
.Default implementation of KeyEvent.Callback.onKeyDown()
: always returns false (doesn't handle the event).
Override this to intercept key down events before they are processed by the application. If you return true, the application will not process the event itself. If you return false, the normal application processing will occur as if the TV input had not seen the event at all.
keyCode | The value in event.getKeyCode(). |
---|---|
event | Description of the key event. |
true
. If you want to allow the event to
be handled by the next receiver, return false
.
Default implementation of
KeyEvent.Callback.onKeyLongPress()
: always returns false (doesn't handle the event).
Override this to intercept key long press events before they are processed by the application. If you return true, the application will not process the event itself. If you return false, the normal application processing will occur as if the TV input had not seen the event at all.
keyCode | The value in event.getKeyCode(). |
---|---|
event | Description of the key event. |
true
. If you want to allow the event to
be handled by the next receiver, return false
.
Default implementation of
KeyEvent.Callback.onKeyMultiple()
: always returns false (doesn't handle the event).
Override this to intercept special key multiple events before they are processed by the application. If you return true, the application will not itself process the event. If you return false, the normal application processing will occur as if the TV input had not seen the event at all.
keyCode | The value in event.getKeyCode(). |
---|---|
count | The number of times the action was made. |
event | Description of the key event. |
true
. If you want to allow the event to
be handled by the next receiver, return false
.
Default implementation of KeyEvent.Callback.onKeyUp()
: always returns false (doesn't handle the event).
Override this to intercept key up events before they are processed by the application. If you return true, the application will not itself process the event. If you return false, the normal application processing will occur as if the TV input had not seen the event at all.
keyCode | The value in event.getKeyCode(). |
---|---|
event | Description of the key event. |
true
. If you want to allow the event to
be handled by the next receiver, return false
.
Called when the session is released.
Sets the relative stream volume of the current TV input session to handle the change of audio focus by setting.
volume | Volume scale from 0.0 to 1.0. |
---|
Implement this method to handle touch screen motion events on the current input session.
event | The motion event being received. |
---|
true
. If you want to allow the event to
be handled by the next receiver, return false
.Implement this method to handle trackball events on the current input session.
event | The motion event being received. |
---|
true
. If you want to allow the event to
be handled by the next receiver, return false
.Tunes to a given channel.
channelUri | The URI of the channel. |
---|
true
the tuning was successful, false
otherwise.
Enables or disables the overlay view. By default, the overlay view is disabled. Must be called explicitly after the session is created to enable the overlay view.
enable | true if you want to enable the overlay view. false
otherwise.
|
---|