if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
webSettings.setAllowFileAccessFromFileURLs(true);
webSettings.setAllowUniversalAccessFromFileURLs(true);
}
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP){
CookieManager cookieManager = CookieManager.getInstance();
cookieManager.setAcceptThirdPartyCookies(this,true);
}
if (NetworkUtils.isConnected(this.getContext()) ){
webSettings.setCacheMode(WebSettings.LOAD_DEFAULT);
} else {
webSettings.setCacheMode(
WebSettings.LOAD_CACHE_ELSE_NETWORK);
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
webSettings.setMixedContentMode(
WebSettings.MIXED_CONTENT_COMPATIBILITY_MODE);
}

androidcookie的更多相关文章

  1. androidcookie存储sqllite

    /**声明一些数据库操作的常量*/  private static SQLiteDatabase mDatabase = null;  private static final String DATA ...

随机推荐

  1. Http Header之User-Agent

    Http Header之User-Agent User-Agent中文名为用户代理,简称 UA,它是一个特殊字符串头.通过这个标识,用户所访问的网站可以显示不同的排版从而为用户提供更好的体验或者进行信 ...

  2. NEXIQ 125032 USB Link Diesel Truck Diagnose Interface Introduction

    What are the features of nexiq usb link? 1.Compatible with applications that diagnose engines, trans ...

  3. js 常见事件

  4. Java_方法的定义以及分类

    什么叫方法? 方法也叫做函数,实现某个功能 方法分类: 系统提供的方法: 常用的系统提供的方法:如:nextInt() next() nextDouble() print println()..... ...

  5. RealProxy AOP的实现

    微软有一篇实现 一下是对于该实现的理解 https://msdn.microsoft.com/zh-cn/library/dn574804.aspx public class DynamicProxy ...

  6. git提交过程中遇到的 index.lock 问题导致无法提交的解决方法

    在提交代码的过程中,可能会遇到下面的问题: fatal: Unable to create 'C:/programLists/zzw-q1/.git/index.lock': File exists. ...

  7. oracle dump的使用心得

    使用DS开发的时候,有的时候会遇到一个问题:数据库层面定义的空格与DS自已定义的空格概念不一致,导致生成的数据会有一定的问题. 举例来说: 在数据库里面定义CHAR(20),如果插入的字符不足20的时 ...

  8. 自己用的opensuse源

    utsc_oss               http://mirrors.ustc.edu.cn/opensuse/distribution/13.1/repo/oss/utsc_non_oss  ...

  9. python 对象/变量&赋值的几点思考

    python 对象/变量 对象 Every object has an identity, a type and a value. An object's identity never changes ...

  10. 32位和64位系统内核函数调用从ZwProtectVirtualMemory到NtProtectVirtualMemory

    0x01 前言 我们知道R3层中,Zw系列函数和Nt系列函数函数是一样的,但是在内核Zw系列函数调用了Nt系列函数,但是为什么要在内核设置一个Zw系列函数而不是直接调用Nt函数呢?Zw系列函数又是怎么 ...