我是Android开发的新手,我在追踪像音频、视频、图片等被删除的文件方面遇到了麻烦。我想获取所有删除文件的详细信息,并将其移动到一个单独的文件夹中。
我是Android开发的新手,我在追踪像音频、视频、图片等被删除的文件方面遇到了麻烦。我想获取所有删除文件的详细信息,并将其移动到一个单独的文件夹中。
// Defines selection criteria for the rows you want to delete
String mSelectionClause = UserDictionary.Words.APP_ID + " LIKE ?";
String[] mSelectionArgs = {"user"};
// Defines a variable to contain the number of rows deleted
int mRowsDeleted = 0;
...
// Deletes the words that match the selection criteria
mRowsDeleted = getContentResolver().delete(
UserDictionary.Words.CONTENT_URI, // the user dictionary content URI
mSelectionClause // the column to select on
mSelectionArgs // the value to compare to
);
欲了解更多详情,请访问以下链接以了解内容提供程序:
http://developer.android.com/guide/topics/providers/content-provider-basics.html