Android Property Transfer#
The Inflight Seatback SDK and its companion app SDK work together to enable communication between the aircraft’s seatback entertainment system and a passenger’s personal electronic device (PED). This connection allows data exchange, such as user profiles, personal preferences (like language or content choices), or display messages. For example, a passenger might set their entertainment preferences in the companion app on their phone, which are then sent to the seatback system to personalize the content shown. This integration enhances the in-flight experience by making it more interactive and tailored to individual users.
To enable data transfer between the companion app and the seatback, both devices must be paired with one another. The data transfer is unidirectional, meaning information can only be sent from the personal electronic device (PED) to the seatback system, not the other way around.
The following steps must be implemented on both the passenger electronic device (PED) and the seatback system to enable data transmission from the PED to the seat.
How to transfer the data from a companion app to the seatback?#
To implement this functionality, the seat-pairing module must be initialized. For detailed information on the initialization process and the overall pairing procedure, please refer to the seat-pairing use case document. The following steps describe how to transfer the data from the companion app to the seatback.
Step 1: Get the SeatPropertyTransferV1 object
To transfer data from the companion app to the seatback system, a SeatPropertyTransferV1 object is required. This object serves as the interface through which property or data values are communicated between the two devices.
The SeatPropertyTransferV1 instance is obtained via the SeatPairing object, which manages the pairing connection between the passenger’s electronic device (PED) and the seatback monitor. The PED must be successfully paired with the seatback system before any data transfer can occur, as the pairing process establishes the necessary communication channel for exchanging information.
The seatPropertyTransferV1 object is obtained from the seatPairing object.
Step 2: Send the data from the passenger's electronic device to the seat
The sendRequestToSetSeatProperty method is responsible for transmitting data from the PED to the seat system. This method requires two parameters: a JSONObject containing the data to be sent, and a SeatPropertyTransferListener to handle callbacks related to the transfer process. It is important to note that the JSONObject must adhere to a specific predefined structure. To facilitate the construction of valid JSON data, the SDK provides two predefined classes specifically designed for this purpose:
-
ProfileV1 – This class encapsulates personal identity attributes, including first name, middle name, last name, name prefix (e.g., Mr., Ms..), name suffix (e.g., Jr., Sr.), and gender. It is intended to represent passenger profile information in a structured format.
-
PreferencesV1 – This class defines the user’s preferences related to in-seat entertainment and system behavior. It includes properties such as the preferred parental control rating, preferred language, subtitle preference, and subtitle setting preferences.
By using these classes, developers can ensure that the data being sent from the PED to the seat conforms to the required format and semantics expected by the seat.
Both the ProfileV1 and PreferencesV1 classes include a toJson() method, which is used to serialize the class data into a JSONObject. This JSONObject represents the structured data in the format required by the sendRequestToSetSeatProperty method. By invoking toJson(), developers can easily convert the class instances into a transferable JSON object that complies with the seat system’s expected data structure.
SeatPropertyTransferListener - The listener, implemented via the SeatPropertyTransferListener interface, is responsible for providing real-time feedback on the status of the data transfer from the PED to the seat. This interface defines two callback methods:
-
onSeatPropertyTransferSuccess() – This method is invoked when the data is successfully transmitted from the PED to the seat system. It confirms that the property transfer operation completed without any issues.
-
onSeatPropertyTransferError(Error e) – This method is triggered if an error occurs during the data transfer process. It provides details about the failure, typically through an exception object, enabling developers to identify the cause of the issue and implement appropriate error handling or recovery logic.
By implementing this listener, developers can monitor the success or failure of the seat property transfer and respond accordingly.
Example
// Configuring the data
ProfileV1 profileV1 = new ProfileV1();
profileV1.setFirstName("abc");
profileV1.setMiddleName("lmn");
profileV1.setLastName("xyz");
profileV1.setGender("male");
profileV1.setPrefix("Mr.");
profileV1.setSuffix("Jr.");
// JSONObject obtained using the toJson method of ProfileV1 class.
JSONObject profileJsonObject = profileV1.toJson();
// Sending the property from the PED to seat
seatPropertyTransferV1.sendRequestToSetSeatProperty(profileJsonObject, new SeatPropertyTransferV1.SeatPropertyTransferListener() {
@Override
public void onSeaPropertyTransferError(aero.panasonic.inflight.services.seatpairing.Error error) {
// The method invoked when any error occured during the data transfer
}
@Override
public void onSeatPropertyTransferSuccess() {
// The method invoked when data successfully transfer to seat
}
});
The above process explains transferring data from the PED to the Seat.
How to receive the data in the seatback?#
To implement this functionality, the pairing module must be initialized. Please refer to the pairing use case document for detailed information on the initialization process and the overall pairing procedure. The following steps describe how to receive the data from the companion app.
Step 1: Register the listener to receive the property from the PED
In order for the seat to receive data from the PED, a pairing between the two must first be established. This pairing process creates a communication link that enables the seat to listen for incoming data from the PED.
The seatback SDK provides a Pairing class, which facilitates this communication. To receive data from the PED, the seat must register a listener using the setSeatPropertyReceivedListener() method of the Pairing class. This method takes an implementation of the SeatPropertyReceivedListener interface as its parameter.
By setting this listener, the seat application can respond to incoming data sent by the PED and process it accordingly.
Step 2: Receive the data
The SeatPropertyReceivedListener interface defines a callback method named onSeatPropertyPayloadReceived(JSONObject jsonObject). This method is invoked whenever the seat receives a new property payload from the PED. The received data is encapsulated in a JSONObject, which contains the relevant properties in a predefined format.
mPairing.setSeatPropertyReceivedListener(new SeatPropertyReceivedListener() {
@Override
public void onSeatPropertyPayloadReceived(JSONObject jsonObject) {
// The data is obtained using the jsonObject object
}
});
The root-level JSONObject contains three primary keys: user_profile, user_preferences, and display_message. Each of these keys maps to a nested JSONObject, which holds a collection of specific properties relevant to its category.
-
The user_profile object includes personal identity attributes such as first_name, middle_name, last_name, prefix, suffix, and gender. These fields define the passenger’s profile information.
-
The user_preferences object stores various user-specific settings, including preferred_parental_control_rating, preferred_language, preferred_subtitle_language, and preferred_soundtrack_language. These values indicate the passenger's content and language preferences.
The data transmitted from the PED, such as the user profile and preferences, can be leveraged to enhance personalization within the seatback entertainment system. By utilizing this information, the system can tailor the user experience based on the passenger's identity and individual preferences. For example, it can automatically adjust language settings, apply preferred parental control levels, or pre-select subtitle and audio languages. Additionally, displaying personalized greetings or recommendations based on the passenger's profile contributes to a more engaging and user-friendly in-flight experience.
Version 1.0