import typing

import android.app
import android.content
import android.content.pm
import android.graphics
import android.media
import android.media.tv
import android.net
import android.net.http
import android.os
import android.util
import android.view
import java
import java.chaquopy
import java.lang
import java.util
import java.util.concurrent

class AppLinkInfo(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[AppLinkInfo]] = ...
    def __init__(self, packageName: str | java.lang.String, className: str | java.lang.String, uriString: str | java.lang.String, /) -> None: ...
    def describeContents(self) -> int: ...
    def getComponentName(self) -> android.content.ComponentName: ...
    def getUri(self) -> android.net.Uri: ...
    def toString(self) -> str: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

class TvInteractiveAppManager(java.lang.Object):
    ACTION_APP_LINK_COMMAND: typing.ClassVar[str] = ...
    APP_LINK_KEY_BACK_URI: typing.ClassVar[str] = ...
    APP_LINK_KEY_CLASS_NAME: typing.ClassVar[str] = ...
    APP_LINK_KEY_COMMAND_TYPE: typing.ClassVar[str] = ...
    APP_LINK_KEY_PACKAGE_NAME: typing.ClassVar[str] = ...
    APP_LINK_KEY_SERVICE_ID: typing.ClassVar[str] = ...
    ERROR_BLOCKED: typing.ClassVar[int] = ...
    ERROR_ENCRYPTED: typing.ClassVar[int] = ...
    ERROR_NONE: typing.ClassVar[int] = ...
    ERROR_NOT_SUPPORTED: typing.ClassVar[int] = ...
    ERROR_RESOURCE_UNAVAILABLE: typing.ClassVar[int] = ...
    ERROR_UNKNOWN: typing.ClassVar[int] = ...
    ERROR_UNKNOWN_CHANNEL: typing.ClassVar[int] = ...
    ERROR_WEAK_SIGNAL: typing.ClassVar[int] = ...
    INTENT_KEY_BI_INTERACTIVE_APP_TYPE: typing.ClassVar[str] = ...
    INTENT_KEY_BI_INTERACTIVE_APP_URI: typing.ClassVar[str] = ...
    INTENT_KEY_CHANNEL_URI: typing.ClassVar[str] = ...
    INTENT_KEY_COMMAND_TYPE: typing.ClassVar[str] = ...
    INTENT_KEY_INTERACTIVE_APP_SERVICE_ID: typing.ClassVar[str] = ...
    INTENT_KEY_TV_INPUT_ID: typing.ClassVar[str] = ...
    INTERACTIVE_APP_STATE_ERROR: typing.ClassVar[int] = ...
    INTERACTIVE_APP_STATE_RUNNING: typing.ClassVar[int] = ...
    INTERACTIVE_APP_STATE_STOPPED: typing.ClassVar[int] = ...
    SERVICE_STATE_ERROR: typing.ClassVar[int] = ...
    SERVICE_STATE_PREPARING: typing.ClassVar[int] = ...
    SERVICE_STATE_READY: typing.ClassVar[int] = ...
    SERVICE_STATE_UNREALIZED: typing.ClassVar[int] = ...
    TELETEXT_APP_STATE_ERROR: typing.ClassVar[int] = ...
    TELETEXT_APP_STATE_HIDE: typing.ClassVar[int] = ...
    TELETEXT_APP_STATE_SHOW: typing.ClassVar[int] = ...
    def getAppLinkInfoList(self) -> java.util.List[AppLinkInfo]: ...
    def getTvInteractiveAppServiceList(self) -> java.util.List[TvInteractiveAppServiceInfo]: ...
    def registerAppLinkInfo(self, tvIAppServiceId: str | java.lang.String, appLinkInfo: AppLinkInfo, /) -> None: ...
    def registerCallback(self, executor: java.util.concurrent.Executor, callback: TvInteractiveAppManager.TvInteractiveAppCallback, /) -> None: ...
    def sendAppLinkCommand(self, tvIAppServiceId: str | java.lang.String, command: android.os.Bundle, /) -> None: ...
    def unregisterAppLinkInfo(self, tvIAppServiceId: str | java.lang.String, appLinkInfo: AppLinkInfo, /) -> None: ...
    def unregisterCallback(self, callback: TvInteractiveAppManager.TvInteractiveAppCallback, /) -> None: ...

    class TvInteractiveAppCallback(java.lang.Object):
        def __init__(self) -> None: ...
        def onInteractiveAppServiceAdded(self, iAppServiceId: str | java.lang.String, /) -> None: ...
        def onInteractiveAppServiceRemoved(self, iAppServiceId: str | java.lang.String, /) -> None: ...
        def onInteractiveAppServiceUpdated(self, iAppServiceId: str | java.lang.String, /) -> None: ...
        def onTvInteractiveAppServiceStateChanged(self, iAppServiceId: str | java.lang.String, type: int | java.jint | java.lang.Integer, state: int | java.jint | java.lang.Integer, err: int | java.jint | java.lang.Integer, /) -> None: ...

