Android的 - 从设备中完全删除短信和短信作出不可恢复 [英] Android - Delete SMS completely from the device and make SMS non recoverable
问题描述
我想通过我的应用程序删除所有来自移动短信。
目前,我用下面code删除消息。
I want to delete all the sms from the mobile through my application. Currently, I am deleting messages using below code.
Uri uriSms = Uri.parse("content://sms/");
Cursor c = getContentResolver().query(uriSms,
new String[] { "_id", "thread_id", "address","person", "date", "body" }, null, null, null);
if (c != null && c.moveToFirst()) {
do {
long id = c.getLong(0);
getContentResolver().delete(Uri.parse("content://sms/" + id), null, null);
} while (c.moveToNext());
}
我能够从手机删除邮件。
I am able to delete messages from mobile.
但是,通过使用一些恢复应用程序,它们将被恢复。
But by using some recovery applications, they are restored.
我试图通过删除路径的文件
I tried to remove it completely by deleting the file from path
数据/数据/ com.android.providers.telephony /数据库/ mmssms.db
"data/data/com.android.providers.telephony/databases/mmssms.db"
但它给了我以下权限被拒绝的错误。
But it gave me following permission denied error.
12-12 00:37:29.673: W/System.err(9724): java.io.FileNotFoundException: /data/data/com.android.providers.telephony/databases/mmssms.db (Permission denied)
我怎样才能完全删除从我的设备的消息?使用一些安全的删除方法?
How can I completely remove the messages from my device? Using some secure delete method?
推荐答案
您不能删除,除非该设备是植根一个储存在另一个应用程序沙箱(如com.android.providers.telephony)的文件。
you can't remove a file that's stored on another application sandbox (as com.android.providers.telephony) unless the device is rooted.
这篇关于Android的 - 从设备中完全删除短信和短信作出不可恢复的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!