码迷,mamicode.com
首页 > 移动开发 > 详细

AutoBackupForApps

时间:2015-12-02 12:17:19      阅读:154      评论: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
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!