In my android application ,user has to register by agreeing the terms and condition giving their email id. If user upgrade the application to next version, I should not get the
You could use SharedPreferences
class VersionInfo {
private VersionInfo() {}
private static final String PREF_VERCODE = "VERCODE";
public static final VersionInfo INSTANCE = new VersionInfo();
void setVersionCode(Context ctx, int ver) {
PreferenceManager.getDefaultSharedPreferences(ctx).edit().putInt(PREF_VERCODE, ver).commit();
}
int getVersionInfo(Context ctx) {
PreferenceManager.getDefaultSharedPreferences(ctx).getInt(PREF_VERCODE, 1);
}
}