Android Touchless#
Control Seatback Monitor from Personal Device (Touchless)#
Touchless technology lets passengers use apps like media, catalogs, and eReaders on the seatback monitor without touching it. During a flight, the seatback monitor can respond to actions made on a paired personal electronic device (PED). For instance, passengers can browse movie selections, pick a movie, and start it by touching their own device's screen. They can also use their device to look through a shopping catalog or read an eBook. The system takes these touch gestures and translates them into commands for the seatback monitor, making it easy and convenient for passengers.
Currently, the following gestures are supported:
| Description | D-pad | Touchpad |
|---|---|---|
| Select item | Key press key with select key | Single tap |
| Move focus up, down, left or right | Key press with directional key: ·Up ·Down ·Left ·Right |
Swipe ·Up ·Down ·Left ·Right |
| Scroll multiple times | Repeated key press with directional key | Multiple swipes |
| Continuous scroll | Press and hold | Swipe/fling and hold |
When a user interacts with their Android device's screen using one or more fingers, it triggers touch events handled by the onTouchEvent(MotionEvent event) callback in the respective View or ViewGroup. Each gesture begins with an ACTION_DOWN event and is followed by a sequence of events like ACTION_MOVE, ACTION_POINTER_DOWN, or ACTION_POINTER_UP, indicating position, pressure, size, or multi-touch actions. The gesture ends with an ACTION_UP or ACTION_CANCEL event when the fingers leave the screen.
Throughout this interaction, the MotionEvent object provides detailed information about the touch events, such as the coordinates of each touch, pressure, and the number of active pointers. Your Android app can use this data to recognize and respond to specific gestures, enabling rich and dynamic touch-based interactions.
The touchpad technology in use functions similarly to a directional pad (D-pad). When a swipe gesture to the left is performed, the system interprets it as a directional input, navigating to the next button or element in that direction, just like how a D-pad moves focus in a menu or interface. This provides an intuitive way to interact with the interface using gestures to simulate button presses.
1. Method : public SeatMediaRemoteController.Status sendHandsetKey(@NonNull SeatRemoteControlV1.HandsetKey scancode, int flingCount, SeatRemoteControlV1.SeatRemoteControlListener listener)
// Send a handset key command
remoteControl.sendHandsetKey(
SeatRemoteControlV1.HandsetKey.LEFT, // Example: Handset key direction (LEFT)
1, // Example: Number of flings or key presses
new SeatRemoteControlV1.SeatRemoteControlListener() {
@Override
public void onSeatRemoteControlCommandSendSuccess() {
// Handle success case: The handset key command was sent successfully
}
@Override
public void onSeatRemoteControlCommandSendError(SeatRemoteControlV1.Error error) {
// Handle error case: The handset key command failed to send
}
}
);
Description: Sends a handset key command to a remotely paired seatback monitor. The app developer must specify both the scancode and the fling count. If the scancode is SeatRemoteControlV1.HandsetKey.UP, SeatRemoteControlV1.HandsetKey.DOWN, SeatRemoteControlV1.HandsetKey.LEFT, or SeatRemoteControlV1.HandsetKey.RIGHT, sending a flingCount of 1 will move the current selection by one position. A higher fling count will move the selection more than one position.
Parameters:
-
scancode:
SeatRemoteControlV1.HandsetKey- The handset key scancode. Examples includeSeatRemoteControlV1.HandsetKey.UPandSeatRemoteControlV1.HandsetKey.DOWN. -
flingCount:
int- The count depending on the fling gesture velocity or scroll distance on the PED device. The minimum value is 1, and the maximum value is 20. -
listener:
SeatRemoteControlV1.SeatRemoteControlListener- Listener to handle events related to the handset key command.
Return Value:
-
Type:
SeatMediaRemoteController.Status -
Contents: The status of the handset key send operation.
2. Method : public SeatMediaRemoteController.Status sendHandsetKey(@NonNull SeatRemoteControlV1.HandsetKey scancode, SeatRemoteControlV1.SeatRemoteControlListener listener)
// Define a method to send a handset key command and handle the response
private void sendHandsetKeyCommand(SeatRemoteControlV1.HandsetKey key) {
remoteControl.sendHandsetKey(
key, // Handset key direction (e.g., UP, DOWN, LEFT, RIGHT, ENTER)
new SeatRemoteControlV1.SeatRemoteControlListener() {
@Override
public void onSeatRemoteControlCommandSendSuccess() {
// Handle success case: The key command was sent successfully
}
@Override
public void onSeatRemoteControlCommandSendError(SeatRemoteControlV1.Error error) {
// Handle error case: The key command failed to send
}
}
);
}
// Send handset key commands for UP, DOWN, LEFT, RIGHT, and ENTER
sendHandsetKeyCommand(SeatRemoteControlV1.HandsetKey.UP); // Example: Sending UP key command
sendHandsetKeyCommand(SeatRemoteControlV1.HandsetKey.DOWN); // Example: Sending DOWN key command
sendHandsetKeyCommand(SeatRemoteControlV1.HandsetKey.LEFT); // Example: Sending LEFT key command
sendHandsetKeyCommand(SeatRemoteControlV1.HandsetKey.RIGHT); // Example: Sending RIGHT key command
sendHandsetKeyCommand(SeatRemoteControlV1.HandsetKey.ENTER); // Example: Sending ENTER key command
Description: The sendHandsetKey method allows an application to send a specific handset key command to a remotely paired seatback monitor. This command can be used to control the monitor's interface through a personal electronic device (PED). The method is functionally equivalent to calling sendHandsetKey(SeatRemoteControlV1.HandsetKey, int, SeatRemoteControlV1.SeatRemoteControlListener) with a flingCount of 1, meaning that a single action is performed based on the provided key scancode.
Parameters:
-
scancode:
SeatRemoteControlV1.HandsetKey- An enum value representing the specific handset key scancode to be sent. This code determines the action to be performed on the seatback monitor. Examples includeSeatRemoteControlV1.HandsetKey.UP(to move up),SeatRemoteControlV1.HandsetKey.DOWN(to move down),SeatRemoteControlV1.HandsetKey.LEFT, andSeatRemoteControlV1.HandsetKey.RIGHT. -
listener:
SeatRemoteControlV1.SeatRemoteControlListener- A listener that handles events related to the handset key command. It provides feedback on the success or failure of sending the key command to the seatback monitor.
Return Value:
-
Type:
SeatMediaRemoteController.Status -
Contents: The status of the operation indicating whether the handset key command was successfully sent to the seatback monitor or if an error occurred.
3. Volume Control
The InFlight SDK provides APIs to control the seatback monitor's volume level and listen for volume changes from the paired PED.
3.1 Method: public void setSeatVolume(int volume, SeatRemoteControlV1.OnSeatVolumeSetListener listener)
// Directly set the seat volume to a specified level
int volumeLevel = 50; // Example volume level
// Call the setSeatVolume method, optionally passing a listener for success/error callbacks
remoteControl.setSeatVolume(volumeLevel, new SeatRemoteControlV1.OnSeatVolumeSetListener() {
@Override
public void onSeatVolumeSet() {
// Handle success case: The seat accepted the volume change
}
@Override
public void onError(SeatRemoteControlV1.Error error) {
// Handle error case: e.g., not paired, timeout, send failure
}
});
Description: Sets the volume level of the remote seat monitor. The volume parameter determines the output volume. This method directly adjusts the monitor's audio level to the specified value.
The listener receives onSeatVolumeSet() once the seat accepts the change, or onError(Error) if the request fails (e.g., the PED is not paired, the seat times out, or the underlying transport returns a non-success code). Pass null if you do not need callbacks — the method still dispatches the request but you will not be notified of success or failure.
Parameters:
-
volume:
int- The volume level to be set. The value ranges from 0 (muted) to the maximum volume value reported by the seat. Common maximum values are 100, but the actual maximum depends on the seat's configuration. -
listener:
SeatRemoteControlV1.OnSeatVolumeSetListener- Listener to receive success (onSeatVolumeSet) and error (onError) callbacks for this set operation. Passnullto skip callbacks. The listener is invoked on the UI thread.
Return Value:
-
Type:
void -
Contents: This method does not return a value. It performs the action of setting the seat volume based on the provided parameter.
3.2 Method: public void setSeatVolumeChangeListener(SeatRemoteControlV1.SeatVolumeChangeListener listener)
Registers a callback that fires whenever the seatback monitor reports a new volume level. The listener receives a JSONObject with current_volume and max_volume fields. The listener is invoked on the UI thread, so UI updates are safe without runOnUiThread().
remoteControl.setSeatVolumeChangeListener(new SeatRemoteControlV1.SeatVolumeChangeListener() {
@Override
public void onSeatVolumeChanged(JSONObject volume) {
// Parse the volume values from JSONObject
int cur = Integer.parseInt(volume.optString("current_volume", "0"));
int max = Integer.parseInt(volume.optString("max_volume", "100"));
volumeSlider.setMax(max);
volumeSlider.setProgress(cur);
}
@Override
public void onSeatVolumeError(SeatRemoteControlV1.Error error) {
// Handle error (e.g., not paired, timeout)
String message = SeatRemoteControlV1.Error.getErrorMessage(error);
}
});
Description: Sets a callback to be invoked when the seatback monitor reports a volume change. The listener receives a JSONObject with current_volume and max_volume string fields. The maximum volume value depends on the seat's configuration and is reported by the seat.
Parameters:
- listener:
SeatRemoteControlV1.SeatVolumeChangeListener- The callback listener that will receive volume updates or error notifications. Passnullto clear the listener.
Return Value:
-
Type:
void -
Contents: This method does not return a value. It registers the provided listener to receive volume change notifications.
3.3 Method: public void getSeatVolume(SeatRemoteControlV1.SeatVolumeChangeListener listener)
Fetches the current volume from the seatback monitor asynchronously. The result is delivered via the provided listener with a JSONObject containing the volume data.
remoteControl.getSeatVolume(new SeatRemoteControlV1.SeatVolumeChangeListener() {
@Override
public void onSeatVolumeChanged(JSONObject volume) {
int cur = Integer.parseInt(volume.optString("current_volume", "0"));
int max = Integer.parseInt(volume.optString("max_volume", "100"));
volumeSlider.setMax(max);
volumeSlider.setProgress(cur);
}
});
Description: Requests the current volume level from the paired seatback monitor. This method triggers a request to retrieve the current and maximum volume settings. The results are delivered to the provided listener once the seatback monitor responds.
Parameters:
- listener:
SeatRemoteControlV1.SeatVolumeChangeListener- The listener that will receive the volume data or error notifications.
Return Value:
-
Type:
void -
Contents: This method does not return a value. The volume data is delivered asynchronously via the listener callback.
4. Brightness Control
The InFlight SDK provides APIs to control the seatback monitor's brightness level and listen for brightness changes from the paired PED.
4.1 Method: public void setSeatBrightness(int brightness, SeatRemoteControlV1.OnSeatBrightnessSetListener listener)
// Directly set the seat brightness to a specified level
int brightnessLevel = 50; // Example brightness level
// Call the setSeatBrightness method, optionally passing a listener for success/error callbacks
remoteControl.setSeatBrightness(brightnessLevel, new SeatRemoteControlV1.OnSeatBrightnessSetListener() {
@Override
public void onSeatBrightnessSet() {
// Handle success case: The seat accepted the brightness change
}
@Override
public void onError(SeatRemoteControlV1.Error error) {
// Handle error case: e.g., not paired, timeout, send failure
}
});
Description: Sets the brightness level of the remote seat monitor's screen. The brightness parameter determines how bright the screen will be. This method directly adjusts the screen's luminosity to the specified level.
The listener receives onSeatBrightnessSet() once the seat accepts the change, or onError(Error) if the request fails (e.g., the PED is not paired, the seat times out, or the underlying transport returns a non-success code). Pass null if you do not need callbacks — the method still dispatches the request but you will not be notified of success or failure.
Parameters:
-
brightness:
int- The brightness level to be set on the screen. The value ranges from 0 (lowest brightness) to the maximum value reported by the seat. Common maximum values are 100, but the actual maximum depends on the seat's configuration. -
listener:
SeatRemoteControlV1.OnSeatBrightnessSetListener- Listener to receive success (onSeatBrightnessSet) and error (onError) callbacks for this set operation. Passnullto skip callbacks. The listener is invoked on the UI thread.
Return Value:
-
Type:
void -
Contents: This method does not return a value. It performs the action of setting the screen brightness based on the provided parameter.
4.2 Method: public void setSeatBrightnessChangeListener(SeatRemoteControlV1.SeatBrightnessChangeListener listener)
Registers a callback that fires whenever the seatback monitor reports a new brightness level. The listener receives a JSONObject with current_brightness and max_brightness fields. The listener is invoked on the UI thread, so UI updates are safe without runOnUiThread().
remoteControl.setSeatBrightnessChangeListener(new SeatRemoteControlV1.SeatBrightnessChangeListener() {
@Override
public void onSeatBrightnessChanged(JSONObject brightness) {
// Parse the brightness values from JSONObject
int cur = Integer.parseInt(brightness.optString("current_brightness", "0"));
int max = Integer.parseInt(brightness.optString("max_brightness", "100"));
brightnessSlider.setMax(max);
brightnessSlider.setProgress(cur);
}
@Override
public void onSeatBrightnessError(SeatRemoteControlV1.Error error) {
// Handle error (e.g., not paired, timeout)
String message = SeatRemoteControlV1.Error.getErrorMessage(error);
}
});
Description: Sets a callback to be invoked when the seatback monitor reports a brightness change. The listener receives a JSONObject with current_brightness and max_brightness string fields. The maximum brightness value depends on the seat's configuration and is reported by the seat.
Parameters:
- listener:
SeatRemoteControlV1.SeatBrightnessChangeListener- The callback listener that will receive brightness updates or error notifications. Passnullto clear the listener.
Return Value:
-
Type:
void -
Contents: This method does not return a value. It registers the provided listener to receive brightness change notifications.
4.3 Method: public void getSeatBrightness(SeatRemoteControlV1.SeatBrightnessChangeListener listener)
Fetches the current brightness from the seatback monitor asynchronously. The result is delivered via the provided listener with a JSONObject containing the brightness data.
remoteControl.getSeatBrightness(new SeatRemoteControlV1.SeatBrightnessChangeListener() {
@Override
public void onSeatBrightnessChanged(JSONObject brightness) {
int cur = Integer.parseInt(brightness.optString("current_brightness", "0"));
int max = Integer.parseInt(brightness.optString("max_brightness", "100"));
brightnessSlider.setMax(max);
brightnessSlider.setProgress(cur);
}
});
Description: Requests the current brightness level from the paired seatback monitor. This method triggers a request to retrieve the current and maximum brightness settings. The results are delivered to the provided listener once the seatback monitor responds.
Parameters:
- listener:
SeatRemoteControlV1.SeatBrightnessChangeListener- The listener that will receive the brightness data or error notifications.
Return Value:
-
Type:
void -
Contents: This method does not return a value. The brightness data is delivered asynchronously via the listener callback.
5. Key Event Error Listener
- Method Signature:
void setKeyEventErrorListener(SeatRemoteControlV1.SeatKeyEventErrorListener listener)
Description: Sets a callback listener that will be invoked when an error occurs during the processing of handset key commands. This method allows the application to handle errors related to key events and respond accordingly.
Parameters:
- listener:
SeatRemoteControlV1.SeatKeyEventErrorListener- The callback listener that will handle errors during handset key processing. The listener should implement the necessary methods to process and respond to error events.
Return Value:
-
Type:
void -
Contents: This method does not return a value. It registers the provided listener to receive error notifications related to handset key processing.
// Set the key event error listener
remoteControl.setKeyEventErrorListener(new SeatRemoteControlV1.SeatKeyEventErrorListener() {
@Override
public void onKeyEventError(SeatRemoteControlV1.KeyEventError error) {
// Handle key event errors here
// Example: Log the error and show an error message to the user
}
});
Remote keyboard#
The Remote Keyword feature provides passengers with the ability to input text on the seatback monitor using their paired personal electronic device (PED). Through this API, passengers can remotely type English characters, which are displayed directly in the active input field on the seatback monitor. This functionality is integrated as part of the Seat-Pairing module, enabling seamless interaction between the companion application and the seatback system.
As a prerequisite, the passenger’s personal electronic device (PED) must be successfully paired with the seatback monitor. The steps for initializing the Seat-Pairing module and the detailed procedure for establishing the pairing between the device and the seatback monitor are already documented in the Seat-Pairing use case guide.
How to send the character key to seatback monitor?#
To use the remote keyboard feature, you can implement it through the SeatRemoteControlV1 object. This object is initialized using a SeatPairing instance.
SeatRemoteControlV1 mSeatRemoteControlV1 = new SeatRemoteControlV1(getApplicationContext());
SeatPairingV1.initService(this, new IInFlightCallback() {
@Override
public void onInitServiceComplete(Object o, String s) {
SeatPairingV1 mSeatPairingV1 = (SeatPairingV1) o;
if (mSeatPairingV1 != null) {
mSeatRemoteControlV1.setSeatPairingSessionObject(mSeatPairingV1);
}
}
@Override
public void onInitServiceFailed(String s, InFlight.Error error) {
}
}, new InFlight());
The above code illustrates how to obtain an instance of SeatRemoteControlV1, demonstrating the steps involved in accessing and initializing the remote keyboard functionality. After SeatRemoteControlV1 has been initialized, the same class offers a method that allows you to send characters to the seatback display.
To send characters to the seatback, you need to use the sendCharacterKey method, which accepts two parameters. This method is designed to send one character at a time. Each time it is called with a valid character, the input is delivered to the currently focused text field on the seatback monitor.
public Status sendCharacterKey (CharacterKey characterCode, SeatRemoteControlListener listener)
Parameter:
-
CharacterKey - CharacterKey is an enum that defines all the characters supported by the Remote Keyboard service. Only the characters included in this enum can be typed on the seatback monitor.
-
SeatRemoteControlListener - The listener is used to track the status of characters sent to the seatback monitor. If a character is delivered successfully, the onSeatRemoteControlCommandSendSuccess callback is triggered. If the character fails to send, the onSeatRemoteControlCommandSendError callback is invoked instead
Example
mSeatRemoteControlV1.sendCharacterKey(typedCode, new SeatRemoteControlV1.SeatRemoteControlListener() {
@Override
public void onSeatRemoteControlCommandSendSuccess() {
Log.v(tag, "Key send successfully");
}
@Override
public void onSeatRemoteControlCommandSendError(SeatRemoteControlV1.Error error) {
Log.v(tag, "Error " + error.toString());
}
});
How to get value from the enum ?#
The valueOf method in an enum is used to retrieve an enum constant by matching its exact name as a string.
// typedKey represents the input entered by the user through the keyboard displayed in the app.
SeatRemoteControlV1.CharacterKey typedCode;
String[] numArray = {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9"};
List<String> numList = new ArrayList<>(Arrays.asList(numArray));
if (typedKey.equalsIgnoreCase("caps")) {
typedCode = SeatRemoteControlV1.CharacterKey.CAPS_LOCK;
} else if (typedKey.equalsIgnoreCase("enter")) {
typedCode = SeatRemoteControlV1.CharacterKey.ENTER;
} else if (typedKey.equalsIgnoreCase("space")) {
typedCode = SeatRemoteControlV1.CharacterKey.SPACE_BAR;
} else if (typedKey.equalsIgnoreCase("⌫")) {
typedCode = SeatRemoteControlV1.CharacterKey.BACKSPACE;
} else if (numList.contains(typedKey)) {
typedCode = SeatRemoteControlV1.CharacterKey.valueOf("N" + typedKey);
} else {
typedCode = SeatRemoteControlV1.CharacterKey.valueOf(typedKey.toUpperCase());
}
The code above is part of the Android seat-pairing test application and demonstrates how to retrieve enum constants based on characters typed on the virtual keyboard. Constant name in the CharacterKey enum are defined in uppercase; therefore, the input is converted to uppercase in the code to ensure a proper match.
Java enums do not allow constant names to begin with a number. To handle numeric keys (0–9), the code prepends the letter N to the digit (e.g., N0, N1, etc.) to form valid enum constant names. All other characters can be mapped directly to enum constants without modification.
Additionally, the enum does not maintain a separate set of uppercase characters. To type uppercase letters, the CAPS_LOCK key must be used. It functions as a toggle: once CAPS_LOCK is activated, all subsequent characters are typed in uppercase. To revert to lowercase input, the CAPS_LOCK key must be sent again.
Important Note#
-
Characters are typed only to the currently focused text field on the seatback monitor. If no text field is focused, the characters will not be entered.
-
This feature is supported only on seatback monitors running Android 8 or higher and is not available on Android 5 monitors.
-
The remote keyboard feature supports only English characters

