Class Pairing


  • public final class Pairing
    extends java.lang.Object

    Package Starting Point - The Pairing class starts a pairing session between the interactive seatback monitor and the passenger's personal electronic device (PED). Pairing is a single point of contact for pairing related services.

    The status of the pair or unpair operations are passed back in Pairing.SeatPairingStatusChangedListener callback registered for the various operation types. In case of error, Pairing.Error is passed back.

    • Method Detail

      • initService

        public static void initService​(Context context,
                                       IInFlightCallback inFlightCallback,
                                       InFlight inFlight)
        This API is the starting point for Pairing services -- Initializes the service object and returns the object with the IInFlightCallback.
        Parameters:
        context - Provides access to resources and classes to initialize the object.
        inFlightCallback - IInFlightCallback Returns the instance or error message.
        inFlight - Initializes an InFlight instance.
      • setReturnMediaUris

        public void setReturnMediaUris​(boolean returnMediaUris)
        Specifies whether the response should include media URIs instead of just media IDs. Note: This feature requires seat-service version 3.34.xx.x or higher.
        Parameters:
        returnMediaUris - true to include media URIs in the response; false to include only media IDs (mids).
      • getPairStatus

        public Pairing.PairStatus getPairStatus()
        Gets the status of the pairing.

        Values are paired, not paired and status unknown.

        Returns:
        Pairing.PairStatus Status of the pairing, such as paired, not paired or status unknown.
      • setPairingMethod

        public void setPairingMethod​(JSONObject pairingMethods)
        Sets the pairing method configuration.
        Parameters:
        pairingMethods - A JSONObject containing the pairing methods configuration. The pairing methods can include "show_qr_code" and "show_passcode". Set these values to 'true' to enable or 'false' to disable each method.
                       For example:
                       In case of both QR code & Passcode options together, make both the parameters as True.
        
                       JSONObject pairingMethods = new JSONObject();
                       pairingMethods.put("show_qr_code", true);
                       pairingMethods.put("show_passcode", true);
                     
      • initiatePairing

        public void initiatePairing()
        Initiates pairing from the seatback monitor to the personal electronic device.
      • unpair

        public void unpair()
        Stops the pairing between the seatback monitor and personal electronic device.
      • getMediaPlayerControl

        public MediaPlayerControl getMediaPlayerControl()
        Gets an instance of the MediaPlayer controller that allows the seatback monitor to listen to media player messages.
        Returns:
        MediaPlayerControl
      • getMediaQueue

        public MediaQueue getMediaQueue()
        Gets the media queue from the seatback monitor.
      • getAppControl

        public AppControl getAppControl()
        Provides access to the AppControl instance, which manages app control events from the PED, such as launching or quitting the app on the seatback monitor. This object is also used to notify the PED about app launch and quit actions on the seatback monitor. Use this AppControl instance to perform various app control operations.
        Returns:
        the AppControl instance
      • confirmPairing

        public void confirmPairing()
        Confirm pairing. This is used for embedded GUI.
      • rejectPairing

        public void rejectPairing()
        Reject pairing.This is used for embedded GUI.
      • cancelPasscode

        public void cancelPasscode()
        Cancel passcode. This is used for embedded GUI.
      • reset

        public void reset()
        Reset. This is used for embedded GUI.