确定是否Android应用程序是使用第一次 [英] Determine if android app is the first time used

查看:99
本文介绍了确定是否Android应用程序是使用第一次的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在开发一个Android应用程序。我需要做的,当应用程序启动的第一次,也就是code只能运行在第一次程序启动的东西。

I am currently developing an android app. I need to do something when the app is launched for the first time, i.e. the code only runs on the first time the program is launched.

推荐答案

另一个想法是在共享preferences使用的设置。同样的总体思路是检查一个空文件,但你没有一个空文件左右浮动,而不是被用来存储任何

Another idea is to use a setting in the Shared Preferences. Same general idea as checking for an empty file, but then you don't have an empty file floating around, not being used to store anything

这篇关于确定是否Android应用程序是使用第一次的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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