Android的出站主叫号码 - 开/关号码、Android

由网友(仅有一颗心,只存一个你)分享简介:我婉隐藏/显示从我的活动我的来电显示编程。我试图找到它在Android文档,但没有运气。也许你有什么想法?解决方案 我发布了一个问题,问这对Android谷歌集团,并获得绝对没有答案。我也看到一对夫妇对SO等问题也没有答案(或无的工作)。我得出的结论,那根本是不可能的。我的理由是这样的... 如果我去设置 - >电话...

我婉隐藏/显示从我的活动我的来电显示编程。我试图找到它在Android文档,但没有运气。也许你有什么想法?

解决方案

我发布了一个问题,问这对Android谷歌集团,并获得绝对没有答案。我也看到一对夫妇对SO等问题也没有答案(或无的工作)。

我得出的结论,那根本是不可能的。我的理由是这样的...

如果我去设置 - >电话 - >其他设置,我看到一个AlertDialog其中有通话设置一HeaderTitle,我看到一个圆形的进度指示器和一个消息,说的阅读设置...

它发生,我认为我的手机是,在这一点上,访问我的电话/网络提供商。由此产生的选择器对话框给了我为'网络默认,隐藏号码和显示号码和选项,当我进行选择(或者即使我只是'取消'对话框),我得到另一个AlertDialog圆形进度指标与消息更新设置...。

总之,似乎来电显示设置并不完全是本地到手机设置,并依靠与供应商,不管出于什么原因交往,因为这是Android API的结果不允许这是编程操作。

我不知道这是什么的待办事项列表上的Andr​​oid,或者如果在允许它做或者一些其他原因的法律/安全隐患未来版本。无论是哪种情况可能是,我还没有发现任何人,到目前为止是谁能够解释为什么没有一个方法TelephonyManager(例如)简单地切换这一点。

编辑:没有运气上获得额外的设置AlertDialog的标准API或者

我之所以这么说,是有可能拉上了设备的设置的各个部分,例如,在我的应用程序在我的意图传递给startActivity构造函数使用android.provider.Settings.ACTION_WIRELESS_SETTINGS 1 ()。这将显示设置页面启用/禁用无线网络,移动互联网和蓝牙。

android.provider.Settings还有其他类似的行动对其他的设置页面,但竟然没有一个是呼叫别提了电话 - >其他设置,并没有为AlertDialog,让您选择隐藏/显示离开来电显示。

如果这是可以做到,那么就必须是一个未公开的API,除非我完全错过了(我花了很长的时间寻找)。我怀疑检查了Android源 - code可以找到答案的唯一途径,我还没有尝试的呢。

安卓最新版的 怎么关闭来电归属地提醒

I wan to hide/show my caller id from my activity programmatically. I tried to find it in the android documentation but without the luck. Maybe you have any ideas?

解决方案

I posted a question asking this on the Android Google group and got absolutely no answers at all. I've also seen a couple of other question on SO which also had no answers (or none that work).

I came to the conclusion that it simply isn't possible. My reasoning is this...

If I go to Settings -> Call -> Additional settings, I see an AlertDialog which has a HeaderTitle of 'Call settings' and I see a circular progress indicator and a message saying 'Reading settings...'.

It occurs to me that my phone is, at that point, accessing my phone/network provider. The resulting 'chooser' dialog gives me options for 'Network default', 'Hide number' and 'Show number' and when I make a selection (or even if I just 'Cancel' the dialog), I get another AlertDialog with circular progress indicator with the message 'Updating settings...'.

In short, it seems the Caller ID setting is not entirely 'local' to the phone settings and relies on interaction with the provider and, for whatever reason, as a result of this the Android APIs don't allow this to be manipulated programatically.

I'm not sure if this is something on the 'To Do' list for future versions of Android or if there are legal/security implications in allowing it to be done or some other reason. Whatever the case may be, I haven't found anybody so far who is able to explain why there isn't a method for TelephonyManager (for example) to simply switch this.

EDIT: No luck on getting the Additional Settings AlertDialog with the standard APIs either.

The reason I say that is that it is possible to pull up various parts of the device's 'Settings', e.g., in one of my apps I use android.provider.Settings.ACTION_WIRELESS_SETTINGS in the constructor of an Intent passed to startActivity(). This brings up the Settings page for enabling/disabling wi-fi, mobile internet and bluetooth.

android.provider.Settings has other similar ACTIONs for other Settings pages but there isn't even one for 'Call' never mind Call -> Additional Settings and nothing for the AlertDialog to allow you to choose to Hide/Show the outgoing Caller ID.

If this can be done then it would have to be an undocumented API unless I completely missed it (I spent a long time looking). I suspect examining the Android source-code may be the only way to find an answer and I haven't attempted that yet.

阅读全文

相关推荐

最新文章