Code example for JSONArray

Methods: toString

0
    } 
 
    // Initialize preferences by sending the "Preferences:Get" command to Gecko 
    private void initValues() { 
        JSONArray jsonPrefs = new JSONArray(mPreferencesList);
 
        GeckoEvent event = GeckoEvent.createBroadcastEvent("Preferences:Get", jsonPrefs.toString());
        GeckoAppShell.sendEventToGecko(event);
    } 
 
    private void initGroups(PreferenceGroup preferences) {
        final int count = preferences.getPreferenceCount();
        for (int i = 0; i < count; i++) {
            Preference pref = preferences.getPreference(i);
            if (pref instanceof PreferenceGroup)
                initGroups((PreferenceGroup)pref);
            else { 
                pref.setOnPreferenceChangeListener(this);
                mPreferencesList.add(pref.getKey());
            } 
        }