How can I execute something just once per application start?

前端 未结 10 1398
感情败类
感情败类 2020-11-28 06:45

I\'d like to implement an update checker in an application, and I obviously only need this to show up once when you start the application. If I do the call in the onCr

10条回答
  •  挽巷
    挽巷 (楼主)
    2020-11-28 07:22

    Yes you can do it Using SharedPrefernce concept of android. Just create a boolean flag and save it in SharedPrefernce and check its value in your onCreate() method .

提交回复
热议问题