Counting how many times my Android app has been opened

后端 未结 8 1275
遇见更好的自我
遇见更好的自我 2020-12-18 07:22

I am developing an android app and I want to know how many times it has been opened. Is there a way to do this?

8条回答
  •  清歌不尽
    2020-12-18 07:46

    1. For a simple approach, keep a text file where you increment the value by 1, after reading it. Keep the count increment on OnCreate() method of Activity

    2. You can use SharedPreference.

    3. Well DataBase can also be used...but i think that too over-kill for this....

提交回复
热议问题