-
Notifications
You must be signed in to change notification settings - Fork 936
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for sending data from webview to native in iOS and Android #457
Conversation
public void postMessage(String value){ | ||
Map<String, String> postMessageMap = new HashMap<>(); | ||
postMessageMap.put("postMessage", value); | ||
FlutterWebviewPlugin.channel.invokeMethod("onPostMessage", postMessageMap); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a error:
java.lang.RuntimeException: Methods marked with @UiThread must be executed on the main thread. Current thread: JavaBridge
maybe use 'new Handler(Looper.getMainLooper())'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How did you solve this error
?
I have a error:
java.lang.RuntimeException: Methods marked with @UiThread must be executed on the main thread. Current thread: JavaBridge
maybe use 'new Handler(Looper.getMainLooper())'
I am getting the same
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I add mainLooper in commit, are you sure on the lastest branch?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#523 is already implemented on the main branch
…hread. Current thread: JavaBridge
Can this be merged in? |
Please? x) |
still waiting 🔢 |
I solved this problem with dynamic channel name for Android and iOS #523. Hope it's helpful |
This one is is important for us too |
Please resolve and merge this request |
1 similar comment
Please resolve and merge this request |
This is already implemented on the main branch, see example. |
Open Webview (message demo)
button