Dbrant has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/350232 )
Change subject: Allow backup of app database. ...................................................................... Allow backup of app database. This allows the system to back up our app's database to the user's Google account.[1] This means that if the user performs a backup of their device, and then uninstalls/reinstalls our app (or resets their device), the database should be restored automatically. The user will then regain access to their previously-saved reading lists and browsing history, which at least partially addresses our users' needs for reading lists to be persisted across app installs. Note that this instructs the system to ONLY back up the database, and not any of the app's other files, such as the contents of saved pages, which can be quite large, and exceed Google's 25MB limit for app backups. This also does NOT back up the app's SharedPreferences, which can contain the user's login credentials, and could present a security issue if backed up. For testing the backup functionality, see [2]. [1] https://developer.android.com/guide/topics/data/autobackup.html [2] https://developer.android.com/guide/topics/data/testingbackup.html Bug: T130331 Change-Id: Ie659913abd51e6312571e281842707a5fcc0eec6 --- M app/src/main/AndroidManifest.xml A app/src/main/res/xml/full_backup_rules.xml 2 files changed, 6 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/32/350232/1 diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index cf060f0..c4abf5b 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -45,7 +45,8 @@ <uses-feature android:name="android.hardware.touchscreen" android:required="false" /> <application - android:allowBackup="false" + android:allowBackup="true" + android:fullBackupContent="@xml/full_backup_rules" tools:replace="android:allowBackup" android:supportsRtl="true" android:icon="@mipmap/launcher" diff --git a/app/src/main/res/xml/full_backup_rules.xml b/app/src/main/res/xml/full_backup_rules.xml new file mode 100644 index 0000000..3c8329e --- /dev/null +++ b/app/src/main/res/xml/full_backup_rules.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<full-backup-content> + <include domain="database" path="wikipedia.db"/> +</full-backup-content> \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/350232 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie659913abd51e6312571e281842707a5fcc0eec6 Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Dbrant <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
