计数多少次,我的Andr​​oid应用程序已经打开 [英] Counting how many times my Android app has been opened

查看:111
本文介绍了计数多少次,我的Andr​​oid应用程序已经打开的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发一个Android应用程序,我想知道有多少次它已经打开。有没有办法做到这一点?

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?

推荐答案

1 对于一个简单的方法,保持文本文件,你通过数值加1,看完后。保持数量上的增加的OnCreate()活动的方法

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 您可以使用共享preference

3。数据库也可以用来...但我觉得太过分杀作为这....

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

这篇关于计数多少次,我的Andr​​oid应用程序已经打开的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