What's the use of Android's new CallLog.Calls.NUMBER_PRESENTATION field?

╄→尐↘猪︶ㄣ 提交于 2019-12-21 17:26:57

问题


I noticed a new field was added in API level 19 (Kitkat) called CallLog.Calls.NUMBER_PRESENTATION.

The documentation says

The number presenting rules set by the network.

Allowed values: PRESENTATION_ALLOWED PRESENTATION_RESTRICTED PRESENTATION_UNKNOWN PRESENTATION_PAYPHONE

Does anyone know what is this used for / according to what is this set?


回答1:


I've checked it out.

Seems it allows you to know, for example, what the caller has set to display on your phone.

This means, that if the caller chose not to have its phone be shown, it could be PRESENTATION_RESTRICTED .

For normal phone numbers, I can see it's PRESENTATION_ALLOWED . No idea when the other values appear though.

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).



来源:https://stackoverflow.com/questions/20786818/whats-the-use-of-androids-new-calllog-calls-number-presentation-field

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!