天天看點

Android雙卡雙待程式設計識别

如今,尤其是在中國,雙卡雙待如此普及和如此廣泛,雙卡雙待已經成為智能手機的事實上的标準。大勢所趨,為此,Android從Android 5.1開始,從Android SDK API層面開始支援雙卡雙待或1個以上的SIM卡。Android官方的文檔闡釋連結:

https://developer.android.com/about/versions/android-5.1.html#multisim

原文:

Multiple SIM Card Support

Android 5.1 adds support for using more than one cellular carrier SIM card at a time. This feature lets users activate and use additional SIMs on devices that have two or more SIM card slots.

You can access information about the currently active SIM through the

SubscriptionManager

class, including whether or not the device is considered to be roaming on the current network. This information is useful for developers who want to throttle their apps' data access down or off for device users who are sensitive to data access charges. Your

app can be alerted to changes in a device's current network connection by requesting the

READ_PHONE_STATE

permission and setting

SubscriptionManager.OnSubscriptionsChangedListener

on the

SubscriptionManager

object.

繼續閱讀