Here is how you can save values automatically in android XD
supeeeeer easy.
http://sparckmanforums.weebly.com/uploads/2/2/1/3/22134242/6011152_orig.jpg

auto_save.mfa