P
P
Pavel Dmitriev2016-08-26 14:48:11
JavaScript
Pavel Dmitriev, 2016-08-26 14:48:11

How to pass String from Java to JS?

I am using JsBridge library to pass data from android activity to webview with js.
I am sending string via method

webView.send("Hi");

In the console I see the following
I/chromium: [INFO:CONSOLE(1)] "{"data":"Hi"}", source: file:///android_asset/demo.html (1)

How can I get "Hello" from data in demo.html as a text resource?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question