I have an Android (2.x)
app that read call logs from CallLog.Calls.CONTENT_URI
.
Recently I got an error report that get an unexpected value from TYPE
field. I assume in the source code that the values should always be 1, 2, 3 (CallLog.Calls.INCOMING_TYPE, CallLog.Calls.OUTGOING_TYPE, and CallL开发者_开发知识库og.Calls.MISSING_TYPE repectively)
Unfortunately I don't have information about the actual value I got. My problem is, what are the possible values of the TYPE
field beyond the above three? The Android javadoc explicitly stated "The type of the call (incoming, outgoing or missed)"
There are more types outside of the standard Incoming(1), Outgoing(2) and Missed(3). So far I have encountered 4 (VoiceMail), 5 (Rejected) and 6 (Refused List).
final static int Rejected = 5;
final static int Refused_List = 6;
final static int Voice_Mail = 4;
Use the defined values, not discrete literal values:
CallLog.Calls.OUTGOING_TYPE
CallLog.Calls.INCOMING_TYPE
CallLog.Calls.MISSED_TYPE
精彩评论