사용자가 처음 설치했을 때 한 번만 열어야하는 help_view가 있습니다. 사용자가 응용 프로그램을 제거하고 다시 설치하면보기가 표시되어야합니다.SharedPreferences 삽입 및 업데이트
공유 환경 설정으로 구현하려고했습니다. 아래 코드를 참조하십시오.
private void gotoMainActivity() {
SharedPreferences helpinfo = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
SharedPreferences.Editor editor = helpinfo.edit();
boolean help = helpinfo.getBoolean("help", false);
if(help==false){
Intent intent = new Intent(this.getApplicationContext(),HelpActivity.class);
startActivity(intent);
}else{
Intent intent = new Intent(this.getApplicationContext(), MainActivity.class);
startActivity(intent);
}
}
처음 로그인 할 때 공유 환경 설정을 업데이트해야한다는 것을 알고 있습니다. 도와주세요.