I was asked by my employers to developed a webview-based app.

> MainActivity will just check if there's already a SharedPreferences file 
saved:
  - if true, loads the information on that file;
       > I also check if the URL registered in that file is an empty value 
(""), in which case I launch the UrlActivity.
       > Else, it should launch the WebActivity (NEVER DOES IT)
  - else, loads the UrlActivity for the user to type the URL to load the 
content on the WebView.

> UrlActivity should just be launched in cases where there's no valid URL 
saved to the SharedPreferences, or in case there's no SharedPreferences yet 
(e.g., first use of the App).

> WebActivity should be launched either by the UrlActivity (which it does, 
successfully enough), or directly by the MainActivity in case there's 
already a URL in the SharedPreferences (NEVER HAPPENS).

-> wether the web page is loaded or not is also taken care of, because 
after receiving the stored URL or the one from the EditText view in 
UrlActivity I check for it's validity.

My question is how can I make sure that the SharedPreferences file is 
created and remains where it should, unless the user specifically says 
otherwise (e.g., a menu option in the AppBar menu in which case the user 
clicks and clears the SharedPreferences file)?

Please, I really could use some help, I'm starting to become desperate as 
the deadline is almost here and I'm still stuck with this sort of 
details... :s

Thanks in advance.

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/c3d90503-c5c5-491f-90f4-bc31fdb80d0a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to