zhirzh
zhirzh

Reputation: 3459

unknown call types when querying device call logs

In the snippet below, I am trying to read call logs and print their call type

Cursor cursor = context.getContentResolver().query(Calls.CONTENT_URI, ...);
while (cursor.moveToNext()) {
    int callType = cursor.getInt(cursor.getColumnIndex(Calls.TYPE));
    Log.d("callType", callType);
}

In some cases, I get values not listed in the official docs. Does anyone know what these callTypes mean?


callType 10

COMIO:

OPPO:

Realme:

Xiaomi:


callType 20

OPPO:

Realme:


callType 100

Realme:


callType 1001

PANASONIC:


Upvotes: 2

Views: 575

Answers (2)

mch.zawalski
mch.zawalski

Reputation: 558

For my OnePlus device the following codes are for:

  • 100 - VoWiFi Outgoing call
  • 101 - VoWiFi Incomming call

So I can only assume that the other codes like 10/20 might be for the same purpose but for other manufacturers. To bad that the codes are not documented and implemented in the android libs.

Upvotes: 0

Harrison
Harrison

Reputation: 319

I am able to explain the following additional call type constants: 1000, 1001, 1002

In my case the call type constants above are used for IMS call statuses in the calllog table.

See here: https://gerrit.aicp-rom.com/c/AICP/frameworks_base/+/57943/1/core/java/android/provider/CallLog.java#210

If possible, check the android source for the firmware you see the extra codes coming from in core/java/android/provider/CallLog.java. Hope this helps! It's unfortunate that this is not well-documented

Upvotes: 1

Related Questions