Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/183.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在android中打开一个包含POST数据的网页_Android_Post_Android Intent_Web - Fatal编程技术网

在android中打开一个包含POST数据的网页

在android中打开一个包含POST数据的网页,android,post,android-intent,web,Android,Post,Android Intent,Web,我想从我的应用程序打开一个网页 我有这个密码 String url = "http://www.mypage.com"; Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url)); startActivity(browserIntent); 但是“”需要一个POST变量 如何添加一个POST参数 多谢各位 您不能使用网络视图吗 WebView webview = new WebView(this); setCon

我想从我的应用程序打开一个网页

我有这个密码

String url = "http://www.mypage.com";
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
startActivity(browserIntent);
但是“”需要一个POST变量

如何添加一个POST参数


多谢各位

您不能使用网络视图吗

WebView webview = new WebView(this);
setContentView(webview);
byte[] post = EncodingUtils.getBytes("var1=1&nextvar2=2", "BASE64");
webview.postUrl(YOUR_URL, post);

如何得到回应?