javascript - Set html text field value from java interface android -


I'm working on a project where I have to set values ​​in HTML form fields of your Java method. When the form loads in this app, I have to fill in the text field value on the user's speech. So how can I do this via the Javascript interface in Android? Thank you

The main Gtividhikjawa

  WebView.loadUrl ("Your URL"); WebViewksetWebViewClient (new WebViewClient () {@Override public void onPageFinished (webview scene, String url) {webView.loadUrl ( "javascript: setTextField (" + value + ")"}} @ Override public boolean Chahiaovrraiduarelloding (Vebviv view, string URL) {view.loadUrl (url); right back;}});   

HtmlFile.html

  & lt ; script & gt; function setTextField (value) value = value {document.getElementById ( "texta").;} & Lt; / script & gt;    

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -