android-backup-service

part-1 persistent foreGround android service that starts by UI, works at sleep mode too, also starts at phone restart

六眼飞鱼酱① 提交于 2019-11-29 02:01:27
Status:--- I equally accept Karakuri's and Sharad Mhaske's answer , but since Sharad Mhaske answer after the start of bounty , the bounty should go to him. Part-2 made: part-2 persistent foreGround android service that starts by UI, works at sleep mode too, also starts at phone restart In stack overflow , only one answer may be accepted . I see both answers as acceptable but one has to be chosen (I chosed at random). Viewers are invited to up/down vote answers/question to appreciate the effort! . I upvoted Karakuri's answer to compensate reputation. Scenario:--- I want to make the user click a

BackupManager Not Calling Backup Transport

北城以北 提交于 2019-11-28 18:45:40
Alright, so I'm trying to implement Data Backup into my application, and have been following this guide . I've implemented my BackupAgentHelper using a SharedPreferencesBackupHelper . I don't get any errors, and I'm being sure to call dataChanged() after all preference changes, but when I test the backup (`adb shell bmgr run) I get this information in LogCat: 07-07 12:29:00.258: V/BackupManagerService(291): Scheduling immediate backup pass 07-07 12:29:00.258: V/BackupManagerService(291): Running a backup pass 07-07 12:29:00.258: V/BackupManagerService(291): clearing pending backups 07-07 12:29

part-1 persistent foreGround android service that starts by UI, works at sleep mode too, also starts at phone restart

自作多情 提交于 2019-11-27 15:00:02
问题 Status:--- I equally accept Karakuri's and Sharad Mhaske's answer , but since Sharad Mhaske answer after the start of bounty , the bounty should go to him. Part-2 made: part-2 persistent foreGround android service that starts by UI, works at sleep mode too, also starts at phone restart In stack overflow , only one answer may be accepted . I see both answers as acceptable but one has to be chosen (I chosed at random). Viewers are invited to up/down vote answers/question to appreciate the

BackupManager Not Calling Backup Transport

南楼画角 提交于 2019-11-27 11:50:20
问题 Alright, so I'm trying to implement Data Backup into my application, and have been following this guide. I've implemented my BackupAgentHelper using a SharedPreferencesBackupHelper . I don't get any errors, and I'm being sure to call dataChanged() after all preference changes, but when I test the backup (`adb shell bmgr run) I get this information in LogCat: 07-07 12:29:00.258: V/BackupManagerService(291): Scheduling immediate backup pass 07-07 12:29:00.258: V/BackupManagerService(291):

In android is there any way to preserve SharedPreferences after an uninstall

扶醉桌前 提交于 2019-11-27 07:51:20
I am keeping some application meta data in SharedPreferences . Whenever I uninstall the application and reinstall it, the SharedPreferences are deleted. Is there any way to get that to remain, so that if the user does an uninstall and reinstall, they can recover their old data? You should add a BackupAgentHelper to your app. Together with the SharedPreferenceBackupHelper , it backups the SharedPreferences to the cloud (if the device supports it). When the app is reinstalled the data is restored. See: BackupAgentHelper SharedPreferenceHelper (contains all the code you need to implement it)

What is “android:allowBackup”?

独自空忆成欢 提交于 2019-11-27 05:54:23
Since the new ADT preview version (version 21) , they have a new lint warning that tells me the next thing on the manifest file (in the application tag): Should explicitly set android:allowBackup to true or false (it's true by default, and that can have some security implications for the application's data) In the official website , they've written: A couple of new checks: you must explicitly decide whether your app allows backups, and a label check. There's a new command line flag for setting the library path. Many improvements to the incremental lint analysis while editing. What is this

Android - Preserve or delete files created by the application on uninstall

纵饮孤独 提交于 2019-11-27 01:26:16
I created an application which creates and stores files to sdcard. Is there a way to bind the folder with application in order to delete all files when the user runs uninstall on android device? Prashast There's no way for your application to know that it is being uninstalled (without modifying the kernel). All files created in the data/data/your.app.package is deleted automatically upon application uninstall. I don't think anything is cleared from the sdcard. You can do a quick test and find that out. Another approach could be to have another application that checks whether this application

Android backup/restore: how to backup an internal database?

对着背影说爱祢 提交于 2019-11-26 00:57:42
问题 I have implemented a BackupAgentHelper using the provided FileBackupHelper to backup and restore the native database I have. This is the database you typically use along with ContentProviders and which resides in /data/data/yourpackage/databases/ . One would think this is a common case. However the docs aren\'t clear on what to do: http://developer.android.com/guide/topics/data/backup.html. There is no BackupHelper specifically for these typical databases. Hence I used the FileBackupHelper ,