android-backup-service

An error occurred while executing doInBackground() for keyclock authService.performTokenRequest() function

左心房为你撑大大i 提交于 2021-02-08 10:38:46
问题 While integrating Keyclock SDK , I try to exchange authorization code to access token authService.performTokenRequest( resp.createTokenExchangeRequest(), new AuthorizationService.TokenResponseCallback() { @Override public void onTokenRequestCompleted( TokenResponse resp, AuthorizationException ex) { if (resp != null) { // exchange succeeded } else { // authorization failed, check ex for more details } } }); I got the following error, java.lang.RuntimeException: An error occurred while

Android Backup of ENTIRE SharedPreferences file

三世轮回 提交于 2020-02-28 08:38:31
问题 I have been trying to get the backup of my sharedpreferences file in my Android app working and so far it is not. I am using the simple Google code from the developer's guide. Below is the code for the MyPrefsBackup class. public class MyPrefsBackup extends BackupAgentHelper { // The name of the SharedPreferences file static final String PREFS = "UserDB"; // A key to uniquely identify the set of backup data static final String PREFS_BACKUP_KEY = "prefs"; // Allocate a helper and add it to the

Where is this ParcelFileDescriptor Leak Occurring?

让人想犯罪 __ 提交于 2020-01-14 10:32:47
问题 I have implemented a BackupAgent following the guidelines for Data Backup. The code behaves as expected until StrictMode.VmPolicy is set to detect leaked closeable objects. After a backup is performed and GC occurs, CloseGuard reports a leaked ParcelFileDescriptor with this stack trace: 06-28 21:47:39.683 25072-25081/com.qbix.nub E/StrictMode﹕ A resource was acquired at attached stack trace but never released. See java.io.Closeable for information on avoiding resource leaks. java.lang

Where is this ParcelFileDescriptor Leak Occurring?

时光总嘲笑我的痴心妄想 提交于 2020-01-14 10:32:29
问题 I have implemented a BackupAgent following the guidelines for Data Backup. The code behaves as expected until StrictMode.VmPolicy is set to detect leaked closeable objects. After a backup is performed and GC occurs, CloseGuard reports a leaked ParcelFileDescriptor with this stack trace: 06-28 21:47:39.683 25072-25081/com.qbix.nub E/StrictMode﹕ A resource was acquired at attached stack trace but never released. See java.io.Closeable for information on avoiding resource leaks. java.lang

Examples of application, used Android Backup Services

送分小仙女□ 提交于 2020-01-01 05:47:06
问题 Do you know of any Android applications (open source, if it's possible), which uses the Android Backup Service? I need examples of how the Backup Service can be used in real applications. 回答1: Here is a list of some open-sourced apps with Android Backup implemented: Triple Solitaire (github sources, Google Play) KTodo (github sources, Google Play) Penroser (github sources, Google Play) SeriesGuide Show Manager (github sources, Google Play) ServiceDroid (github sources, Google Play) Awful

Android 6.0 app backup error

喜欢而已 提交于 2019-12-24 15:29:00
问题 When I try to backup with auto backup I only get this error message in logcat. How to solve it? I don't find anywhere to see the legal text.. :/ Attempt to do full backup on <mypackage> [ 10-31 21:17:30.360 1633: 1678 V/GmsBackupTransport ] Rejecting full data backup. user has not seen up to date legal text Thanks! 来源: https://stackoverflow.com/questions/33456266/android-6-0-app-backup-error

Android BackupManager not restoring after uninstall or other devices?

▼魔方 西西 提交于 2019-12-24 13:16:05
问题 I am using the BackupManager to backup SharedPreferences to the cloud. Now this works as expected when I use it on a single device and only perform a reinstall not a full uninstall. To do that I am clearing data which wipes prefs and than reinstalling the app from eclipse. If I first uninstall the app and after reinstall it the restore call reports no data to restore. The same happens when I install the app on another device. From my understanding I would expect the data to be restored to any

BackupAgentHelper: onRestore not getting called

醉酒当歌 提交于 2019-12-24 08:48:14
问题 I installed the example BackupRestore from this link. https://android.googlesource.com/platform/development/+/0b3758ea4e53f9bfd0b112eaa4a7dd7b7f4040f5/samples/BackupRestore?autodive=0%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F I am unable to restore the data. OnBackup and OnCreate get called, but OnRestore does not. I am able to backup: OnCreate and OnBackup get hit, but OnRestore does not. @Override public void onRestore(BackupDataInput data, int appVersionCode, ParcelFileDescriptor newState) throws