title: Android Backup of ENTIRE SharedPreferences file
body: <p>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 <code>MyPrefsBackup</code> class.  </p>
  
  <pre><code>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 backup agent
  
    public  void onCreate() {
  
          SharedPreferencesBackupHelper helper = new SharedPreferencesBackupHelper(this, PREFS);
          addHelper(PREFS_BACKUP_KEY, helper);
  
  
      }
  </code></pre>
  
  <p>I think I have finally realized that the <code>PREFS_BACKUP_KEY</code> actually has to be the specific key that I stored the data under.  I was just using "prefs" so I think that's why no data was being backed up.  However, I am storing quite a bit of data in the <code>SharedPreferences</code> file so how can I go ahead and save the entire <code>SharedPreferences</code> files without specifiying every individual key.  (some keys are generated by the app so I don't even know if they are in use until the user inputs their data).  </p>
  
  <p>I want to know is there a way to just tell the <code>BackupHelper</code> class to backup the entire <code>SharedPreferences</code> file?</p>