I have a hash map table as below,
HashMap backUpCurency_values = new HashMap();
and i want to
You should just use a for-each loop and iterate through the map like this:
SharedPreferences.Editor editor = getSharedPreferences(PREFS_NAME, 0).edit();
for( Entry entry : backUpCurency_values.entrySet() )
editor.putString( entry.getKey(), entry.getValue() );
editor.commit();
Then when you need to get your values back for later use you do the following (provided that this SharedPreference-object is reserved for currency):
SharedPreferences prefs = getSharedPreferences(PREFS_NAME, 0);
for( Entry entry : prefs.getAll().entrySet() )
backUpCurency_values.put( entry.getKey(), entry.getValue().toString() );