I need to call a method (or start an activity, or something else) that will update a file containing data the app needs.
But I want it to be done only once, when the
You can do it by using SharedPrefrences . Look this:
SharedPrefrences
SharedPreferences ratePrefs = getSharedPreferences("First Update", 0); if (!ratePrefs.getBoolean("FrstTime", false)) { // Do update you want here Editor edit = ratePrefs.edit(); edit.putBoolean("FrstTime", true); edit.commit(); }