How to check/pass setting status
<p>I have a preferences class that allows the user to turn on 'hints' from the settings of the application:</p>

<pre><code>public class Prefs extends PreferenceActivity {
//Option names and defualt values
private static final String OPT_HINTS = "hints";
private static final boolean OPT_HINTS_DEF = true;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    addPreferencesFromResource(R.xml.settings);
}
/**Get the current value of the hints option */
public static boolean getHints(Context context) {
    return PreferenceManager.getDefaultSharedPreferences(context).getBoolean(OPT_HINTS, OPT_HINTS_DEF);

}
}
</code></pre>

<p>The xml file contains:</p>

<p></p>

<pre><code>&lt;CheckBoxPreference
    android:key="hints"
    android:title="@string/hints_title"
    android:summary="@string/hints_summary"
    android:defaultValue="true" /&gt;
</code></pre>

<p></p>

<p>How can I check if 'hints' is set On. Then if it is set On, I want to allow the application to do a certain thing.</p>

<p>thanks for any help</p>
