allstars.chh
allstars.chh

Reputation: 99

what's the purpose of WebViewClient.onLoadResource

I would like to ask the purpose the

WebViewClient.onLoadResource

even we can get this callback when webkit tries to load resource but since its return type is void

what can we anything in this function???

I know in API 11 there's a shouldInterceptResouce but how about for those froyo/gingerbread devices?

thanks

Upvotes: 3

Views: 7163

Answers (1)

Mykhailo Gaidai
Mykhailo Gaidai

Reputation: 3160

From the docs:

Notify the host application that the WebView will load the resource specified by the given url.

So, you can override it in your implementation of WebViewClient, for example, to cache resources for future use in your application.

Upvotes: 2

Related Questions