How to exclude an entire directory from Android 6 Auto Backup? -


i'd configure android 6 auto backup feature exclude files in entire directories (both in "files" , "external"), specific extensions should excluded. wildcards . , *.tn-png work path value? cannot explicitly define files since these created @ run-time.

android:fullbackupcontent="@xml/mybackupscheme" 

where mybackupscheme example this:

<?xml version="1.0" encoding="utf-8"?> <full-backup-content>     <exclude domain="file" path="device-links.xml"/>     <exclude domain="file" path="*.tn-png"/>     <exclude domain="file" path="links/*.*"/>     <exclude domain="external" path="external-links/*.*" /> </full-backup-content> 

thanks in advance,

the official documentation says:

path: specifies file or folder include in or exclude backup. note that: this attribute not support wildcard or regex syntax.

so can't use wildcards.

but can use exclude exclude entire directories

<exclude> - specifies file or folder exclude during backup.

if have complex file structure, can implement own backupagent , overide onfullbackup method.

you can't express set of files want backup xml rules. in these rare cases, can implement backupagent overrides onfullbackup(fullbackupdataoutput) store want. retain system's default implementation, call corresponding method on superclass super.onfullbackup().


Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -