-
-
Notifications
You must be signed in to change notification settings - Fork 112
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(remote-config): support realtime config updates (#502)
* Add definitions * wip * `addOnConfigUpdateListener` -> `addConfigUpdateListener` * wip [skip ci] * wip: android * docs: add changeset [skip ci] * docs [skip ci] * wip: ios * fix(ios): set `CAPPluginReturnCallback`
- Loading branch information
Showing
22 changed files
with
609 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@capacitor-firebase/remote-config': minor | ||
--- | ||
|
||
feat: support realtime config updates |
2 changes: 0 additions & 2 deletions
2
.../java/io/capawesome/capacitorjs/plugins/firebase/firestore/interfaces/ResultCallback.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
package io.capawesome.capacitorjs.plugins.firebase.firestore.interfaces; | ||
|
||
import androidx.annotation.NonNull; | ||
|
||
public interface ResultCallback { | ||
void error(Exception exception); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
...ins/firebase/remoteconfig/classes/events/AddConfigUpdateListenerOptionsCallbackEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package io.capawesome.capacitorjs.plugins.firebase.remoteconfig.classes.events; | ||
|
||
import com.getcapacitor.JSArray; | ||
import com.getcapacitor.JSObject; | ||
import com.google.firebase.remoteconfig.ConfigUpdate; | ||
import io.capawesome.capacitorjs.plugins.firebase.remoteconfig.interfaces.Result; | ||
import java.util.Set; | ||
|
||
public class AddConfigUpdateListenerOptionsCallbackEvent implements Result { | ||
|
||
private ConfigUpdate configUpdate; | ||
|
||
public AddConfigUpdateListenerOptionsCallbackEvent(ConfigUpdate configUpdate) { | ||
this.configUpdate = configUpdate; | ||
} | ||
|
||
public JSObject toJSObject() { | ||
JSArray updatedKeysResult = new JSArray(); | ||
for (String key : configUpdate.getUpdatedKeys()) { | ||
updatedKeysResult.put(key); | ||
} | ||
|
||
JSObject result = new JSObject(); | ||
result.put("updatedKeys", updatedKeysResult); | ||
return result; | ||
} | ||
} |
Oops, something went wrong.