Skip to content

Android App Control#

This document provides detailed information on the Android APIs for launching, quitting, and monitoring apps/games on a seatback monitor from a Passenger Electronic Device (PED), such as a companion app. These APIs are part of the Panasonic Inflight Entertainment system and are implemented in the SeatAppControlV1 class. They enable remote control of third-party applications or games on the paired seatback device.

The APIs require initialization with a SeatPairingV1 session object, which handles the pairing between the PED and the seatback monitor. Ensure the PED is paired before invoking these APIs (e.g., via setSeatPairingSession(SeatPairingV1 seatPairingSession)).

1. Launch App API#

Description

Launches a game or third-party application on the paired seatback monitor from the PED. This API supports optional parameters tailored to the app type, such as location coordinates and zoom levels for map apps. It is asynchronous, with success/error callbacks provided via a listener.

The app can be from the media kit (VFS - Virtual File System) or a non-media-kit package. Media-kit apps use a Media URI, while others use the app's package name.

If the launch succeeds, the seatback monitor will display and run the app. The PED can receive status updates via the SeatAppStatusUpdateListener (detailed in Section 3).

Method Signature

public SeatMediaRemoteController.Status launchApp(
    @NonNull String identifier,
    @NonNull Boolean isVFS,
    Map<String, Object> extras,
    SeatRemoteControlV1.SeatRemoteControlListener listener
)

Parameters:

Parameter Type Required Description
identifier String Yes The identifier for the app/game. Use a Media URI for media-kit (VFS) apps/games, or the app's package name for non-media-kit apps (e.g., "com.example.mapapp" or "media:gameuri"). Must not be null or empty.
isVFS Boolean Yes Set to true if the app/game is part of the media kit (VFS); false otherwise. This determines how the seatback system locates and loads the app.
extras Map No Optional map for app-specific parameters. Keys are strings, values can be primitives (e.g., Double for coordinates, Integer for levels). Used for extensibility, such as passing initial state to the app.Example:Map extras = new HashMap<>(); extras.put("longitude", 77.5946); extras.put("latitude", 12.9716); extras.put("zoomLevel", 15.5);
listener SeatRemoteControlV1.SeatRemoteControlListener Yes Callback interface for handling command send results.Methods to implement:- void onSeatRemoteControlCommandSendSuccess(): Called on successful command transmission (does not guarantee app launch; use status listener for that). - void onSeatRemoteControlCommandSendError(SeatRemoteControlV1.Error error): Called on failure, with error enum (e.g., NETWORK_ERROR, INVALID_PARAMS).

Returns

  • SeatMediaRemoteController.Status: Immediate status of the operation (e.g., SUCCESS for command queued, FAILURE for invalid input). Further updates come via the listener or status updates.

Example Usage

SeatAppControlV1 seatAppControl = new SeatAppControlV1();
seatAppControl.setSeatPairingSession(mSeatPairingV1); // Assume mSeatPairingV1 is initialized

SeatMediaRemoteController.Status status = seatAppControl.launchApp(
    "media:abcgameuri",
    true, // isVFS
    null,
    new SeatRemoteControlV1.SeatRemoteControlListener() {
        @Override
        public void onSeatRemoteControlCommandSendSuccess() {
            Log.d(TAG, "Launch command sent successfully");
        }

        @Override
        public void onSeatRemoteControlCommandSendError(SeatRemoteControlV1.Error error) {
            Log.e(TAG, "Launch failed: " + error.name());
        }
    }
);

2. Quit App API#

Description

Closes a currently running app on the paired seatback monitor from the PED. This is useful for remotely managing seatback resources or switching apps. Like the launch API, it is asynchronous with callbacks.

Only apps launched via the PED or identifiable by the system can be quit. Status updates (e.g., successful quit) are sent via the SeatAppStatusUpdateListener.

Method Signature

public SeatMediaRemoteController.Status quitApp(
    @NonNull String identifier,
    @NonNull Boolean isVFS,
    SeatRemoteControlV1.SeatRemoteControlListener listener
)

Parameters:

Parameter Type Required Description
identifier String Yes The identifier of the app/game to quit (same as launch: Media URI or package name). Must match the running app.
isVFS Boolean Yes Set to true if the app is from the media kit; false otherwise.
listener SeatRemoteControlV1.SeatRemoteControlListener Yes Callback for command send results (same as launch: onSeatRemoteControlCommandSendSuccess() and onSeatRemoteControlCommandSendError()).

Returns

  • SeatMediaRemoteController.Status: Immediate status (e.g., SUCCESS if command queued).

Example Usage

SeatMediaRemoteController.Status status = seatAppControl.quitApp(
    "com.example.mapapp",
    false, // isVFS
    new SeatRemoteControlV1.SeatRemoteControlListener() {
        @Override
        public void onSeatRemoteControlCommandSendSuccess() {
            Log.d(TAG, "Quit command sent successfully");
        }

        @Override
        public void onSeatRemoteControlCommandSendError(SeatRemoteControlV1.Error error) {
            Log.e(TAG, "Quit failed: " + error.name());
        }
    }
);

3. App Status Update Listener#

Description

This interface allows the PED to receive real-time notifications about app status changes on the seatback monitor (e.g., launched, quit, error). Updates are triggered by events like successful launches, user-initiated quits on the seatback, or failures.

The listener parses JSON payloads from the seat remote controller (e.g., {"identifier": "media://games/pacman", "isVFS": true, "content_type": "game", "status": "launched"}). If parsing fails or status is unknown, it defaults to ERROR.

Set the listener once during initialization for ongoing updates.

Interface Definition

public interface SeatAppStatusUpdateListener {
    void onAppStatusUpdate(String identifier, boolean isVFS, String contentType, AppStatus status);
}

Enum: AppStatus

Enum Value Description
LAUNCHED App has successfully started on the seatback.
QUIT App has been closed (by PED, user, or system).
ERROR An error occurred (e.g., launch failed, app crashed). Default for unknown statuses.

Methods

  • setAppStatusUpdateListener(SeatAppStatusUpdateListener listener): Registers the listener to receive updates.

Payload Details

Updates are derived from JSON:

  • identifier: String (Media URI,/app's package name)

  • isVFS: Boolean.

  • content_type: String (e.g., "app", "game", "map").

  • status: String (mapped to AppStatus enum, case-insensitive).

Example Usage

seatAppControl.setAppStatusUpdateListener((identifier, isVFS, contentType, status) -> {
    if (status == SeatAppControlV1.AppStatus.LAUNCHED) {
        // Update UI: Show success message
    } else if (status == SeatAppControlV1.AppStatus.ERROR) {
        // Handle error: Show alert dialog
    }
});

Version 1.0