Class ServiceDiscoveryV1


  • public class ServiceDiscoveryV1
    extends java.lang.Object

    Package Starting Point - The ServiceDiscovery API allows passengers to quickly discover the services, such as media or hospitality, available on the aircraft.



    For instance, passengers on the ground can access the movies available on their flight and create a playlist for viewing during their flight. This class lists all available services and their corresponding state.
    • Field Detail

      • SDK_VERSION

        public static final java.lang.String SDK_VERSION
    • Method Detail

      • initService

        public static void initService​(Context context,
                                       IInFlightCallback inFlightCallback,
                                       InFlight inFlight)
        Initialize a CatalogDataV1 object and return the object with the IInFlightCallback.
        Parameters:
        context - : provide a Context to initialize the object.
        inFlightCallback - : IInFlightCallback will be used to return the instance or providing the error message.
        inFlight - : provide an InFlight instance to initialize
      • getServerStatus

        public static void getServerStatus​(ServiceDiscoveryV1.ServerStatusCallback callback)
        This is a convenience function that can be used to check whether the InFlight server is Available without initializing a ServiceDiscoveryV1 instance.
      • getAvailableServices

        public java.util.List<ServiceDiscoveryV1.ServiceInfo> getAvailableServices()
        This api can be used to get the list of available services.
        Example:
         ServiceDiscoveryV1.initService(activity, inflightCallbackListener, new InFlight());
         

        public void onInitServiceComplete(Object service,String serviceName) { if (service instanceof ServiceDiscoveryV1) { mServiceDiscoveryV1 = (ServiceDiscoveryV1) service; List< SystemServiceInfo > availableServices = mServiceDiscoveryV1.getAvailableServices(); } }

      • isServerAvailable

        public boolean isServerAvailable()
        Returns whether InFlight server is available or not.
        Returns:
        true if server is available and false otherwise.