There's a method called postUrl
in WebView
.
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
WebView webView = new WebView(this);
setContentView(webView);
String url = "http://mysite.com/somepage.php";
String postData = "postvar=value";
webView.postUrl(url, EncodingUtils.getBytes(postData, "base64"));
}
If base64
didn't work, try BASE64
alternatively.
Hope it will works fine.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…