首页 > 移动平台 > 详细

AutoBackupForApps

时间:2015-12-02 12:16:32      阅读:261      评论:0      收藏:0      [点我收藏+]

This sample demonstrates how to selectively disable Automatic Backups in Android M, either by adjusting the location where data files are stored using getNoBackupFilesDir(), or by using a custom XML configuration file. This sample can also be used as a utility to test the behavior of the Automatic Backup feature. Executing "adb shell bmgr restore com.example.android.autobackup" from a terminal will cause the sample\‘s data to be cleared and replaced with a copy from the backup server.

此示例演示了如何在Android M上有选择性地禁用自动备份,可以通过使用getNoBackupFilesDir()方法设置数据的存储位置,也可以通过使用自定义XML配置文件位置。该示例还可以用来作为一个实用程序来测试自动备份功能的行为。从终端执行“adb shell bmgr restore com.example.android.autobackup”会导致示例的数据被清除,并被备份服务器上的副本替换。

技术分享

代码下载:

http://pan.baidu.com/s/1hq2PuPu

AutoBackupForApps

原文:http://www.cnblogs.com/dongweiq/p/5012488.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!