Packagecom.distriqt.extension.firebase.remoteconfig
Classpublic final class FirebaseRemoteConfig
InheritanceFirebaseRemoteConfig Inheritance flash.events.EventDispatcher

This class represents the FirebaseRemoteConfig extension.



Public Properties
 PropertyDefined 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
Public Methods
 MethodDefined 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
  
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
  
Changes the settings for this remote config instance
FirebaseRemoteConfig
  
setDefaults(defaultValues:Object):Boolean
Sets defaults
FirebaseRemoteConfig
Events
 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
Public Constants
 ConstantDefined By
  EXT_CONTEXT_ID : String = com.distriqt.firebase.RemoteConfig
[static]
FirebaseRemoteConfig
  VERSION : String = 10.1.0
[static]
FirebaseRemoteConfig
Property Detail
implementationproperty
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:


Implementation
    public function get implementation():String
isSupportedproperty 
isSupported:Boolean  [read-only]

Whether the current device supports the extensions functionality


Implementation
    public static function get isSupported():Boolean
nativeVersionproperty 
nativeVersion:String  [read-only]

The native version string of the native extension.


Implementation
    public function get nativeVersion():String
serviceproperty 
service:FirebaseRemoteConfig  [read-only]

The singleton instance of the RemoteConfig class.


Implementation
    public static function get service():FirebaseRemoteConfig

Throws
Error — If there was a problem creating or accessing the extension, or if the key is invalid
versionproperty 
version:String  [read-only]

The version of this extension.

This should be of the format, MAJOR.MINOR.BUILD


Implementation
    public function get version():String
Constructor Detail
FirebaseRemoteConfig()Constructor
public function FirebaseRemoteConfig()

Constructor You should not call this directly, but instead use the singleton access

Method Detail
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.

Returns
Booleantrue 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

Returns
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

Returns
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

Returns
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.

Returns
FirebaseRemoteConfigInfoFirebaseRemoteConfigInfo 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

Returns
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

Returns
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

Returns
String — The value for the corresponding key interpreted as a String
init()method 
public static function init(key:String):void
Deprecated: You no longer need to call this function or use an application key

Initialises the extension class for use with the provided key.

Parameters

key:String


Throws
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

Returns
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

Returns
Booleantrue if the defaults where set correctly and false if there was an error
Event Detail
firebaseconfig:fetch:complete Event
Event Object Type: com.distriqt.extension.firebase.remoteconfig.events.FirebaseRemoteConfigEvent
FirebaseRemoteConfigEvent.type property = 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  
Event Object Type: com.distriqt.extension.firebase.remoteconfig.events.FirebaseRemoteConfigEvent
FirebaseRemoteConfigEvent.type property = 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.

Constant Detail
EXT_CONTEXT_IDConstant
public static const EXT_CONTEXT_ID:String = com.distriqt.firebase.RemoteConfig

VERSIONConstant 
public static const VERSION:String = 10.1.0