Clear Android Browser History

前端 未结 3 1555
北海茫月
北海茫月 2021-02-10 13:53

I am writing an application for a client that will have several devices that are open to customers to look at and play with. They want to be able to clear the browser history on

3条回答
  •  囚心锁ツ
    2021-02-10 14:21

    I tried to close the browser via the ActivityManager and it works fine. I tested this on an HTC 2.2 and it works perfect.

    Maybe you should also try this:

    am.killBackgroundProcesses("com.google.android.browser");
    

    in case the browser on your phone is not at com.android.browser

    or even try to finish the activity: com.android.browser.BrowserActivity

    Hope this helps!

提交回复
热议问题