Client API. The Codename One framework your app is built on: this runs on the device, not in a backend.
public class FirebaseRemoteConfigProvider
- Object
- FirebaseRemoteConfigProvider
ImplementsRemoteConfigProvider
A RemoteConfigProvider for Firebase Remote Config, over the same REST
endpoints the Firebase web SDK uses. No native SDK, Gradle dependency or
pod is involved.
The provider registers a Firebase installation once and keeps its ID and
token in Preferences. Each fetch then calls the namespaces/firebase:fetch
endpoint. The project ID, Web API key and app ID come from the Firebase
console (google-services.json holds all three).
Constructors
public FirebaseRemoteConfigProvider(String projectId, String apiKey, String appId) | Creates a provider. |
Methods
Inherited methods
Constructor details
FirebaseRemoteConfigProvider
public FirebaseRemoteConfigProvider(String projectId, String apiKey, String appId)Creates a provider.
Parameters
projectIdString- the Firebase project ID
apiKeyString- the Web API key
appIdString- the Firebase app ID, such as
1:1234:web:abcd
Method details
setTransport
public void setTransport(CloudHttpTransport transport)Replaces the HTTP transport.
Parameters
transportCloudHttpTransport- the transport
setBaseUrls
public void setBaseUrls(String installationsUrl, String configUrl)Points the provider at other hosts, for tests or a proxy.
Parameters
installationsUrlString- replaces
https://firebaseinstallations.googleapis.com configUrlString- replaces
https://firebaseremoteconfig.googleapis.com
getId
public String getId()Returns
a short stable ID that keeps this provider’s cache apart from others
fetch
public AsyncResource<Map<String, String>> fetch()Fetches the current values.
Returns
a resource that completes with keys to string values