Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2071934
  • 博文数量: 413
  • 博客积分: 10926
  • 博客等级: 上将
  • 技术积分: 3862
  • 用 户 组: 普通用户
  • 注册时间: 2006-01-09 18:14
文章分类

全部博文(413)

文章存档

2015年(5)

2014年(1)

2013年(5)

2012年(6)

2011年(138)

2010年(85)

2009年(42)

2008年(46)

2007年(26)

2006年(59)

分类: 嵌入式

2011-05-10 17:15:55

  1. Docs
    • Data Backup
      http://developer.android.com/guide/topics/data/backup.html
    • xxx
  2. Summary
    Allows you to copy your persistent application data to remote "cloud" storage, once an user performs a factory reset or converts to a new Android-powered device, the system automatically restores your backup data when the application is re-installed.
  3. Classes
    • BackupAgent
      • void onBackup(ParcelFileDescriptor oldState, BackupDataOutput data, ParcelFileDescriptor newState)
        - oldState
        It points to the last backup state, in which all meta-data is saved, such as timestamp, app version etc. May be null, in which case no prior state is being provided.
        - data
        It points to the backup data destination. You need to write all data to be backed into this object.
        - newState
        You should record the final backup state here after writing the requested data to the data output stream.
      • void onRestore(BackupDataInput data, int appVersionCode, ParcelFileDescriptor newState)
        - data
        It points to a full snapshot of the application's data. You need to read all data to be restored from this object.
        - appVersionCode
        The value of the android:versionCode manifest attribute, from the application that backed up this particular data set.
        - newState
        You should record the final backup state here after restoring its data from the data stream. When a full-backup dataset is being restored, this will be null.
    • xxx
  4. xxx
阅读(397) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~