Newbie: Can I pass variables from webview to native, vice versa?

Hi, I’m planning to use appgyver to wrap my Web app (bubble platform). I have few questions before I start in appgyver:

Can I communicate from webview to native appgyver components, vice versa? Maybe like a Js Bridge?

Here are the use cases:

  1. I want to create loading screens when my webapp change URL. I’m thinking if it can be showed/removed by having a workflow inside the webview that triggers the remove/show loading screen.

  2. I want to be able to get OneSignal Push Notifications but I don’t know if I can get PlayerID thru the webview.

1 Like

At the moment you need to listen to the onLocationChange event, so any data from inside the WebView should be added to the loaded URL as a query param/anchor tag and parsed from there.

For full support, we need to expose https://github.com/react-native-community/react-native-webview/blob/master/docs/Reference.md#onmessage – we plan on doing a big sweep of the available plugins, fixing existing bugs and bringing in low-hanging features soon, and improving the WebView is among the easy fixes.

4 Likes

Hello - we are also looking to integrate with Bubble and was wondering if you supported Push Notifications or Native Camera from webview?

Push notifications are configured for the whole app binary and triggered via a backend, see https://docs.appgyver.com/tutorials/push-notifications

Native camera can be opened with the Take photo flow function. Or what do you mean by “from webview”?

This is something I need. Any rough ETA available? And related to that (for me) is there anyway that the React Native wrapper for the Chromecast SDK could be implemented?

1 Like

Is there any news about this ? Would it be possible to store login info made on the webview and then later use it - like an autofill thing (or get gps location information) ?

1 Like

@Harri_Sarsa Any updates on this?

@Tadeu_Vieira Did you figure out a way to do this?

yes, is there any way to do this yet? I need to pass variables between webview and app.

Thanks

Does anyone know if this was implemented?
This feature is excellent, we need it.