Android - Insert app data in webview via javascript

0
wv.setWebViewClient(new WebViewClient(){

    @Override
    public void onPageFinished(WebView view, String url) {
        super.onPageFinished(view, url);
        wv.loadUrl(
            "javascript:(function() { " +
                 "document.getElementById('j_idt126:username').value='"+login+"'; "+

                 "document.getElementById('formEmissaoNFConvencional:tipoPessoa:1').checked = true;"+

            "})()");
    }
});

I'm using javascript to insert the data that is in the app into the form that is in the webview. In the first line of the js that inserts the user into the input worked, however when I try to modify the radio button or more inputs I do not succeed. Any ideas?

obs: The idea is that when accessing the site through the webview the user does not re-enter the data. The site in question is third party. The application is private.

    
asked by anonymous 10.07.2018 / 21:06

0 answers