class TvInteractiveAppService(android.app.Service):
    COMMAND_PARAMETER_KEY_CHANGE_CHANNEL_QUIETLY: typing.ClassVar[str] = ...
    COMMAND_PARAMETER_KEY_CHANNEL_URI: typing.ClassVar[str] = ...
    COMMAND_PARAMETER_KEY_INPUT_ID: typing.ClassVar[str] = ...
    COMMAND_PARAMETER_KEY_PLAYBACK_PARAMS: typing.ClassVar[str] = ...
    COMMAND_PARAMETER_KEY_PROGRAM_URI: typing.ClassVar[str] = ...
    COMMAND_PARAMETER_KEY_STOP_MODE: typing.ClassVar[str] = ...
    COMMAND_PARAMETER_KEY_TIME_POSITION: typing.ClassVar[str] = ...
    COMMAND_PARAMETER_KEY_TIME_SHIFT_MODE: typing.ClassVar[str] = ...
    COMMAND_PARAMETER_KEY_TRACK_ID: typing.ClassVar[str] = ...
    COMMAND_PARAMETER_KEY_TRACK_TYPE: typing.ClassVar[str] = ...
    COMMAND_PARAMETER_KEY_VOLUME: typing.ClassVar[str] = ...
    COMMAND_PARAMETER_VALUE_STOP_MODE_BLANK: typing.ClassVar[int] = ...
    COMMAND_PARAMETER_VALUE_STOP_MODE_FREEZE: typing.ClassVar[int] = ...
    PLAYBACK_COMMAND_TYPE_SELECT_TRACK: typing.ClassVar[str] = ...
    PLAYBACK_COMMAND_TYPE_SET_STREAM_VOLUME: typing.ClassVar[str] = ...
    PLAYBACK_COMMAND_TYPE_STOP: typing.ClassVar[str] = ...
    PLAYBACK_COMMAND_TYPE_TUNE: typing.ClassVar[str] = ...
    PLAYBACK_COMMAND_TYPE_TUNE_NEXT: typing.ClassVar[str] = ...
    PLAYBACK_COMMAND_TYPE_TUNE_PREV: typing.ClassVar[str] = ...
    SERVICE_INTERFACE: typing.ClassVar[str] = ...
    SERVICE_META_DATA: typing.ClassVar[str] = ...
    TIME_SHIFT_COMMAND_TYPE_PAUSE: typing.ClassVar[str] = ...
    TIME_SHIFT_COMMAND_TYPE_PLAY: typing.ClassVar[str] = ...
    TIME_SHIFT_COMMAND_TYPE_RESUME: typing.ClassVar[str] = ...
    TIME_SHIFT_COMMAND_TYPE_SEEK_TO: typing.ClassVar[str] = ...
    TIME_SHIFT_COMMAND_TYPE_SET_MODE: typing.ClassVar[str] = ...
    TIME_SHIFT_COMMAND_TYPE_SET_PLAYBACK_PARAMS: typing.ClassVar[str] = ...
    def __init__(self) -> None: ...
    def notifyStateChanged(self, type: int | java.jint | java.lang.Integer, state: int | java.jint | java.lang.Integer, error: int | java.jint | java.lang.Integer, /) -> None: ...
    def onAppLinkCommand(self, command: android.os.Bundle, /) -> None: ...
    def onBind(self, intent: android.content.Intent, /) -> android.os.IBinder | None: ...
    def onCreateSession(self, arg1: str | java.lang.String, arg2: int | java.jint | java.lang.Integer, /) -> TvInteractiveAppService.Session | None: ...
    def onRegisterAppLinkInfo(self, appLinkInfo: AppLinkInfo, /) -> None: ...
    def onUnregisterAppLinkInfo(self, appLinkInfo: AppLinkInfo, /) -> None: ...

    class Session(android.view.KeyEvent.Callback):
        def __init__(self, context: android.content.Context, /) -> None: ...
        def isMediaViewEnabled(self) -> bool: ...
        def layoutSurface(self, left: int | java.jint | java.lang.Integer, top: int | java.jint | java.lang.Integer, right: int | java.jint | java.lang.Integer, bottom: int | java.jint | java.lang.Integer, /) -> None: ...
        def notifyAdBufferReady(self, buffer: android.media.tv.AdBuffer, /) -> None: ...
        def notifyBiInteractiveAppCreated(self, biIAppUri: android.net.Uri, biIAppId: str | java.lang.String, /) -> None: ...
        def notifySessionStateChanged(self, state: int | java.jint | java.lang.Integer, err: int | java.jint | java.lang.Integer, /) -> None: ...
        def notifyTeletextAppStateChanged(self, state: int | java.jint | java.lang.Integer, /) -> None: ...
        def onAdBufferConsumed(self, buffer: android.media.tv.AdBuffer, /) -> None: ...
        def onAdResponse(self, response: android.media.tv.AdResponse, /) -> None: ...
        def onAvailableSpeeds(self, speeds: java.chaquopy.JavaArrayJFloat, /) -> None: ...
        def onBroadcastInfoResponse(self, response: android.media.tv.BroadcastInfoResponse, /) -> None: ...
        def onCertificate(self, host: str | java.lang.String, port: int | java.jint | java.lang.Integer, cert: android.net.http.SslCertificate, /) -> None: ...
        def onContentAllowed(self) -> None: ...
        def onContentBlocked(self, rating: android.media.tv.TvContentRating, /) -> None: ...
        def onCreateBiInteractiveAppRequest(self, biIAppUri: android.net.Uri, params: android.os.Bundle, /) -> None: ...
        def onCreateMediaView(self) -> android.view.View: ...
        def onCurrentChannelLcn(self, lcn: int | java.jint | java.lang.Integer, /) -> None: ...
        def onCurrentChannelUri(self, channelUri: android.net.Uri, /) -> None: ...
        def onCurrentTvInputId(self, inputId: str | java.lang.String, /) -> None: ...
        def onCurrentVideoBounds(self, bounds: android.graphics.Rect, /) -> None: ...
        def onDestroyBiInteractiveAppRequest(self, biIAppId: str | java.lang.String, /) -> None: ...
        def onError(self, errMsg: str | java.lang.String, params: android.os.Bundle, /) -> None: ...
        def onGenericMotionEvent(self, event: android.view.MotionEvent, /) -> bool: ...
        def onKeyDown(self, keyCode: int | java.jint | java.lang.Integer, event: android.view.KeyEvent, /) -> bool: ...
        def onKeyLongPress(self, keyCode: int | java.jint | java.lang.Integer, event: android.view.KeyEvent, /) -> bool: ...
        def onKeyMultiple(self, keyCode: int | java.jint | java.lang.Integer, count: int | java.jint | java.lang.Integer, event: android.view.KeyEvent, /) -> bool: ...
        def onKeyUp(self, keyCode: int | java.jint | java.lang.Integer, event: android.view.KeyEvent, /) -> bool: ...
        def onMediaViewSizeChanged(self, width: int | java.jint | java.lang.Integer, height: int | java.jint | java.lang.Integer, /) -> None: ...
        def onRecordingConnectionFailed(self, recordingId: str | java.lang.String, inputId: str | java.lang.String, /) -> None: ...
        def onRecordingDisconnected(self, recordingId: str | java.lang.String, inputId: str | java.lang.String, /) -> None: ...
        def onRecordingError(self, recordingId: str | java.lang.String, err: int | java.jint | java.lang.Integer, /) -> None: ...
        def onRecordingScheduled(self, recordingId: str | java.lang.String, requestId: str | java.lang.String, /) -> None: ...
        def onRecordingStarted(self, recordingId: str | java.lang.String, requestId: str | java.lang.String, /) -> None: ...
        def onRecordingStopped(self, recordingId: str | java.lang.String, /) -> None: ...
        def onRecordingTuned(self, recordingId: str | java.lang.String, channelUri: android.net.Uri, /) -> None: ...
        def onRelease(self) -> None: ...
        def onResetInteractiveApp(self) -> None: ...
        def onSelectedTrackInfo(self, tracks: java.util.List[android.media.tv.TvTrackInfo], /) -> None: ...
        def onSetSurface(self, arg1: android.view.Surface, /) -> bool: ...
        def onSetTeletextAppEnabled(self, enable: bool | java.jboolean | java.lang.Boolean, /) -> None: ...
        def onSignalStrength(self, strength: int | java.jint | java.lang.Integer, /) -> None: ...
        def onSigningResult(self, signingId: str | java.lang.String, result: java.chaquopy.JavaArrayJByte, /) -> None: ...
        def onStartInteractiveApp(self) -> None: ...
        def onStopInteractiveApp(self) -> None: ...
        def onStreamVolume(self, volume: float | java.jfloat | java.lang.Float, /) -> None: ...
        def onSurfaceChanged(self, format: int | java.jint | java.lang.Integer, width: int | java.jint | java.lang.Integer, height: int | java.jint | java.lang.Integer, /) -> None: ...
        def onTimeShiftCurrentPositionChanged(self, inputId: str | java.lang.String, timeMs: int | java.jlong | java.lang.Long, /) -> None: ...
        def onTimeShiftMode(self, mode: int | java.jint | java.lang.Integer, /) -> None: ...
        def onTimeShiftPlaybackParams(self, params: android.media.PlaybackParams, /) -> None: ...
        def onTimeShiftStartPositionChanged(self, inputId: str | java.lang.String, timeMs: int | java.jlong | java.lang.Long, /) -> None: ...
        def onTimeShiftStatusChanged(self, inputId: str | java.lang.String, status: int | java.jint | java.lang.Integer, /) -> None: ...
        def onTouchEvent(self, event: android.view.MotionEvent, /) -> bool: ...
        def onTrackInfoList(self, tracks: java.util.List[android.media.tv.TvTrackInfo], /) -> None: ...
        def onTrackSelected(self, type: int | java.jint | java.lang.Integer, trackId: str | java.lang.String, /) -> None: ...
        def onTrackballEvent(self, event: android.view.MotionEvent, /) -> bool: ...
        def onTracksChanged(self, tracks: java.util.List[android.media.tv.TvTrackInfo], /) -> None: ...
        def onTuned(self, channelUri: android.net.Uri, /) -> None: ...
        def onTvMessage(self, type: int | java.jint | java.lang.Integer, data: android.os.Bundle, /) -> None: ...
        def onTvRecordingInfo(self, recordingInfo: android.media.tv.TvRecordingInfo, /) -> None: ...
        def onTvRecordingInfoList(self, recordingInfoList: java.util.List[android.media.tv.TvRecordingInfo], /) -> None: ...
        def onVideoAvailable(self) -> None: ...
        def onVideoFreezeUpdated(self, isFrozen: bool | java.jboolean | java.lang.Boolean, /) -> None: ...
        def onVideoUnavailable(self, reason: int | java.jint | java.lang.Integer, /) -> None: ...
        def removeBroadcastInfo(self, requestId: int | java.jint | java.lang.Integer, /) -> None: ...
        def requestAd(self, request: android.media.tv.AdRequest, /) -> None: ...
        def requestAvailableSpeeds(self) -> None: ...
        def requestBroadcastInfo(self, request: android.media.tv.BroadcastInfoRequest, /) -> None: ...
        def requestCertificate(self, host: str | java.lang.String, port: int | java.jint | java.lang.Integer, /) -> None: ...
        def requestCurrentChannelLcn(self) -> None: ...
        def requestCurrentChannelUri(self) -> None: ...
        def requestCurrentTvInputId(self) -> None: ...
        def requestCurrentVideoBounds(self) -> None: ...
        @typing.overload
        def requestScheduleRecording(self, requestId: str | java.lang.String, inputId: str | java.lang.String, channelUri: android.net.Uri, programUri: android.net.Uri, params: android.os.Bundle, /) -> None: ...
        @typing.overload
        def requestScheduleRecording(self, requestId: str | java.lang.String, inputId: str | java.lang.String, channelUri: android.net.Uri, startTime: int | java.jlong | java.lang.Long, duration: int | java.jlong | java.lang.Long, repeatDays: int | java.jint | java.lang.Integer, params: android.os.Bundle, /) -> None: ...
        def requestSelectedTrackInfo(self) -> None: ...
        @typing.overload
        def requestSigning(self, signingId: str | java.lang.String, algorithm: str | java.lang.String, alias: str | java.lang.String, data: java.chaquopy.JavaArrayJByte, /) -> None: ...
        @typing.overload
        def requestSigning(self, signingId: str | java.lang.String, algorithm: str | java.lang.String, host: str | java.lang.String, port: int | java.jint | java.lang.Integer, data: java.chaquopy.JavaArrayJByte, /) -> None: ...
        def requestStartRecording(self, requestId: str | java.lang.String, programUri: android.net.Uri, /) -> None: ...
        def requestStopRecording(self, recordingId: str | java.lang.String, /) -> None: ...
        def requestStreamVolume(self) -> None: ...
        def requestTimeShiftMode(self) -> None: ...
        def requestTrackInfoList(self) -> None: ...
        def requestTvRecordingInfo(self, recordingId: str | java.lang.String, /) -> None: ...
        def requestTvRecordingInfoList(self, type: int | java.jint | java.lang.Integer, /) -> None: ...
        def sendPlaybackCommandRequest(self, cmdType: str | java.lang.String, parameters: android.os.Bundle, /) -> None: ...
        def sendTimeShiftCommandRequest(self, cmdType: str | java.lang.String, parameters: android.os.Bundle, /) -> None: ...
        def setMediaViewEnabled(self, enable: bool | java.jboolean | java.lang.Boolean, /) -> None: ...
        def setTvRecordingInfo(self, recordingId: str | java.lang.String, recordingInfo: android.media.tv.TvRecordingInfo, /) -> None: ...
        def setVideoBounds(self, rect: android.graphics.Rect, /) -> None: ...

