Buffalo
Buffalo

Reputation: 23

how to make sure whether the telephone has two simcard in my app?

before android 5.0,it didn't support two simcard in original android sdk,how to confirm where the phone has two simcard and get the default setting info about the simcard like "which simcard is used to send SMS default"

Upvotes: 1

Views: 557

Answers (1)

fejd
fejd

Reputation: 2565

You can use SubscriptionManager to get the list of active subscriptions: https://developer.android.com/reference/android/telephony/SubscriptionManager.html#getActiveSubscriptionInfoList()

To get the default SMS subscription ID you can use this API in SmsManager: http://developer.android.com/reference/android/telephony/SmsManager.html#getDefaultSmsSubscriptionId()

Upvotes: 1

Related Questions