Connecting Gate Android#
The Connecting Gate service gives important details about the current flight, such as gate and baggage information, along with connecting flight details like terminal and gate numbers. This is especially useful for passengers with connecting flights, as it helps the app show relevant information in advance—making it easier for travelers to find their next gate and move through the airport with less confusion.
1: Initialize Connecting Gate#
The ConnectingGateV1 class is responsible for managing connecting gate-related functionality, offering the APIs and properties required to access and interpret it. Once initialized successfully, the connectingGate object is ready to use. It allows your app to retrieve information such as arrival gate details, baggage claim locations, and connecting gate assignments based on the current flight. This data can be dynamically presented to users or used to trigger in-app logic, such as reminders or alerts.
private ConnectingGateV1 connectingGate;
ConnectingGateV1.initService(this, new IInFlightCallback() {
@Override
public void onInitServiceComplete(Object o, String s) {
// The method get invoked when service get initiated successfully
connectingGate = (ConnectingGateV1) o;
}
@Override
public void onInitServiceFailed(String s, InFlight.Error error) {
// The method get invoked when any error occured during initilization process
}
},new InFlight());
Parameters
-
context: The application context for service initialization.
-
callback: A callback interface (IInFlightCallback) that handles initialization results, the interface contains two methods.
-
inFlight: An instance of the InFlight system for service connectivity.
2: Request Connecting Gate Info#
Once the Connecting Gate service has been properly initialized, developers should proceed to retrieve the necessary connecting gate information by invoking the method provided below. This step is essential to access details such as gate numbers, terminal information, and transfer times relevant to the passenger’s next flight.
public void requestConnectingGateInfo(String language,
ConnectingGateV1.SortOrder sortOrder,
String sortField,
ConnectingGateV1.ConnectingGateInfoListener connectingGateInfoListener)
Parameters:
-
language (Optional) - Specifies the language in which the connecting gate information should be returned. Accepts a three-letter ISO 639-2 language code (e.g.,
'eng'for English,'fra'for French), if not provided, the default language used is eng (English). For Latin-based languages and conversions between ISO 639-1 and ISO 639-2 formats, refer to the Language Code Mapping Guide. -
sortOrder (Optional) - Defines the order in which the connecting flight results should be sorted. Uses the ConnectingGateV1.SortOrder enumeration, common values might include ASCENDING or DESCENDING.
-
sortField (Conditionally Required) - Specifies the field used to sort the connecting flight results. This parameter is required only if sortOrder is provided. Otherwise, it is optional. Accepted values correspond to predefined constants in the ConnectingFlight class, such as:
- ConnectingFlight.CARRIER_CODE
- ConnectingFlight.ARRIVAL_AIRPORT
- ConnectingFlight.DEPARTURE_AIRPORT
- ConnectingFlight.DEPARTURE_STATUS
-
connectingGateInfoListener - The ConnectingGateV1.ConnectingGateInfoListener is a callback interface that is invoked after the connecting gate information retrieval process completes. This interface defines two key methods:
-
onConnectingGateInfoAvailable This method is called when the information is successfully retrieved. It provides the details of the current flight (CurrentFlight) along with a list of available connecting flights (ConnectingFlight).
- The CurrentFlight class includes fields such as flightNumber, carrierCode, arrivalGate, baggageClaim, arrivalTerminal, scheduledArrivalTime, estimatedArrivalTime, scheduledArrivalTimeText, estimatedArrivalTimeText, arrivalStatus
- The ConnectingFlight class includes fields such as carrierCode, operator, flightNumber, arrivalAirport, departureAirport, departureTerminal, scheduledDepartureTime, estimatedDepartureTime, scheduledDepartureTimeText, estimatedDepartureTimeText, departureStatus
-
onConnectingGateError This method is triggered if an error occurs during the retrieval process. It receives a value from the ConnectingGateV1.Error enum, which describes the nature of the failure and helps in identifying the cause of the error.
-
Example
mConnectingGateV1.requestConnectingGateInfo("eng", ConnectingGateV1.SortOrder.ASC,ConnectingFlight.ARRIVAL_AIRPORT,
new ConnectingGateV1.ConnectingGateInfoListener() {
@Override
public void onConnectingGateInfoAvailable(CurrentFlight currentFlight, List<ConnectingFlight> connectingFlights) {
// The method get invoked if response is obtained successfully, and it will provide the current flight details,
// and list of connecting flights
}
@Override
public void onConnectingGateError(ConnectingGateV1.Error error) {
// This method is triggered when an error occurs while attempting to retrieve connecting gate information.
}
});
3: Connecting gate info change listener#
This notification is triggered whenever the system updates the connecting flight information. Applications should listen for this notification to remain in sync with the latest gate assignments, terminal changes, or connecting flight details. Upon receiving it, the app should initiate a new request using the relevant API to retrieve the updated information.
public void setConnectingGateInfoChangedListener(ConnectingGateV1.ConnectingGateInfoChangedListener connectingGateInfoChangedListener)
Using the above method need to register the ConnectingGateInfoChangedListener, the listener provides the onConnectingGateInfoChanged the method. The method provides two event i.e update or clear.
a. Use case for the update#
This notification is triggered whenever the system updates the connecting flight information. It does not carry any additional data.
Your app should listen for this notification to remain informed about changes such as gate assignments, terminal updates, or connecting flight details. Upon receiving it, the app should initiate a new request using the relevant API to retrieve the latest information.
b. Use case for clear#
This notification is triggered when the system clears the previously retrieved connecting gate data. Similar to the update notification, it does not include any payload. This may occur if the data becomes outdated or is no longer available due to system updates or connectivity issues. In response, the app should discard any cached connecting flight information and, if necessary, request fresh data to prevent showing outdated content.
Version 1.0