You should use SharedPreferences for saving this type of information and you can lock/unlock messages in init time.
Storing value you can do something like this:
SharedPreferences prefs = this.getSharedPreferences("com.example.app", Context.MODE_PRIVATE);
prefs.edit().putBoolean("value_name", true).commit();
And reading value:
boolean value = prefs.getBoolean("value_name", false);