Android的新CallLog.Calls.NUMBER_PRESENTATION字段有什么用途? [英] What's the use of Android's new CallLog.Calls.NUMBER_PRESENTATION field?
问题描述
我注意到在API级别19(Kitkat)中添加了一个名为CallLog.Calls.NUMBER_PRESENTATION的新字段。
I noticed a new field was added in API level 19 (Kitkat) called CallLog.Calls.NUMBER_PRESENTATION.
文档说
网络设置的数字显示规则。
The number presenting rules set by the network.
允许的值:
PRESENTATION_ALLOWED
PRESENTATION_RESTRICTED
PRESENTATION_UNKNOWN
PRESENTATION_PAYPHONE
Allowed values: PRESENTATION_ALLOWED PRESENTATION_RESTRICTED PRESENTATION_UNKNOWN PRESENTATION_PAYPHONE
有人知道这是什么意思吗?/
Does anyone know what is this used for / according to what is this set?
推荐答案
我已将其签出。
似乎它可以让您知道呼叫者所拥有的内容设置为在手机上显示。
Seems it allows you to know, for example, what the caller has set to display on your phone.
这意味着,如果呼叫者选择不显示其电话,则可能为 PRESENTATION_RESTRICTED
。
This means, that if the caller chose not to have its phone be shown, it could be PRESENTATION_RESTRICTED
.
对于正常的电话号码,我可以看到它是 PRESEN TATION_ALLOWED
。不知道何时会出现其他值。
For normal phone numbers, I can see it's PRESENTATION_ALLOWED
. No idea when the other values appear though.
我之所以这样做,是因为某些原因,在私有号码(又称为未知号码)上,呼叫者的电话号码是隐藏的,在Galaxy S7上,我实际上得到的电话号码是 -2,这是没有意义的(应该为空或空)。
The reason I reached this, BTW, is because for some reason, on private numbers (AKA "unknown numbers"), where the phone number of the caller is hidden, on Galaxy S7 I actually get a phone number "-2", which doesn't make sense (should be null or empty).
这篇关于Android的新CallLog.Calls.NUMBER_PRESENTATION字段有什么用途?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!