Class Custom


  • public class Custom
    extends Sync

    Package Starting Point - Custom persists the custom value set by the seat.



    • Method Detail

      • initService

        public static void initService​(Context context,
                                       IInFlightCallback inFlightCallback,
                                       InFlight inFlight)
        This API is the starting point for Custom. 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.
        Example:
         Custom.initService(context, inflightCallbackListener);
         

        public void onInitServiceComplete(Object serviceObj,String serviceName) { if(serviceObj != null) { mCustom = (Custom) serviceObj; } }

      • addCustomSetting

        public void addCustomSetting​(java.lang.String settingName,
                                     JSONObject custom)
        Add a custom setting with a setting name
        Parameters:
        settingName - Setting name associate with the custom setting item.
        custom - Custom setting item store in the seat.This must be a JSONObject.
        Example:
         JSONObject display = new JSONObject();
         display.put("brightness", 100);
         display.put("lighting", 100);
         custom.addCustomSetting("display", display);
         

      • removeCustomSetting

        public void removeCustomSetting​(java.lang.String settingName)
        Remove custom setting associate with settingName.
        Parameters:
        settingName - custom setting key.
      • getCustomSetting

        public JSONObject getCustomSetting​(java.lang.String settingName)
        Get custom setting associate with settingName.
        Parameters:
        settingName - custom setting key.
        Returns:
      • getCustomSetting

        public JSONObject getCustomSetting()
        Get all the custom settings.
        Returns:
      • setSyncListener

        public void setSyncListener​(Sync.SyncListener syncListener)
        Description copied from class: Sync
        Sets a listener to listen for the syncronization updates.
        Overrides:
        setSyncListener in class Sync
        Parameters:
        syncListener - Sync.SyncListener callback invoked indicating the result of sync operation performed.
      • synchronize

        public void synchronize()
        Description copied from class: Sync
        Triggers the synchronization.Create new playlist with nameCreate new playlist with name
        Overrides:
        synchronize in class Sync