FileDocCategorySizeDatePackage
Settings.javaAPI DocAndroid 1.5 API123645Wed May 06 22:41:56 BST 2009android.provider

Settings

public final class Settings extends Object
The Settings provider contains global system-level device preferences.

Fields Summary
public static final String
ACTION_SETTINGS
Activity Action: Show system settings.

Input: Nothing.

Output: nothing.

public static final String
ACTION_APN_SETTINGS
Activity Action: Show settings to allow configuration of APNs.

Input: Nothing.

Output: nothing.

public static final String
ACTION_LOCATION_SOURCE_SETTINGS
Activity Action: Show settings to allow configuration of current location sources.

In some cases, a matching Activity may not exist, so ensure you safeguard against this.

Input: Nothing.

Output: Nothing.

public static final String
ACTION_WIRELESS_SETTINGS
Activity Action: Show settings to allow configuration of wireless controls such as Wi-Fi, Bluetooth and Mobile networks.

In some cases, a matching Activity may not exist, so ensure you safeguard against this.

Input: Nothing.

Output: Nothing.

public static final String
ACTION_AIRPLANE_MODE_SETTINGS
Activity Action: Show settings to allow entering/exiting airplane mode.

In some cases, a matching Activity may not exist, so ensure you safeguard against this.

Input: Nothing.

Output: Nothing.

public static final String
ACTION_SECURITY_SETTINGS
Activity Action: Show settings to allow configuration of security and location privacy.

In some cases, a matching Activity may not exist, so ensure you safeguard against this.

Input: Nothing.

Output: Nothing.

public static final String
ACTION_WIFI_SETTINGS
Activity Action: Show settings to allow configuration of Wi-Fi.

In some cases, a matching Activity may not exist, so ensure you safeguard against this.

Input: Nothing.

Output: Nothing.

public static final String
ACTION_WIFI_IP_SETTINGS
Activity Action: Show settings to allow configuration of a static IP address for Wi-Fi.

In some cases, a matching Activity may not exist, so ensure you safeguard against this.

Input: Nothing.

Output: Nothing.

public static final String
ACTION_BLUETOOTH_SETTINGS
Activity Action: Show settings to allow configuration of Bluetooth.

In some cases, a matching Activity may not exist, so ensure you safeguard against this.

Input: Nothing.

Output: Nothing.

public static final String
ACTION_DATE_SETTINGS
Activity Action: Show settings to allow configuration of date and time.

In some cases, a matching Activity may not exist, so ensure you safeguard against this.

Input: Nothing.

Output: Nothing.

public static final String
ACTION_SOUND_SETTINGS
Activity Action: Show settings to allow configuration of sound and volume.

In some cases, a matching Activity may not exist, so ensure you safeguard against this.

Input: Nothing.

Output: Nothing.

public static final String
ACTION_DISPLAY_SETTINGS
Activity Action: Show settings to allow configuration of display.

In some cases, a matching Activity may not exist, so ensure you safeguard against this.

Input: Nothing.

Output: Nothing.

public static final String
ACTION_LOCALE_SETTINGS
Activity Action: Show settings to allow configuration of locale.

In some cases, a matching Activity may not exist, so ensure you safeguard against this.

Input: Nothing.

Output: Nothing.

public static final String
ACTION_INPUT_METHOD_SETTINGS
Activity Action: Show settings to configure input methods, in particular allowing the user to enable input methods.

In some cases, a matching Activity may not exist, so ensure you safeguard against this.

Input: Nothing.

Output: Nothing.

public static final String
ACTION_USER_DICTIONARY_SETTINGS
Activity Action: Show settings to manage the user input dictionary.

In some cases, a matching Activity may not exist, so ensure you safeguard against this.

Input: Nothing.

Output: Nothing.

public static final String
ACTION_APPLICATION_SETTINGS
Activity Action: Show settings to allow configuration of application-related settings.

In some cases, a matching Activity may not exist, so ensure you safeguard against this.

Input: Nothing.

Output: Nothing.

public static final String
ACTION_APPLICATION_DEVELOPMENT_SETTINGS
Activity Action: Show settings to allow configuration of application development-related settings.

In some cases, a matching Activity may not exist, so ensure you safeguard against this.

Input: Nothing.

Output: Nothing.

public static final String
ACTION_QUICK_LAUNCH_SETTINGS
Activity Action: Show settings to allow configuration of quick launch shortcuts.

In some cases, a matching Activity may not exist, so ensure you safeguard against this.

Input: Nothing.

Output: Nothing.

public static final String
ACTION_MANAGE_APPLICATIONS_SETTINGS
Activity Action: Show settings to manage installed applications.

In some cases, a matching Activity may not exist, so ensure you safeguard against this.

Input: Nothing.

Output: Nothing.

public static final String
ACTION_SYSTEM_UPDATE_SETTINGS
Activity Action: Show settings for system update functionality.

In some cases, a matching Activity may not exist, so ensure you safeguard against this.

Input: Nothing.

Output: Nothing.

public static final String
ACTION_SYNC_SETTINGS
Activity Action: Show settings to allow configuration of sync settings.

In some cases, a matching Activity may not exist, so ensure you safeguard against this.

Input: Nothing.

Output: Nothing.

public static final String
ACTION_NETWORK_OPERATOR_SETTINGS
Activity Action: Show settings for selecting the network operator.

In some cases, a matching Activity may not exist, so ensure you safeguard against this.

Input: Nothing.

Output: Nothing.

public static final String
ACTION_DATA_ROAMING_SETTINGS
Activity Action: Show settings for selection of 2G/3G.

In some cases, a matching Activity may not exist, so ensure you safeguard against this.

Input: Nothing.

Output: Nothing.

public static final String
ACTION_INTERNAL_STORAGE_SETTINGS
Activity Action: Show settings for internal storage.

In some cases, a matching Activity may not exist, so ensure you safeguard against this.

Input: Nothing.

Output: Nothing.

public static final String
ACTION_MEMORY_CARD_SETTINGS
Activity Action: Show settings for memory card storage.

In some cases, a matching Activity may not exist, so ensure you safeguard against this.

Input: Nothing.

Output: Nothing.

private static final String
JID_RESOURCE_PREFIX
public static final String
AUTHORITY
private static final String
TAG
private static String
sJidResource
Constructors Summary
Methods Summary
public static java.lang.StringgetGTalkDeviceId(long androidId)
Returns the device ID that we should use when connecting to the mobile gtalk server. This is a string like "android-0x1242", where the hex string is the Android ID obtained from the GoogleLoginService.

param
androidId The Android ID for this device.
return
The device ID that should be used when connecting to the mobile gtalk server.
hide

        return "android-" + Long.toHexString(androidId);
    
public static synchronized java.lang.StringgetJidResource()
Returns the GTalk JID resource associated with this device.

return
String the JID resource of the device. It uses the device IMEI in the computation of the JID resource. If IMEI is not ready (i.e. telephony module not ready), we'll return an empty string.
hide

        if (sJidResource != null) {
            return sJidResource;
        }

        MessageDigest digest;
        try {
            digest = MessageDigest.getInstance("SHA-1");
        } catch (NoSuchAlgorithmException e) {
            throw new RuntimeException("this should never happen");
        }

        String imei = TelephonyManager.getDefault().getDeviceId();
        if (TextUtils.isEmpty(imei)) {
            return "";
        }

        byte[] hashedImei = digest.digest(imei.getBytes());
        String id = new String(Base64.encodeBase64(hashedImei), 0, 12);
        id = id.replaceAll("/", "_");
        sJidResource = JID_RESOURCE_PREFIX + id;
        return sJidResource;