Package | com.distriqt.extension.firebase.remoteconfig |
Class | public final class FirebaseRemoteConfig |
Inheritance | FirebaseRemoteConfig ![]() |
This class represents the FirebaseRemoteConfig extension.
Property | Defined By | ||
---|---|---|---|
implementation : String [read-only]
The implementation currently in use. | FirebaseRemoteConfig | ||
isSupported : Boolean [static] [read-only]
Whether the current device supports the extensions functionality
| FirebaseRemoteConfig | ||
nativeVersion : String [read-only]
The native version string of the native extension. | FirebaseRemoteConfig | ||
service : FirebaseRemoteConfig [static] [read-only]
The singleton instance of the RemoteConfig class. | FirebaseRemoteConfig | ||
version : String [read-only]
The version of this extension. | FirebaseRemoteConfig |
Method | Defined By | ||
---|---|---|---|
Constructor
You should not call this directly, but instead use the singleton access
| FirebaseRemoteConfig | ||
dispose():void
Disposes the extension and releases any allocated resources. | FirebaseRemoteConfig | ||
fetchAndActivate():Boolean
Fetches parameter values for your app. | FirebaseRemoteConfig | ||
getBoolean(key:String):Boolean
Gets the value corresponding to the specified key, as a Boolean
Value as a boolean if a value corresponding to the look up key was present and could be converted to a boolean; default (if set) or static default value otherwise. | FirebaseRemoteConfig | ||
getByteArray(key:String):ByteArray
Gets the value corresponding to the specified key, as a byte array. | FirebaseRemoteConfig | ||
getDouble(key:String):Number
Gets the value corresponding to the specified key, as a Number. | FirebaseRemoteConfig | ||
Gets the current state of the FirebaseRemoteConfig singleton object. | FirebaseRemoteConfig | ||
getInt(key:String):int
Gets the value corresponding to the specified key, as an int. | FirebaseRemoteConfig | ||
getKeysByPrefix(prefix:String = null):Array
Gets the set of keys that start with the given prefix. | FirebaseRemoteConfig | ||
getString(key:String):String
Gets the value corresponding to the specified key, as a String. | FirebaseRemoteConfig | ||
init(key:String):void Deprecated: You no longer need to call this function or use an application key [static]
Initialises the extension class for use with the provided key. | FirebaseRemoteConfig | ||
setConfigSettings(settings:FirebaseRemoteConfigSettings):Boolean
Changes the settings for this remote config instance
| FirebaseRemoteConfig | ||
setDefaults(defaultValues:Object):Boolean
Sets defaults
| FirebaseRemoteConfig |
Event | Summary | Defined By | ||
---|---|---|---|---|
Dispatched when a fetch operation is complete and the new configuration values have been activated. | FirebaseRemoteConfig | |||
Dispatched if there was an error fetching the remote configuration values. | FirebaseRemoteConfig |
Constant | Defined By | ||
---|---|---|---|
EXT_CONTEXT_ID : String = com.distriqt.firebase.RemoteConfig [static] | FirebaseRemoteConfig | ||
VERSION : String = 10.1.0 [static] | FirebaseRemoteConfig |
implementation | property |
implementation:String
[read-only]
The implementation currently in use. This should be one of the following depending on the platform in use and the functionality supported by this extension:
Android
iOS
default
unknown
public function get implementation():String
isSupported | property |
isSupported:Boolean
[read-only] Whether the current device supports the extensions functionality
public static function get isSupported():Boolean
nativeVersion | property |
nativeVersion:String
[read-only]
The native version string of the native extension.
public function get nativeVersion():String
service | property |
service:FirebaseRemoteConfig
[read-only] The singleton instance of the RemoteConfig class.
public static function get service():FirebaseRemoteConfig
Error — If there was a problem creating or accessing the extension, or if the key is invalid
|
version | property |
version:String
[read-only]
The version of this extension.
This should be of the format, MAJOR.MINOR.BUILD
public function get version():String
FirebaseRemoteConfig | () | Constructor |
public function FirebaseRemoteConfig()
Constructor You should not call this directly, but instead use the singleton access
dispose | () | method |
public function dispose():void
Disposes the extension and releases any allocated resources. Once this function
has been called, a call to init
is neccesary again before any of the
extensions functionality will work.
fetchAndActivate | () | method |
public function fetchAndActivate():Boolean
Fetches parameter values for your app.
Configuration values may be served from the Default Config (local cache) or from the Remote Config Server, depending on how much time has elapsed since parameter values were last fetched from the Remote Config server. This method lets the caller specify the cache expiration in seconds.
ReturnsBoolean — true if the fetch was started successfully and false if there was an error
|
getBoolean | () | method |
public function getBoolean(key:String):Boolean
Gets the value corresponding to the specified key, as a Boolean
Value as a boolean if a value corresponding to the look up key was present and could be converted to a boolean; default (if set) or static default value otherwise.
"1", "true", "t", "yes", "y", and "on" are strings that are interpreted (case insensitive) as true
,
and "0", "false", "f", "no", "n", "off", and empty string are interpreted (case insensitive) as false
.
Parameters
key:String — The parameter key to look up
|
Boolean — The value for the corresponding key interpreted as a Boolean
|
getByteArray | () | method |
public function getByteArray(key:String):ByteArray
Gets the value corresponding to the specified key, as a byte array.
Parameters
key:String — The parameter key to look up
|
ByteArray — The value for the corresponding key interpreted as a ByteArray
|
getDouble | () | method |
public function getDouble(key:String):Number
Gets the value corresponding to the specified key, as a Number
.
Value as a Number if a value corresponding to the look up key was present and could be converted to a Number; default (if set) or static default value otherwise.
Parameters
key:String — The parameter key to look up
|
Number — The value for the corresponding key interpreted as a Number
|
getInfo | () | method |
public function getInfo():FirebaseRemoteConfigInfo
Gets the current state of the FirebaseRemoteConfig
singleton object.
FirebaseRemoteConfigInfo — FirebaseRemoteConfigInfo representing the current state
|
getInt | () | method |
public function getInt(key:String):int
Gets the value corresponding to the specified key, as an int
.
Parameters
key:String — The parameter key to look up
|
int — The value for the corresponding key interpreted as an int
|
getKeysByPrefix | () | method |
public function getKeysByPrefix(prefix:String = null):Array
Gets the set of keys that start with the given prefix.
Parameters
prefix:String (default = null ) — The key prefix to look for. If empty or null, this method will return all keys
|
Array — Array of Remote Config parameter keys that start with the specified prefix.
Will return an empty array if there are no keys with the given prefix.
|
getString | () | method |
public function getString(key:String):String
Gets the value corresponding to the specified key, as a String
.
Parameters
key:String — The parameter key to look up
|
String — The value for the corresponding key interpreted as a String
|
init | () | method |
public static function init(key:String):void
Initialises the extension class for use with the provided key.
Parameters
key:String |
Error — If there was a problem creating or accessing the extension, or if the key is invalid
|
setConfigSettings | () | method |
public function setConfigSettings(settings:FirebaseRemoteConfigSettings):Boolean
Changes the settings for this remote config instance
Parameters
settings:FirebaseRemoteConfigSettings — The new settings to be applied
|
Boolean — true if successful
|
setDefaults | () | method |
public function setDefaults(defaultValues:Object):Boolean
Sets defaults
Parameters
defaultValues:Object — The key / value object to be used for setting the defaults.
The values in this object should be one of int, Number, String, or Boolean
|
Boolean — true if the defaults where set correctly and false if there was an error
|
firebaseconfig:fetch:complete | Event |
com.distriqt.extension.firebase.remoteconfig.events.FirebaseRemoteConfigEvent
com.distriqt.extension.firebase.remoteconfig.events.FirebaseRemoteConfigEvent.FETCH_COMPLETE
Dispatched when a fetch operation is complete and the new configuration values have been activated.
firebaseconfig:fetch:error | Event |
com.distriqt.extension.firebase.remoteconfig.events.FirebaseRemoteConfigEvent
com.distriqt.extension.firebase.remoteconfig.events.FirebaseRemoteConfigEvent.FETCH_ERROR
Dispatched if there was an error fetching the remote configuration values. You should try again at a later time.
EXT_CONTEXT_ID | Constant |
public static const EXT_CONTEXT_ID:String = com.distriqt.firebase.RemoteConfig
VERSION | Constant |
public static const VERSION:String = 10.1.0