Class FirebaseRemoteConfigProvider
java.lang.Object
com.codename1.cloud.FirebaseRemoteConfigProvider
- All Implemented Interfaces:
RemoteConfigProvider
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).
-
Constructor Summary
ConstructorsConstructorDescriptionFirebaseRemoteConfigProvider(String projectId, String apiKey, String appId) Creates a provider. -
Method Summary
Modifier and TypeMethodDescriptionfetch()Fetches the current values.getId()Returns
voidsetBaseUrls(String installationsUrl, String configUrl) Points the provider at other hosts, for tests or a proxy.voidsetTransport(CloudHttpTransport transport) Replaces the HTTP transport.
-
Constructor Details
-
FirebaseRemoteConfigProvider
-
-
Method Details
-
setTransport
Replaces the HTTP transport.
Parameters
transport: the transport
-
setBaseUrls
-
getId
Description copied from interface:RemoteConfigProviderReturns
a short stable ID that keeps this provider's cache apart from others
- Specified by:
getIdin interfaceRemoteConfigProvider
-
fetch
Description copied from interface:RemoteConfigProviderFetches the current values.
Returns
a resource that completes with keys to string values
- Specified by:
fetchin interfaceRemoteConfigProvider
-