문제

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.

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top