简体   繁体   中英

Android: Is there a way to cache web content when offline?

I used chrome custom tab instead of web view to load external URI.

Basically from an item of list view user can visit the external URI via chrome custom tab or web view.

What I doubt is that is it possible if the user already visit any item of list view (already visit the URI) than the content (text) of the URI will be also available even if the application is offline (no internet access)?

Is there any mechanism to achieve that?

Let me know if need clarification.

Chrome custom tabs are available only if you are using Jelly Bean +

As of Chrome 45, Chrome custom tabs is now generally available to all users of Chrome, on all of Chrome's supported Android versions (Jellybean onwards). Please note that the API will change slightly over the coming weeks.

And there is a limit to what you can cache. If you want to cache content better to do it inside your own app. But if there is no internet, just tell the user and let him deal with it.

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