public static boolean isAutoScanEnabled(Context context){
  final SharedPreferences prefs=PreferenceManager.getDefaultSharedPreferences(context);
  return prefs.getBoolean(context.getString(R.string.pref_key_auto_scan_enabled),Boolean.parseBoolean(context.getString(R.string.pref_auto_scan_default_value)));
}

public static boolean isAutoScanEnabled ( Context context ) { final SharedPreferences prefs = PreferenceManager . getDefaultSharedPreferences ( context ) ; return prefs . getBoolean ( context . getString ( R . string . pref_key_auto_scan_enabled ) , Boolean . parseBoolean ( context . getString ( R . string . pref_auto_scan_default_value ) ) ) ; }
check if auto - scanning is enabled
