diff --git a/website/docs/for-android/how-to/using-the-portals-plugin.md b/website/docs/for-android/how-to/using-the-portals-plugin.md index cd0cf19..268d656 100644 --- a/website/docs/for-android/how-to/using-the-portals-plugin.md +++ b/website/docs/for-android/how-to/using-the-portals-plugin.md @@ -380,6 +380,17 @@ PortalsPubSub.getShared().publish("weather", "sunny"); +### Data Types + +Data published through the `publish()` function from native should be a type compatible with objects in the [org.json](https://developer.android.com/reference/org/json/package-summary) package. Compatible types include: + +- String +- Numbers (e.g: integer) +- [JSONObject](https://developer.android.com/reference/org/json/JSONObject) +- [JSONArray](https://developer.android.com/reference/org/json/JSONArray) + +The Capacitor [JSObject](https://github.com/ionic-team/capacitor/blob/main/android/capacitor/src/main/java/com/getcapacitor/JSObject.java) and [JSArray](https://github.com/ionic-team/capacitor/blob/main/android/capacitor/src/main/java/com/getcapacitor/JSArray.java) are also compatible. + ## Examples The `PortalsPlugin` is used in the [E-Commerce App](../examples/ecommerce-app) demo.