0

I'm receiving call logs using

Cursor managedCursor = getContentResolver().query(CallLog.Calls.CONTENT_URI, null, null, null, null);

in my andorid app. With managedCursor.getColumnNames() you get an overview over provided columns. There is one column called subscription_id. What is the meaning of it?

principal-ideal-domain
  • 3,998
  • 8
  • 36
  • 73

1 Answers1

0

Subscription id means the SIM card slot in which was the SIM card called from/to on the device.

You can get by:

int subscriptionId = cursor.getInt(cursor.getColumnIndex("subscription_id"));

This value starts with 0 - means SIM card slot 1.

RuSsCiTy
  • 346
  • 1
  • 2
  • 11
  • Actually it's not officially as such: https://developer.android.com/reference/android/provider/CallLog.Calls#PHONE_ACCOUNT_ID , yet on some devices it's indeed the SIM card slot index. Wrote about this here: https://stackoverflow.com/a/73769425/878126 – android developer Sep 19 '22 at 07:11