【发布时间】:2016-09-15 08:20:07
【问题描述】:
我需要将数据发布到 Webview。
我从一些链接中找到了以下代码:
WebView webview = new WebView(this);
setContentView(webview);
String url = "http://www.example.com";
String postData = username=my_username&password=my_password";
webview.postUrl(url",EncodingUtils.getBytes(postData, "BASE64"));
但在我的 android 工作室中,我看到 EncodingUtils 已弃用
谁能帮我 EncodingUtils 将数据发布到 Android WebView 的替代方法是什么?
【问题讨论】:
标签: android http-post android-webview