Counting application usage in Android

前端 未结 4 1515
南笙
南笙 2021-01-20 13:18

Can anyone help me determine how to count how many times an application has been used in Android?

4条回答
  •  旧巷少年郎
    2021-01-20 14:12

    You could have a file which stores one number, not on the SD card but locally for your app. Then open this and increment the number in your onCreate method. You can also keep track of when they do other things but don't actually close it with onPause and onResume... There might be another way to save data without explicitly creating a file...

提交回复
热议问题