清除应用程序缓存编程? [英] Clearing app cache programmatically?

查看:88
本文介绍了清除应用程序缓存编程?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想写一个实用工具,用户可以选择一组安装的应用程序,并清除其数据的高速缓存,即喜欢,你可以使用内置的设置 - > Applictions设置手动的方式做屏幕的清除缓存按钮

I want to write a utility where the user can select a set of installed apps and clear their data caches i.e. like the way you can do manually using the built-in Settings->Applictions settings screen with the "Clear cache" button.

我如何可以访问多少缓存数据的每个应用程序都有和编程清楚这些缓存?

How can I access how much cached data each app has and programmatically clear these caches?

推荐答案

普通的SDK应用程序没有权限访问,更不用说修改,其他应用程序的缓存,任何超过他们有破解文件的权利。

Ordinary SDK applications have no rights to access, let alone modify, the caches of other applications, any more than they have a right to hack your files.

这是可能的植根与手机以root运行你的应用程序,在这种情况下,你将不得不手动构建基于应用程序的包名的路径。

This may be possible on rooted phones with your application running as root, in which case you will have to manually construct the paths based upon the apps' package names.

这篇关于清除应用程序缓存编程?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