I have a fullscreen Webview in Activity A and I have a clear button on Activity B to clear the Webview cache. How can I call that Webview clear functionality from another activity?
Tried the below scenario but it crashed because Webview will be null while calling this function from Activity B
public void clearCacheWeb()
{
mWebview.clearCache(true);
mWebview.clearHistory();
mWebview.clearFormData();
}
Is there any hope for this?