Use adb logcat, DDMS, or the DDMS perspective in Eclipse to examine
LogCat and look at the stack trace associated with your "crash".

On Tue, Mar 29, 2011 at 2:55 PM, agrosner <agros...@fordham.edu> wrote:
> okay so here it is:
> public static boolean getGPSOption(Context context){
>                return
> PreferenceManager.getDefaultSharedPreferences(context).getBoolean(GPS_SENSOR,
> true);
>        }
> this seems to work perfectly when it is selected in preferences, but
> when I try to access it in another class by
> XYZ = Prefs.getGPSOption(this);
> and the option is deselected, My application crashes.
>
> Why is it only working for true values (ie when the checkboxpreference
> is selected) and not false?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to *Advanced* Android Development_ Version
1.9.2 Available!

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to