备份媒体文件时出现问题?
我开发了一个备份应用程序。现在,它可以备份联系人、设置和浏览器
我会通过该主机进行这些备份,就像
Backup bu = new Backup(this);
bu.runBackup(Contacts.People.CONTENT_URI);
bu.runBackup(Settings.System.CONTENT_URI);
bu.runBackup(Browser.SEARCHES_URI);
我在备份类中使用gethost方法一样,就像
int count=0;
String file = uri.getHost() +"-"+ System.currentTimeMillis();
Cursor cursor = cr.query(uri, null, null, null, null);
count = cursorToCSV(cursor, file);
cursor.close();
String msg = String.format("Backed up %d records to %s file", count, file);
Toast.makeText(context, msg, Toast.LENGTH_SHORT).show();
return count;
我想备份媒体文件一样图片、视频、音乐
可以吗?我该怎么做?有人知道意思告诉我否则还有什么替代方法吗?
I've developed a Backup application. Now, it could takes backup for contacts, settings and browser
I would take these backups by that host like
Backup bu = new Backup(this);
bu.runBackup(Contacts.People.CONTENT_URI);
bu.runBackup(Settings.System.CONTENT_URI);
bu.runBackup(Browser.SEARCHES_URI);
I've use gethost method in Backup class like
int count=0;
String file = uri.getHost() +"-"+ System.currentTimeMillis();
Cursor cursor = cr.query(uri, null, null, null, null);
count = cursorToCSV(cursor, file);
cursor.close();
String msg = String.format("Backed up %d records to %s file", count, file);
Toast.makeText(context, msg, Toast.LENGTH_SHORT).show();
return count;
I would like to take backup for media files images, videos, musics
Is it possible to do that? How can i do like this? Anyone knows mean tell me otherwise what's the alternate way?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我已经通过自己的编码完成了这个...
I've done this by my own Coding...