My application requires connection to a server, hence it will not work without set preferences. The preferences are set using SharedPreferences. What I am looking for is a pattern to direct the user to the settings activity. What is common?
Currently I am checking on onCreate and onResume whether all preferences are set, otherwise I start the settings activity. The problem is:
- the activity is started twice (through
onCreateandonResume) - the user might not know that he/she can go back to the main activity with the back hardware key
Any suggestions to implement this?
create a LauncherActivity class where you can make the decision which Activity should start – PreferenceActivity, or MainActivity: check this advice also
And if user “registered” then set the PREFS_REG to true in
onActivityResult()