class TvInteractiveAppServiceInfo(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[TvInteractiveAppServiceInfo]] = ...
    INTERACTIVE_APP_TYPE_ATSC: typing.ClassVar[int] = ...
    INTERACTIVE_APP_TYPE_GINGA: typing.ClassVar[int] = ...
    INTERACTIVE_APP_TYPE_HBBTV: typing.ClassVar[int] = ...
    INTERACTIVE_APP_TYPE_OTHER: typing.ClassVar[int] = ...
    INTERACTIVE_APP_TYPE_TARGETED_AD: typing.ClassVar[int] = ...
    def __init__(self, context: android.content.Context, component: android.content.ComponentName, /) -> None: ...
    def describeContents(self) -> int: ...
    def getCustomSupportedTypes(self) -> java.util.List[java.lang.String]: ...
    def getId(self) -> str: ...
    def getServiceInfo(self) -> android.content.pm.ServiceInfo | None: ...
    def getSupportedTypes(self) -> int: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

class TvInteractiveAppView(android.view.ViewGroup):
    BI_INTERACTIVE_APP_KEY_ALIAS: typing.ClassVar[str] = ...
    BI_INTERACTIVE_APP_KEY_CERTIFICATE: typing.ClassVar[str] = ...
    BI_INTERACTIVE_APP_KEY_HTTP_ADDITIONAL_HEADERS: typing.ClassVar[str] = ...
    BI_INTERACTIVE_APP_KEY_HTTP_USER_AGENT: typing.ClassVar[str] = ...
    BI_INTERACTIVE_APP_KEY_PRIVATE_KEY: typing.ClassVar[str] = ...
    ERROR_KEY_METHOD_NAME: typing.ClassVar[str] = ...
    @typing.overload
    def __init__(self, context: android.content.Context, /) -> None: ...
    @typing.overload
    def __init__(self, context: android.content.Context, attrs: android.util.AttributeSet, /) -> None: ...
    @typing.overload
    def __init__(self, context: android.content.Context, attrs: android.util.AttributeSet, defStyleAttr: int | java.jint | java.lang.Integer, /) -> None: ...
    def clearCallback(self) -> None: ...
    def clearOnUnhandledInputEventListener(self) -> None: ...
    def createBiInteractiveApp(self, biIAppUri: android.net.Uri, params: android.os.Bundle, /) -> None: ...
    def destroyBiInteractiveApp(self, biIAppId: str | java.lang.String, /) -> None: ...
    def dispatchKeyEvent(self, event: android.view.KeyEvent, /) -> bool: ...
    def dispatchUnhandledInputEvent(self, event: android.view.InputEvent, /) -> bool: ...
    def getOnUnhandledInputEventListener(self) -> TvInteractiveAppView.OnUnhandledInputEventListener | None: ...
    def notifyError(self, errMsg: str | java.lang.String, params: android.os.Bundle, /) -> None: ...
    def notifyRecordingScheduled(self, recordingId: str | java.lang.String, requestId: str | java.lang.String, /) -> None: ...
    def notifyRecordingStarted(self, recordingId: str | java.lang.String, requestId: str | java.lang.String, /) -> None: ...
    def notifyRecordingStopped(self, recordingId: str | java.lang.String, /) -> None: ...
    def notifyTimeShiftCurrentPositionChanged(self, inputId: str | java.lang.String, timeMs: int | java.jlong | java.lang.Long, /) -> None: ...
    def notifyTimeShiftPlaybackParams(self, params: android.media.PlaybackParams, /) -> None: ...
    def notifyTimeShiftStartPositionChanged(self, inputId: str | java.lang.String, timeMs: int | java.jlong | java.lang.Long, /) -> None: ...
    def notifyTimeShiftStatusChanged(self, inputId: str | java.lang.String, status: int | java.jint | java.lang.Integer, /) -> None: ...
    def notifyTvMessage(self, type: int | java.jint | java.lang.Integer, data: android.os.Bundle, /) -> None: ...
    def notifyVideoFreezeUpdated(self, isFrozen: bool | java.jboolean | java.lang.Boolean, /) -> None: ...
    def onAttachedToWindow(self) -> None: ...
    def onDetachedFromWindow(self) -> None: ...
    def onLayout(self, changed: bool | java.jboolean | java.lang.Boolean, left: int | java.jint | java.lang.Integer, top: int | java.jint | java.lang.Integer, right: int | java.jint | java.lang.Integer, bottom: int | java.jint | java.lang.Integer, /) -> None: ...
    def onMeasure(self, widthMeasureSpec: int | java.jint | java.lang.Integer, heightMeasureSpec: int | java.jint | java.lang.Integer, /) -> None: ...
    def onUnhandledInputEvent(self, event: android.view.InputEvent, /) -> bool: ...
    def onVisibilityChanged(self, changedView: android.view.View, visibility: int | java.jint | java.lang.Integer, /) -> None: ...
    def prepareInteractiveApp(self, iAppServiceId: str | java.lang.String, type: int | java.jint | java.lang.Integer, /) -> None: ...
    def reset(self) -> None: ...
    def resetInteractiveApp(self) -> None: ...
    def sendAvailableSpeeds(self, speeds: java.chaquopy.JavaArrayJFloat, /) -> None: ...
    def sendCertificate(self, host: str | java.lang.String, port: int | java.jint | java.lang.Integer, cert: android.net.http.SslCertificate, /) -> None: ...
    def sendCurrentChannelLcn(self, lcn: int | java.jint | java.lang.Integer, /) -> None: ...
    def sendCurrentChannelUri(self, channelUri: android.net.Uri, /) -> None: ...
    def sendCurrentTvInputId(self, inputId: str | java.lang.String, /) -> None: ...
    def sendCurrentVideoBounds(self, bounds: android.graphics.Rect, /) -> None: ...
    def sendSelectedTrackInfo(self, tracks: java.util.List[android.media.tv.TvTrackInfo], /) -> None: ...
    def sendSigningResult(self, signingId: str | java.lang.String, result: java.chaquopy.JavaArrayJByte, /) -> None: ...
    def sendStreamVolume(self, volume: float | java.jfloat | java.lang.Float, /) -> None: ...
    def sendTimeShiftMode(self, mode: int | java.jint | java.lang.Integer, /) -> None: ...
    def sendTrackInfoList(self, tracks: java.util.List[android.media.tv.TvTrackInfo], /) -> None: ...
    def sendTvRecordingInfo(self, recordingInfo: android.media.tv.TvRecordingInfo, /) -> None: ...
    def sendTvRecordingInfoList(self, recordingInfoList: java.util.List[android.media.tv.TvRecordingInfo], /) -> None: ...
    def setCallback(self, executor: java.util.concurrent.Executor, callback: TvInteractiveAppView.TvInteractiveAppCallback, /) -> None: ...
    def setOnUnhandledInputEventListener(self, executor: java.util.concurrent.Executor, listener: TvInteractiveAppView.OnUnhandledInputEventListener, /) -> None: ...
    def setTeletextAppEnabled(self, enable: bool | java.jboolean | java.lang.Boolean, /) -> None: ...
    def setTvView(self, tvView: android.media.tv.TvView, /) -> int: ...
    def setZOrderMediaOverlay(self, isMediaOverlay: bool | java.jboolean | java.lang.Boolean, /) -> None: ...
    def setZOrderOnTop(self, onTop: bool | java.jboolean | java.lang.Boolean, /) -> None: ...
    def startInteractiveApp(self) -> None: ...
    def stopInteractiveApp(self) -> None: ...

    class TvInteractiveAppCallback(java.lang.Object):
        def __init__(self) -> None: ...
        def onBiInteractiveAppCreated(self, iAppServiceId: str | java.lang.String, biIAppUri: android.net.Uri, biIAppId: str | java.lang.String, /) -> None: ...
        def onPlaybackCommandRequest(self, iAppServiceId: str | java.lang.String, cmdType: str | java.lang.String, parameters: android.os.Bundle, /) -> None: ...
        def onRequestAvailableSpeeds(self, iAppServiceId: str | java.lang.String, /) -> None: ...
        def onRequestCertificate(self, iAppServiceId: str | java.lang.String, host: str | java.lang.String, port: int | java.jint | java.lang.Integer, /) -> None: ...
        def onRequestCurrentChannelLcn(self, iAppServiceId: str | java.lang.String, /) -> None: ...
        def onRequestCurrentChannelUri(self, iAppServiceId: str | java.lang.String, /) -> None: ...
        def onRequestCurrentTvInputId(self, iAppServiceId: str | java.lang.String, /) -> None: ...
        def onRequestCurrentVideoBounds(self, iAppServiceId: str | java.lang.String, /) -> None: ...
        @typing.overload
        def onRequestScheduleRecording(self, iAppServiceId: str | java.lang.String, requestId: str | java.lang.String, inputId: str | java.lang.String, channelUri: android.net.Uri, programUri: android.net.Uri, params: android.os.Bundle, /) -> None: ...
        @typing.overload
        def onRequestScheduleRecording(self, iAppServiceId: str | java.lang.String, requestId: str | java.lang.String, inputId: str | java.lang.String, channelUri: android.net.Uri, startTime: int | java.jlong | java.lang.Long, duration: int | java.jlong | java.lang.Long, repeatDays: int | java.jint | java.lang.Integer, params: android.os.Bundle, /) -> None: ...
        def onRequestSelectedTrackInfo(self, iAppServiceId: str | java.lang.String, /) -> None: ...
        @typing.overload
        def onRequestSigning(self, iAppServiceId: str | java.lang.String, signingId: str | java.lang.String, algorithm: str | java.lang.String, alias: str | java.lang.String, data: java.chaquopy.JavaArrayJByte, /) -> None: ...
        @typing.overload
        def onRequestSigning(self, iAppServiceId: str | java.lang.String, signingId: str | java.lang.String, algorithm: str | java.lang.String, host: str | java.lang.String, port: int | java.jint | java.lang.Integer, data: java.chaquopy.JavaArrayJByte, /) -> None: ...
        def onRequestStartRecording(self, iAppServiceId: str | java.lang.String, requestId: str | java.lang.String, programUri: android.net.Uri, /) -> None: ...
        def onRequestStopRecording(self, iAppServiceId: str | java.lang.String, recordingId: str | java.lang.String, /) -> None: ...
        def onRequestStreamVolume(self, iAppServiceId: str | java.lang.String, /) -> None: ...
        def onRequestTimeShiftMode(self, iAppServiceId: str | java.lang.String, /) -> None: ...
        def onRequestTrackInfoList(self, iAppServiceId: str | java.lang.String, /) -> None: ...
        def onRequestTvRecordingInfo(self, iAppServiceId: str | java.lang.String, recordingId: str | java.lang.String, /) -> None: ...
        def onRequestTvRecordingInfoList(self, iAppServiceId: str | java.lang.String, type: int | java.jint | java.lang.Integer, /) -> None: ...
        def onSetTvRecordingInfo(self, iAppServiceId: str | java.lang.String, recordingId: str | java.lang.String, recordingInfo: android.media.tv.TvRecordingInfo, /) -> None: ...
        def onSetVideoBounds(self, iAppServiceId: str | java.lang.String, rect: android.graphics.Rect, /) -> None: ...
        def onStateChanged(self, iAppServiceId: str | java.lang.String, state: int | java.jint | java.lang.Integer, err: int | java.jint | java.lang.Integer, /) -> None: ...
        def onTeletextAppStateChanged(self, iAppServiceId: str | java.lang.String, state: int | java.jint | java.lang.Integer, /) -> None: ...
        def onTimeShiftCommandRequest(self, iAppServiceId: str | java.lang.String, cmdType: str | java.lang.String, parameters: android.os.Bundle, /) -> None: ...

    class OnUnhandledInputEventListener(java.lang.Object):
        def onUnhandledInputEvent(self, arg1: android.view.InputEvent, /) -> bool: ...
