private void handleIntent(final Bundle savedInstanceState) {
        if (savedInstanceState == null) {
            final Intent intent = getIntent();
            final String action = intent.getAction();
            boolean found = false;
            if (Intents.ACTION_SETTINGS.equals(action)) {
                // user selected a search suggestion
                openRequestedFragment(intent.getStringExtra(SearchManager.QUERY));
                found = true;
            } else if (Intent.ACTION_SEARCH.equals(action)) {
                // user pressed enter in searchfield => search first pref matching this search string
                final String query = intent.getStringExtra(SearchManager.QUERY);
                synchronized (searchIndex) {
                    for (BasePreferenceFragment.PrefSearchDescriptor item : searchIndex) {
                        if (StringUtils.containsIgnoreCase(item.prefTitle, query) || StringUtils.containsIgnoreCase(item.prefSummary, query)) {
                            openRequestedFragment(item.baseKey, item.prefKey);
                            found = true;
                            break;
                        }
                    }
                }
            } else {
                // Uri starting with "cgeo-setting://" + prefKey value
                final String data = intent.getDataString();
                final String scheme = getString(R.string.settings_scheme) + "://";
                if (data != null && data.startsWith(scheme)) {
                    final String prefKey = data.substring(scheme.length()).replaceAll("[^A-Za-z0-9_]+", " ").trim();
                    if (StringUtils.isNotBlank(prefKey)) {
                        Log.d("external link to: cgeo-settings://" + prefKey);
                        openRequestedFragment(prefKey);
                        found = true;
                    }
                }
            }
            if (!found) {
                openRequestedFragment("");
            }
        } else {
            title = savedInstanceState.getCharSequence(TITLE_TAG);
        }
    }
An {@link AppCompatActivity} that presents a set of application settings. On
handset devices, settings are presented as a single list. On tablets,
settings are split by category, with category headers shown to the left of
the list of settings.
<p>
See <a href="http://developer.android.com/design/patterns/settings.html"> Android Design: Settings</a> for design
guidelines and the <a href="http://developer.android.com/guide/topics/ui/settings.html">Settings API Guide</a> for
more information on developing a Settings UI.
main/src/main/java/cgeo/geocaching/settings/SettingsActivity.java