Android Open Source - GeoNote Settings






From Project

Back to project page GeoNote.

License

The source code is released under:

Apache License

If you think the Android project GeoNote listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package geonote.app;
//from  w ww.  j  a v a2s  . com
import android.content.Context;
import android.content.SharedPreferences;
import android.preference.PreferenceManager;

public class Settings {

    private final Context mContext;
    SharedPreferences mPreferences = null;

    public Settings(Context context) {
        mContext = context;
        mPreferences = PreferenceManager.getDefaultSharedPreferences(context);
    }

    public boolean shouldShowDetailViewWhenZoomedIn() {
        return mPreferences.getBoolean(
                mContext.getString(R.string.map_show_detail_view_when_zoomed_in),
                true);
    }

    public boolean isNotificationsEnabled() {
        return mPreferences.getBoolean(
                mContext.getString(R.string.enable_notifications),
                true);
    }

    public int getGeoFenceRadius() {
        try {
            return Integer.parseInt(mPreferences.getString(
                    mContext.getString(R.string.geo_fence_radius),
                    "100"));
        }
        catch (NumberFormatException e)
        {
            return 100;
        }
    }
}




Java Source Code List

geonote.app.ApplicationTest.java
geonote.app.Constants.java
geonote.app.DownloadMapImageTask.java
geonote.app.GeoFenceWatcherService.java
geonote.app.GooglePlaces.java
geonote.app.NoteInfoWindowAdapter.java
geonote.app.NoteInfo.java
geonote.app.NotesRepository.java
geonote.app.Settings.java
geonote.app.Activity.LoginActivity.java
geonote.app.Activity.MainActivity.java
geonote.app.Activity.MapsActivityIntentHandler.java
geonote.app.Activity.NoteViewActivity.java
geonote.app.Activity.PlusBaseActivity.java
geonote.app.Activity.SettingsActivity.java
geonote.app.Fragments.MapViewFragment.java
geonote.app.Fragments.NoteListFragment.java
geonote.app.Fragments.SettingsFragment.java
geonote.app.Model.PlaceDetails.java
geonote.app.Model.Place.java
geonote.app.Model.PlacesList.java