i have my app's signup type page which is use for getting details of user and i have made it to run for one time only using sharedpreferences method but i got one problem that if user close that app during filling of details than that activity is not coming again.
setContentView(R.layout.register_data);
getSharedPreferences("PREFERENCE", MODE_PRIVATE)
boolean isFirstRun = getSharedPreferences("PREFERENCE",MODE_PRIVATE).getBoolean("isFirstRun", true);
if (isFirstRun){
startActivity(new Intent(MainActivity.this, RegisterDetail.class));
.edit()
.putBoolean("isFirstRun", false)
.apply();
}