Added in API level 19

Carriers


class Carriers : BaseColumns
kotlin.Any
   ↳ android.provider.Telephony.Carriers

Carriers class contains information about APNs, including MMSC information.

Summary

Constants
static String

Sets whether the PDU session brought up by this APN should always be on.

static String

APN name.

static String

Authentication type.

static String

Radio Access Technology info.

static String

Is this APN enabled?

static String

A unique carrier id associated with this APN TelephonyManager#getSimCarrierId() In case of matching carrier information, this should be used by default instead of those fields of MCC, MNC, NUMERIC, MVNO_TYPE, MVNO_MATCH_DATA, etc.

static String

Is this the current APN?

static String

The default sort order for this table.

static String

Mobile Country Code (MCC).

static String

MMSC URL.

static String

MMS proxy port.

static String

MMS proxy address.

static String

Mobile Network Code (MNC).

static String

The MTU (maximum transmit unit) size of the mobile interface for IPv4 to which the APN is connected, in bytes.

static String

The MTU (maximum transmit unit) size of the mobile interface for IPv6 to which the APN is connected, in bytes.

static String

MVNO data.

static String

MVNO type: SPN (Service Provider Name), IMSI, GID (Group Identifier Level 1).

static String

Entry name.

static String

Radio technology (network type) bitmask.

static String

Numeric operator ID (as String).

static String

APN password.

static String

Proxy port.

static String

The protocol to use to connect to this APN.

static String

Proxy address.

static String

The protocol to use to connect to this APN when roaming.

static String

Server address.

static String

The subscription to which the APN belongs to

static String

Comma-delimited list of APN types.

static String

APN username.

static String

true if the user allowed to edit this APN, false otherwise.

static String

true if this APN visible to the user, false otherwise.

Inherited constants
Properties
static Uri

The content:// style URL for this table.

static Uri

The content:// style URL for this table.

Constants

ALWAYS_ON

Added in API level 35
static val ALWAYS_ON: String

Sets whether the PDU session brought up by this APN should always be on. See 3GPP TS 23.501 section 5.6.13

Type: INTEGER

Value: "always_on"

APN

Added in API level 19
static val APN: String

APN name.

Type: TEXT

Value: "apn"

AUTH_TYPE

Added in API level 19
static val AUTH_TYPE: String

Authentication type.

Type: INTEGER

Value: "authtype"

BEARER

Added in API level 19
Deprecated in API level 28
static val BEARER: String

Deprecated: this column is no longer supported, use NETWORK_TYPE_BITMASK instead

Radio Access Technology info. To check what values are allowed, refer to android.telephony.ServiceState. This should be spread to other technologies, but is currently only used for LTE (14) and eHRPD (13).

Type: INTEGER

Value: "bearer"

CARRIER_ENABLED

Added in API level 19
static val CARRIER_ENABLED: String

Is this APN enabled?

Type: INTEGER (boolean)

Value: "carrier_enabled"

CARRIER_ID

Added in API level 29
static val CARRIER_ID: String

A unique carrier id associated with this APN TelephonyManager#getSimCarrierId() In case of matching carrier information, this should be used by default instead of those fields of MCC, MNC, NUMERIC, MVNO_TYPE, MVNO_MATCH_DATA, etc.

Type: STRING

Value: "carrier_id"

CURRENT

Added in API level 19
static val CURRENT: String

Is this the current APN?

Type: INTEGER (boolean)

Value: "current"

DEFAULT_SORT_ORDER

Added in API level 19
static val DEFAULT_SORT_ORDER: String

The default sort order for this table.

Value: "name ASC"

MCC

Added in API level 19
Deprecated in API level 29
static val MCC: String

Deprecated: Use SIM_APN_URI to query APN instead, this API will return matching APNs based on current subscription carrier, thus no need to specify MCC and other carrier matching information. In the future, Android will not support MCC for APN query.

Mobile Country Code (MCC).

Type: TEXT

Value: "mcc"

MMSC

Added in API level 19
static val MMSC: String

MMSC URL.

Type: TEXT

Value: "mmsc"

MMSPORT

Added in API level 19
static val MMSPORT: String

MMS proxy port.

Type: TEXT

Value: "mmsport"

MMSPROXY

Added in API level 19
static val MMSPROXY: String

MMS proxy address.

Type: TEXT

Value: "mmsproxy"

MNC

Added in API level 19
Deprecated in API level 29
static val MNC: String

Deprecated: Use SIM_APN_URI to query APN instead, this API will return matching APNs based on current subscription carrier, thus no need to specify MNC and other carrier matching information. In the future, Android will not support MNC for APN query.

Mobile Network Code (MNC).

Type: TEXT

Value: "mnc"

MTU_V4

Added in API level 35
static val MTU_V4: String

The MTU (maximum transmit unit) size of the mobile interface for IPv4 to which the APN is connected, in bytes.

Type: INTEGER

