Domanda

Following are the requirements for creating a file in my Android application

1.File will be created when the application is launched at first time and write 0 to the file

2.whenever the application is opened, first read from the file and then based on that value a new value will be written to the file.

please help me.

È stato utile?

Soluzione

I suggest you read this ...

From what you're asking, I think Shared Preferences are the way to go, since it looks like you just want to store an int value.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top