Export sharedPreferences to file

With the getAll function of sharedPreferences it is possible to save the shared preferences to a file. The following code example is probably the easyest way to do it. With the saveSharedPreferences method you can save all shared preferences a file to the root of your sdcard.

Make sure your App has the following permission. It allows the application to write to external storage.