Skip to content

onInitialized is now being sent to Android side after the WebView port was set#217

Merged
AbeJellinek merged 1 commit into
zotero:masterfrom
Dima-Android:master
Jun 18, 2026
Merged

onInitialized is now being sent to Android side after the WebView port was set#217
AbeJellinek merged 1 commit into
zotero:masterfrom
Dima-Android:master

Conversation

@Dima-Android

@Dima-Android Dima-Android commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

From now the flow on Android works like this:
When reader is being loaded in the Webview, Android side waits for a WebView to fire it's callback - onWebViewLoadPage, which signals that reader code was loaded.
Then I execute some JS code to pass WebView Port to JS side
I wait for onInitialized to be returned from the JS side
Only then I execute createView against the reader.

This flow should hopefully ensure that the Reader is fully loaded and Port was set before any of the requests are executed against reader or before reader itself wants to send some messages to Android side.

@AbeJellinek AbeJellinek merged commit 9a9ab05 into zotero:master Jun 18, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants