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.
-
-
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()
-
-
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 ofSettingsParameters
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()
-
-
-
-