Some of my users report that on their Samsung devices (GT-N7000 & SGH-I777) a query I make in my app for the CallLog.Calls displays also text messages.
I've created a dump of their CallLog
ContentProvider
, and it seems to have extra fields not mentioned in the Android API, and not returned on any of our test devices.
Specifically, looking through the dump, there's a field called logtype
, which seems to equal 100 for calls, and 300 for text messages.
Having searching online for this field, I didn't find any official documentation for this field's values, but I came across lots of other possible values for this field mainly via crash stack traces, which reveal underlining queries by the ContentProvider
:
logtype=300 OR logtype=200
logtype=100 OR logtype=500 OR logtype=800 OR logtype=900 OR logtype=1000
So I assume that 300/200 are used for text messages, and 100/500/800/900/1000 are used for calls, but I'm not sure, since I haven't seen 500/800/900/1000 being used on the reporting users' devices.
Can someone shed some light for the possible values of logtype, and their meaning?
I've managed to tentatively solve it by querying CallLog.Calls
for the column logtype
, if an exception is thrown, I query normally, otherwise, I query with selection of (logtype=100 OR logtype=500)
This seems to be working for my reporting users, but I'm still not sure if it covers all bases, since there are many possible values for logtype
for which I don't know the meaning.
If anyone has a better answer, please add it.