thanks, the problem was the path I entered to get to the file I was checking :)
once again thanks for the efficiency and the fast answering :) thank you so much for you help On Fri, Jan 15, 2016 at 6:59 PM Dawid Drozd <[email protected]> wrote: > File.exist() > > On Fri, Jan 15, 2016 at 6:39 PM, Pedro CLR <[email protected]> wrote: > >> 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 >> <https://groups.google.com/d/msgid/android-developers/c3d90503-c5c5-491f-90f4-bc31fdb80d0a%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > Pozdrawiam > Dawid Drozd. > > -- > You received this message because you are subscribed to a topic in the > Google Groups "Android Developers" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/android-developers/OTPxf1yFFq4/unsubscribe > . > To unsubscribe from this group and all its topics, 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/CAM-qR1a06J2zi_iPxUS%3DmkDW8X78uAMpqScfz8FindkVQARYcA%40mail.gmail.com > <https://groups.google.com/d/msgid/android-developers/CAM-qR1a06J2zi_iPxUS%3DmkDW8X78uAMpqScfz8FindkVQARYcA%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- cumprimentos, #pedrocesar.lr -- 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/CAHBAdRgGvJFAtNaFYY%3DfTDAcBo466n3DKj%2BhbigqJxOOta%2BNwA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.

