http://www.heapoverflow.me/question-webview-loadurlurl-headers-not-working-in-android-31203905

It's beceause of Cookie Policy, to fix it, you should add this :

public void onCreate(Bundle savedInstanceState){    super.onCreate(savedInstanceState);    super.init();    // Allow third party cookies for Android Lollipop    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {        WebView webView = (WebView)super.appView;        CookieManager cookieManager = CookieManager.getInstance();        cookieManager.setAcceptThirdPartyCookies(webView,true);    }    super.loadUrl(Config.getStartUrl());}
Answer for 'WebView.loadUrl(url, headers) not working in android' is helpful, give it a up vote! 5Answer for 'WebView.loadUrl(url, headers) not working in android' is not helpful, cast a down vote user2906641 Posted at 2015-07-27 07:51:35Z

if you are using Android Lollipop, then

CookieManager.getInstance().setAcceptCookie(true);

won't work. You need to use

CookieManager.getInstance().setAcceptThirdPartyCookies(true);

更多相关文章

  1. 代码中设置drawableleft
  2. android 3.0 隐藏 系统标题栏
  3. Android开发中activity切换动画的实现
  4. Android(安卓)学习 笔记_05. 文件下载
  5. Android中直播视频技术探究之—摄像头Camera视频源数据采集解析
  6. 技术博客汇总
  7. android 2.3 wifi (一)
  8. AndRoid Notification的清空和修改
  9. Android中的Chronometer

随机推荐

  1. 搭建一个短视频APP可以用云服务器吗?如何
  2. JS高级ES6的6种继承方式
  3. webpack 配置文件webpack.config.js
  4. Python 函数装饰器应用教程
  5. 意派Epub360丨双12来袭,跟着淘宝学营销,海
  6. JavaScript高级之自定义异常
  7. Spring Security 核心过滤器链讲解
  8. php hello world
  9. Android(安卓)23种设计模式
  10. Android:theme