I have a problem with inserting saved data from Android app into html input. Site is loaded into WebView component, so i have access to my site in my app, but i still can't insert saved data (from previous activities) into html text input...
I have found some code - webview.loadUrl("javascript:document.getElementById('pass_id').value = 'y2Yb2q2ckM'");
and tried use code from this link - https://stackoverflow.com/a/12450427/1196540 but those codes does not worked for me...
Can anyone give advice or help me with my problem?
UPD and here is my web-form:
<form method="post" action="">
<input name="pass" id="pass_id" type="password" autocomplete="off" value="" class="keyboardInput" onkeyup="$('#warn2').show();"/>
UPD 2
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_browser_screen);
Intent intent = getIntent();
CLIENT_ID = intent.getExtras().getString("CLIENT_ID");
lang = intent.getExtras().getString("LANGUAGE");
CLIENT_PWD = intent.getExtras().getString("PASSWORD");
if (lang.equals("English"))
url = link.getEng();
else if (lang.equals("Russian"))
url = link.getRussian();
else if (lang.equals("Dutch(German)"))
url = link.getDeutch();
else if (lang.equals("French"))
url = link.getFrance();
else if (lang.equals("Italian"))
url = link.getItalian();
else if (lang.equals("Spanish"))
url = link.getSpanish();
//go to the website
WebView webview = new WebView(this);
setContentView(webview);
WebSettings webSettings = webview.getSettings();
webSettings.setJavaScriptEnabled(true);
webview.setWebViewClient(new WebViewClient());
data = "client_id=" + CLIENT_ID;
webview.postUrl(url, EncodingUtils.getBytes(data, "base64"));
//insert pass
//webview.loadUrl("javascript:document.getElementById('pass_id').value = 'y2Yb2q2ckM'");
webview.loadUrl("javascript:document.getElementById('pass_id').focus()");
}