private SharedPreferences mPref;
public static final String PREFS_NAME = "YourPrefName";
int c;
mPref = getSharedPreferences(PREFS_NAME, Context.MODE_PRIVATE);
c = mPref.getInt("numRun", 0);
Log.i("TAG", "Number of count of open App:" + c);
c++;
mPref.edit().putInt("numRun", c).commit();
Log.i("TAG", "Number of count after commit of open App:" + c);
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.