CarrierId
class CarrierId : BaseColumns
kotlin.Any | |
↳ | android.provider.Telephony.CarrierId |
Contains carrier identification information for the current subscriptions.
Summary
Constants | |
---|---|
static String |
A unique carrier id |
static String |
A user facing carrier name. |
static String |
A fine-grained carrier id. |
static String |
A user facing carrier name for specific carrier id |
Inherited constants | |
---|---|
Public methods | |
---|---|
static Uri |
getSpecificCarrierIdUriForSubscriptionId(subscriptionId: Int) Generates a content |
static Uri! |
getUriForSubscriptionId(subscriptionId: Int) Generates a content |
Properties | |
---|---|
static Uri! |
The |
Constants
CARRIER_ID
static val CARRIER_ID: String
A unique carrier id
Value: "carrier_id"
CARRIER_NAME
static val CARRIER_NAME: String
A user facing carrier name.
Value: "carrier_name"
SPECIFIC_CARRIER_ID
static val SPECIFIC_CARRIER_ID: String
A fine-grained carrier id. The specific carrier ID would be used for configuration purposes, but apps wishing to know about the carrier itself should use the regular carrier ID returned by TelephonyManager#getSimCarrierId()
.
Value: "specific_carrier_id"
SPECIFIC_CARRIER_ID_NAME
static val SPECIFIC_CARRIER_ID_NAME: String
A user facing carrier name for specific carrier id SPECIFIC_CARRIER_ID
.
Value: "specific_carrier_id_name"
Public methods
getSpecificCarrierIdUriForSubscriptionId
static fun getSpecificCarrierIdUriForSubscriptionId(subscriptionId: Int): Uri
Generates a content Uri
used to receive updates on specific carrier identity change on the given subscriptionId returned by TelephonyManager#getSimSpecificCarrierId()
.
Parameters | |
---|---|
subscriptionId |
Int: the subscriptionId to receive updates on |
Return | |
---|---|
Uri |
the Uri used to observe specific carrier identity changes This value cannot be null . |
getUriForSubscriptionId
static fun getUriForSubscriptionId(subscriptionId: Int): Uri!
Generates a content Uri
used to receive updates on carrier identity change on the given subscriptionId
Use this Uri
with a ContentObserver
to be notified of changes to the carrier identity TelephonyManager#getSimCarrierId()
while your app is running. You can also use a android.app.job.JobService
to ensure your app is notified of changes to the Uri
even when it is not running. Note, however, that using a android.app.job.JobService
does not guarantee timely delivery of updates to the Uri
.
Parameters | |
---|---|
subscriptionId |
Int: the subscriptionId to receive updates on |
Return | |
---|---|
Uri! |
the Uri used to observe carrier identity changes |
Properties
CONTENT_URI
static val CONTENT_URI: Uri!
The content://
style URI for this provider.