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的更多相关文章

随机推荐

  1. angular 实现总价满100折扣

    <div ng-controller="CartController"> <div ng-repeat="item in items"> ...

  2. python 编程之计算器

    作业: 使用正则表达式和递归实现计算器功能. 实现: 1.实现带括号的计算 2.实现指数.加减乘除求余等功能 一.实例说明: 本实例自己写了个版本,但依旧存在一点bug,例:-2-2等计算问题,故最后 ...

  3. php实现base64编码

    工作需要,想弄一个加密的串,就想仿照base64的编码方式,写一个加密的方法,所以就有了下面这个用php实现的base64的代码 <?php /** * Base64 编码/解码 * @auth ...

  4. WPF学习笔记-TextBox光标位置如何放到最后?

    TextBox光标位置如何放到最后? 使用SelectionStart : TextBox.SelectionStart = TextBox.Text.Length;

  5. string.Format 日期格式化

    String.Format日期的格式化例子: DateTime dt = DateTime.Now;//2010年10月4日 17点05分 string str = ""; //s ...

  6. ural-1099-Work Scheduling(裸带花树)

    题意: 有N个人,有限对的人可以在一起工作,问最多能有多少对. 分析: 任意图的最大匹配 // File MAXName: 1099.cpp // Author: Zlbing // Created ...

  7. sed文本处理--文本行扩展与分割

    原文件: 00 abc sdfdsf1 2 45 3 400 xfd xdfssdf3 322 345 234 处理后文件: 00 abc sdfdsf 1 2 400 abc sdfdsf 5 3 ...

  8. 【数论】【扩展欧几里得】Codeforces 710D Two Arithmetic Progressions

    题目链接: http://codeforces.com/problemset/problem/710/D 题目大意: 两个等差数列a1x+b1和a2x+b2,求L到R区间内重叠的点有几个. 0 < ...

  9. JQuery获取元素宽度.width()与.css(‘width’)两个函数的区别

    整理翻译自:http://blog.jquery.com/2012/08/16/jquery-1-8-box-sizing-width-csswidth-and-outerwidth/ 大意是: 在J ...

  10. Scrapy:Python的爬虫框架

    网络爬虫,是在网上进行数据抓取的程序,使用它能够抓取特定网页的HTML数据.虽然我们利用一些库开发一个爬虫程序,但是使用框架可以大大提高效率,缩短开发时间.Scrapy是一个使用Python编写的,轻 ...