Value: "mtu_v4"

MTU_V6

Added in API level 35
static val MTU_V6: String

The MTU (maximum transmit unit) size of the mobile interface for IPv6 to which the APN is connected, in bytes.

Type: INTEGER

Value: "mtu_v6"

MVNO_MATCH_DATA

Added in API level 19
Deprecated in API level 29
static val MVNO_MATCH_DATA: String

Deprecated: Use SIM_APN_URI to query APN instead, this API will return matching APNs based on current subscription carrier, thus no need to specify MVNO_MATCH_DATA and other carrier matching information. In the future, Android will not support MVNO_MATCH_DATA for APN query.

MVNO data. Use the following examples.

  • SPN: A MOBILE, BEN NL, ...
  • IMSI: 302720x94, 2060188, ...
  • GID: 4E, 33, ...

Type: TEXT

Value: "mvno_match_data"

MVNO_TYPE

Added in API level 19
Deprecated in API level 29
static val MVNO_TYPE: String

Deprecated: Use SIM_APN_URI to query APN instead, this API will return matching APNs based on current subscription carrier, thus no need to specify MVNO_TYPE and other carrier matching information. In the future, Android will not support MVNO_TYPE for APN query.

MVNO type: SPN (Service Provider Name), IMSI, GID (Group Identifier Level 1).

Type: TEXT

Value: "mvno_type"

NAME

Added in API level 19
static val NAME: String

Entry name.

Type: TEXT

Value: "name"

NETWORK_TYPE_BITMASK

Added in API level 28
static val NETWORK_TYPE_BITMASK: String

Radio technology (network type) bitmask. To check what values can be contained, refer to the NETWORK_TYPE_ constants in android.telephony.TelephonyManager. Bitmask for a radio tech R is (1 << (R - 1))

Type: INTEGER

Value: "network_type_bitmask"

NUMERIC

Added in API level 19
Deprecated in API level 29
static val NUMERIC: String

Deprecated: Use SIM_APN_URI to query APN instead, this API will return matching APNs based on current subscription carrier, thus no need to specify Numeric and other carrier matching information. In the future, Android will not support Numeric for APN query.

Numeric operator ID (as String). Usually MCC + MNC.

Type: TEXT

Value: "numeric"

PASSWORD

Added in API level 19
static val PASSWORD: String

APN password.

Type: TEXT

Value: "password"

PORT

Added in API level 19
static val PORT: String

Proxy port.

Type: TEXT

Value: "port"

PROTOCOL

Added in API level 19
static val PROTOCOL: String

The protocol to use to connect to this APN. One of the PDP_type values in TS 27.007 section 10.1.1. For example: IP, IPV6, IPV4V6, or PPP.

Type: TEXT

Value: "protocol"

PROXY

Added in API level 19
static val PROXY: String

Proxy address.

Type: TEXT

Value: "proxy"

ROAMING_PROTOCOL

Added in API level 19
static val ROAMING_PROTOCOL: String

The protocol to use to connect to this APN when roaming. The syntax is the same as protocol.

Type: TEXT

Value: "roaming_protocol"

SERVER

Added in API level 19
static val SERVER: String

Server address.

Type: TEXT

Value: "server"

SUBSCRIPTION_ID

Added in API level 22
static val SUBSCRIPTION_ID: String

The subscription to which the APN belongs to

Type: INTEGER (long)

Value: "sub_id"

TYPE

Added in API level 19
static val TYPE: String

Comma-delimited list of APN types.

Type: TEXT

Value: "type"

USER

Added in API level 19
static val USER: String

APN username.

Type: TEXT

Value: "user"

USER_EDITABLE

Added in API level 35
static val USER_EDITABLE: String

true if the user allowed to edit this APN, false otherwise.

Type: INTEGER (boolean)

Value: "user_editable"

USER_VISIBLE

Added in API level 35
static val USER_VISIBLE: String

true if this APN visible to the user, false otherwise.

Type: INTEGER (boolean)

Value: "user_visible"

Properties

CONTENT_URI

Added in API level 19
static val CONTENT_URI: Uri

The content:// style URL for this table. For MSIM, this will return APNs for the default subscription SubscriptionManager#getDefaultSubscriptionId(). To specify subId for MSIM, use Uri#withAppendedPath(Uri, String) to append with subscription id.

SIM_APN_URI

Added in API level 29
static val SIM_APN_URI: Uri

The content:// style URL for this table. Used for APN query based on current subscription. Instead of specifying carrier matching information in the selection, this API will return all matching APNs from current subscription carrier and queries will be applied on top of that. If there is no match for MVNO (Mobile Virtual Network Operator) APNs, return APNs from its MNO (based on mccmnc) instead. For MSIM, this will return APNs for the default subscription SubscriptionManager#getDefaultSubscriptionId(). To specify subId for MSIM, use Uri#withAppendedPath(Uri, String) to append with subscription id.