共用方式為


TelephonyManager.CarrierIdFromSimMccMnc Property

Definition

Returns carrier id based on sim MCCMNC (returned by #getSimOperator()) only.

public virtual int CarrierIdFromSimMccMnc { [Android.Runtime.Register("getCarrierIdFromSimMccMnc", "()I", "GetGetCarrierIdFromSimMccMncHandler", ApiSince=29)] get; }
[<get: Android.Runtime.Register("getCarrierIdFromSimMccMnc", "()I", "GetGetCarrierIdFromSimMccMncHandler", ApiSince=29)>]
member this.CarrierIdFromSimMccMnc : int

Property Value

matching carrier id from sim MCCMNC. Return #UNKNOWN_CARRIER_ID if the subscription is unavailable or the carrier cannot be identified.

Attributes

Remarks

Returns carrier id based on sim MCCMNC (returned by #getSimOperator()) only. This is used for fallback when configurations/logic for exact carrier id #getSimCarrierId() are not found.

Android carrier id table here can be updated out-of-band, its possible a MVNO (Mobile Virtual Network Operator) carrier was not fully recognized and assigned to its MNO (Mobile Network Operator) carrier id by default. After carrier id table update, a new carrier id was assigned. If apps don't take the update with the new id, it might be helpful to always fallback by using carrier id based on MCCMNC if there is no match.

Java documentation for android.telephony.TelephonyManager.getCarrierIdFromSimMccMnc().

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.

Applies to