I want to develop an app which can access the call logs of the user, but only access the log of a particular sim if the user have 2 sim in their phone.
Asked
Active
Viewed 360 times
1 Answers
0
From here:
You can use "sub_id" constant value to get information about sim card.
Full path to this value CallLog.Calls.SUB_ID = "sub_id", but is not available for public, so just hardcode in API before 21. For >=21 you can use PHONE_ACCOUNT_COMPONENT_NAME.
PHONE_ACCOUNT_COMPONENT_NAME
is officially documented here, along with the rest of the documentation on accessing call logs.

atrocia6
- 319
- 1
- 8