2

I'm looking for a method that will clear android default browser's cache, cookies, history, forms and password.

I have tried these methods:

Browser.clearHistory(getContentResolver());
Browser.clearSearches(getContentResolver());

But they don't clear everything I want.

public class foo extends Browser
{
    ...
    dir = getCacheDir();
    // delete that directory including children...

I used this method to clear the caches, but it does not work.

Please somebody help me.

JRoughan
  • 1,635
  • 12
  • 32
user2291344
  • 21
  • 1
  • 3

1 Answers1

0

What is your intent behind clearing the browser cache? This is important.

Unless you are creating an application that is specifically designed to clear this data, it is not recommended to arbitrarily delete the user's browsing data.

Also, keep in mind that other browsers exist on Android as well. (Chrome, Opera)

This post[1] provides methods to delete the browser cache.

[1] - Android Webview - Completely Clear the Cache

Community
  • 1
  • 1
Nick Caplinger
  • 784
  • 6
  • 10