简体   繁体   中英

Android file: scheme cookies

I have a web app that I want host locally from an Android device. It requires for certain cookies to be set. I'm using the CookieManager to set the cookies on the webview but it appears to only work for device > Android API 11. Is it possible to set cookies for pages using the file:// URL scheme?

You have to implement method setAcceptFileSchemeCookies which is available from API level 12.

To set cookies for File Scheme Urls.

For more details refer to http://developer.android.com/reference/android/webkit/CookieManager.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM