Reputation: 15986
Manifest:
<manfiest package="com.backme" ... />
<application android:backupAgent="PrefsBackupAgent" .../>
<meta-data
android:name="com.google.android.backup.api_key"
android:value="12345...." />
Code:
public class PrefsBackupAgent extends BackupAgentHelper {
@Override
public void onCreate() {
Log.d("PrefsBackupAgent","Backingup");
SharedPreferencesBackupHelper helper = new SharedPreferencesBackupHelper(this, PlacesConstants.SHARED_PREFERENCE_FILE);
addHelper(PlacesConstants.SP_KEY_FOLLOW_LOCATION_CHANGES, helper);
}
}
Does it matter that my PrefsBackupAgent
is not at the top level of com.backme
but at com.backme.utils
? And FYI, I'm not seeing the "Backingup" in the logs.
Upvotes: 2
Views: 315