I have an android application that consists of a WebWiew
and I need to login to a site automatically using code. I\'ve tried using postUrl()
and it
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
WebView webView = new WebView(this);
setContentView(webView);
String url = "http://example.com/somepage.php";
String postData = "postvar=value&postvar2=value2";
webView.postUrl(url, EncodingUtils.getBytes(postData, "base64"));
}