Class Appfigurate


  • public class Appfigurate
    extends java.lang.Object
    Appfigurate library static methods.
    • Method Detail

      • version

        @NonNull
        public static java.lang.String version()
        The version of the Appfigurate library in the format "major.minor.patch".
        Returns:
        Version number. e.g. "5.1.2"
      • addConfigurationUpdatedListener

        public static void addConfigurationUpdatedListener​(@NonNull
                                                           Appfigurate.ConfigurationUpdated target)
        Registers a delegate method that will be called back when Appfigurate has updated the configuration of the app. The delegate method will be called back on the main looper.
        Parameters:
        target - delegate method to be registered.
      • removeConfigurationUpdatedListener

        public static void removeConfigurationUpdatedListener​(@NonNull
                                                              Appfigurate.ConfigurationUpdated target)
        Unregisters the delegate method that will be called back when Appfigurate has updated the configuration of the application. You must call this method before the target is deallocated.
        Parameters:
        target - delegate method to unregister.
      • setLogging

        public static void setLogging​(boolean logging)
        When true, Appfigurate library debugging messages will be output to the console. The default is false. It is best practice to distribute applications via Google Play with logging set to false. See `APLLogging` meta-data in the AndroidManifest.xml file.
        Parameters:
        logging - true if debugging messages should be output to the console.
      • saveConfiguration

        public static void saveConfiguration()
        Saves the configuration persisted in SharedPreferences into temporary storage. Some apps have functionality to erase SharedPreferences to reset apps back to 'factory defaults', which has the side effect of removing any Appfigurate configuration persisted in the SharedPreferences. See restoreConfiguration for more details and usage example.
      • restoreConfiguration

        public static void restoreConfiguration()
        Restores the configuration from temporary storage back into SharedPreferences. See saveConfiguration for more details and usage example.