I wouldn't use a cookie- you are banking then on hitting a service that is not nes there- the file system the android has should be able to be used- moreover I would code it so that *if there is an external chip (micro SD) then save, otherwise default to 0. you can also have it so exiting does not really exit, it just hides the activity- sleeps it and pulls the other stuff to the foreground- think of the email client; it is 'closed' but it is still open and excepting PUSH. once the program closes, any global variable is lost unless stored in the flash memory-
first hit on google of 'save to android NAND Java' ... the file system in use is called NAND; the language breaks down on the stack to Java- so it is native Java