Most visited

Recently visited

Added in API level 22

SubscriptionManager.OnSubscriptionsChangedListener

public static class SubscriptionManager.OnSubscriptionsChangedListener
extends Object

java.lang.Object
   ↳ android.telephony.SubscriptionManager.OnSubscriptionsChangedListener


一个监听器类,用于监视对 SubscriptionInfo记录的更改。

覆盖扩展此类的对象中的onSubscriptionsChanged方法,并将其传递给 addOnSubscriptionsChangedListener(OnSubscriptionsChangedListener)以注册您的侦听器并取消注册调用 removeOnSubscriptionsChangedListener(OnSubscriptionsChangedListener)

权限android.Manifest.permission.READ_PHONE_STATE对于调用#onSubscriptionsChanged是必需的。

Summary

Public constructors

SubscriptionManager.OnSubscriptionsChangedListener()

Public methods

void onSubscriptionsChanged()

当任何SubscriptionInfo发生任何更改时调用回调。

Inherited methods

From class java.lang.Object

Public constructors

SubscriptionManager.OnSubscriptionsChangedListener

Added in API level 22
SubscriptionManager.OnSubscriptionsChangedListener ()

Public methods

onSubscriptionsChanged

Added in API level 22
void onSubscriptionsChanged ()

当任何SubscriptionInfo发生任何更改时调用回调。 通常这种方法会调用getActiveSubscriptionInfoList()

Hooray!