Shared Preferences in Android using check box
<p>I have a preference file which uses checkboxes and i want to use it to determine when it been checked or not. However in the code itself, there is already a boolean statement. please check this:</p>

<pre><code>String key = LocationManager.KEY_PROXIMITY_ENTERING;



    Boolean enteringRegion = intent.getBooleanExtra(key, false);

    if (enteringRegion){
        Log.d(getClass().getSimpleName(), "entering");
    }
    else{
        Log.d(getClass().getSimpleName(), "exiting");
    }


boolean enteringRegions = prefs.getBoolean("alarm_entering", true);
     boolean exitRegion = prefs.getBoolean("alarm_exiting", false);
</code></pre>
