Interface RemoteSettings


public interface RemoteSettings

RemoteSettings is a collection of values that can be sent back by AppBrain's servers to your Android app. See the remote settings documentation.

You can use getLastUpdateTime() to see if the settings have been fetched already, and if so, when.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Add a listener to the remote settings that will be called whenever we received settings from the server.
    get(String key)
    Return a value that was fetched from the server, if present.
    get(String key, String defaultValue)
    Return a value that was fetched from the server, or a default value if none was present.
    long
     
  • Method Details

    • get

      String get(String key)
      Return a value that was fetched from the server, if present.
      Parameters:
      key - The name of the value.
      Returns:
      The value that was set on the server, or null if there was none.
    • get

      String get(String key, String defaultValue)
      Return a value that was fetched from the server, or a default value if none was present.
      Parameters:
      key - The name of the value.
      Returns:
      The value that was set on the server, or the default value if there was none.
    • getLastUpdateTime

      long getLastUpdateTime()
      Returns:
      The last time the remote settings were fetched from the server. If the remote settings have never been fetched, this returns 0. Otherwise it will return the value of System.currentTimeMillis() at the time of update.
    • addListener

      void addListener(Runnable r)
      Add a listener to the remote settings that will be called whenever we received settings from the server.
      Parameters:
      r - The code to be executed, will be run on a background thread.