I am using this code in main activity for display Registration detail page only one time.

```
setContentView(R.layout.register_data);
startActivity(new Intent(RegisterDetail.this, MainActivity.class));

getSharedPreferences("PREFERENCE", MODE_PRIVATE)
boolean isFirstRun = getSharedPreferences("PREFERENCE", MODE_PRIVATE).getBoolean("isFirstRun", true);
if (isFirstRun){
    .edit()
    .putBoolean("isFirstRun", false)
    .apply();
}

```

but I have problem. If some one close app without submit details and reopen app, that page doesn't display.
I want to display `register_data` page until user doesn't submit details.