Class SettingsProvider

  • All Implemented Interfaces:

    
    public class SettingsProvider
    
                        

    Facilitates keeping a global reference to application SettingsParameters, including ApplicationId, deviceID, applicationVersion,backendURL, and version of the server. Generally the application developer will set the initialized SettingsParameters once and get it from any where SettingsParameters is needed. The set must be called at least once.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      static void set(@NonNull() SettingsParameters settingsParameters) Sets the settingsParameters in the provider for future access using get If the settingsParameters is changed, SETTINGS_PROVIDER_SET state event will be sent to the the observers.
      static SettingsParameters get() Returns the settingsParameters that include basic application settings If set was not called at least once before the settings will be null and an IllegalStateException is thrown.
      static void clear()
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • set

         static void set(@NonNull() SettingsParameters settingsParameters)

        Sets the settingsParameters in the provider for future access using get If the settingsParameters is changed, SETTINGS_PROVIDER_SET state event will be sent to the the observers.

        Parameters:
        settingsParameters - instance of SettingsParameters that has been built with applicationId, deviceId, applicationVersion, backendUrl and apiKey
      • get

        @NonNull() static SettingsParameters get()

        Returns the settingsParameters that include basic application settings If set was not called at least once before the settings will be null and an IllegalStateException is thrown.

      • clear

        @RestrictTo(value = RestrictTo.Scope.TESTS) static void clear()