Counting application usage in Android

前端 未结 4 1511
南笙
南笙 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:00

    Write to a SharedPreferance onCreate. It won't be a very accurate count since onCreate is called at times other than only application start-up, but it'll be a reasonably good figure.

    If you offer more details as to why you're doing this, you may get a more detailed answer.

提交回复
热议问题