Java tutorial
//package com.java2s; //License from project: Open Source License import android.content.Context; import android.preference.PreferenceManager; import android.text.TextUtils; public class Main { public static boolean isSyncConfigured(Context context) { String syncSource = PreferenceManager.getDefaultSharedPreferences(context).getString("syncSource", ""); if (TextUtils.isEmpty(syncSource)) return false; else return true; } }