Seat Accessibility Android#
The Seat Accessibility API is part of the Seat-Pairing module in the Companion App SDK. Establishing a pairing between the Companion App and the seatback monitor is required to enable accessibility features. This API allows passengers to configure accessibility settings directly from the Companion App. The seatback monitor dynamically adapts its user interface based on the applied settings to provide an accessible and enhanced viewing experience.
1. Initialisation of Seat Accessibility#
To use the SeatAccessibility feature, the SeatPairing module must first be initialized. This module provides the SeatAccessibilityV1 instance, which acts as the main interface for all seat accessibility operations.
// Declare property
private SeatAccessibilityV1 mSeatAccessibilityV1;
SeatPairingV1.initService(this, new IInFlightCallback() {
@Override public void onInitServiceComplete (Object o, String s) {
Log.v(tag, "onInitServiceComplete() " + s);
// Seat Pairing module initialization completed successfully
mSeatPairingV1 = (SeatPairingV1) o;
// Getting SeatAccessibilityV1 object from the SeatPairingV1 object
// The SeatAccessibilityV1 contains the method that is required to set the accessibility setting
mSeatAccessibilityV1 = mSeatPairingV1.getSeatAccessibility();
}
@Override public void onInitServiceFailed (String s, InFlight.Error error) {
Log.e(tag, "onInitServiceFailed() " + InFlight.Error.getErrorMessage(error));
}
}, new InFlight());
In the example above, the SeatPairing module is initialized. Upon successful initialization, it returns a SeatPairingV1 object. This object, in turn, provides access to the SeatAccessibilityV1 object, which is used to perform further seat accessibility operations.
2. How to retrieve the Pre-Set Accessibility Settings?#
If accessibility settings were already configured on a seat prior to pairing with a Personal Electronic Device (PED), those settings can still be retrieved after the pairing process is successfully completed. To access the pre-applied settings, the getPairingStatusInfo() method from the SeatPairingV1 class should be used. This method provides the current seat pairing status along with any existing accessibility configurations that were previously applied to the seat.
The getPairingStatusInfo() method is invoked under multiple circumstances, such as when there is a change in the seat pairing state or when the pairing process has successfully finished. It can be triggered through both the pairing status change listener and the pairing completion listener. This ensures that the most up-to-date pairing details - including accessibility settings already applied on the seat — are consistently available whenever the PED’s pairing state is updated.
mSeatPairingV1.setSeatPairingStatusChangedListener(() -> {
if (mSeatPairingV1.getPairingStatusInfo().getmPairStatus() == SeatPairingV1.PairStatus.PAIRED) {
SeatPairingV1.PairingStatusInfo pairStatus = mSeatPairingV1.getPairingStatusInfo();
// Here applied accessibility settings are obtained using SeatAccessibility object
SeatAccessibility seatAccessibility = pairStatus.getSeatAccessibility();
} else {
// PED is not paired with Seat
}
});
3. Set Seat accessibility settings#
This method applies accessibility settings to a seat using a paired Personal Electronic Device (PED). To successfully update the seat’s accessibility configuration, the PED must be paired with the target seat beforehand. The setSeatAccessibilitySetting method accepts two parameters: a SeatAccessibility object containing the desired settings, and an OnSetSeatAccessibilityListener callback to receive the operation result. If the settings are applied successfully, the onSeatAccessibilitySet() callback is triggered. In case of a failure, the onSeatAccessibilityError() callback is invoked, providing details for error handling.
public void setSeatAccessibilitySetting(SeatAccessibility seatAccessibility, OnSetSeatAccessibilityListener listener)
e.g.
private void callApiToApplySetting() {
SeatAccessibility seatAccessibility = getSelectedAccessibilitySettings();
seatAccessibilityV1.setSeatAccessibilitySetting(seatAccessibility, new SeatAccessibilityV1.OnSetSeatAccessibilityListener() {
@Override
public void onSeatAccessibilitySet() {
Log.i(tag, "Setting send successfully");
}
@Override
public void onSeatAccessibilityError(SeatAccessibilityV1.Error error) {
Log.e(tag, "Error in setting accessibility setting " + error.toString());
}
});
}
Version 1.0