Telephony.CarrierId.GetUriForSubscriptionId(Int32) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Generates a content Uri
used to receive updates on carrier identity change
on the given subscriptionId
[Android.Runtime.Register("getUriForSubscriptionId", "(I)Landroid/net/Uri;", "", ApiSince=28)]
public static Android.Net.Uri? GetUriForSubscriptionId (int subscriptionId);
[<Android.Runtime.Register("getUriForSubscriptionId", "(I)Landroid/net/Uri;", "", ApiSince=28)>]
static member GetUriForSubscriptionId : int -> Android.Net.Uri
Parameters
- subscriptionId
- Int32
the subscriptionId to receive updates on
Returns
the Uri used to observe carrier identity changes
- Attributes
Remarks
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
.
Java documentation for android.provider.Telephony.CarrierId.getUriForSubscriptionId(int)
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.