Android's NSUserDefaults


//--Init
int myvar = 12;


//--SAVE Data
SharedPreferences preferences = context.getSharedPreferences("MyPreferences", MODE_PRIVATE);  
SharedPreferences.Editor editor = preferences.edit();
editor.putInt("var1", myvar);
editor.commit();


//--READ data       
myvar = preferences.getInt("var1", 0);