安卓& iOS接入号码拨号
我对这两个操作系统都很陌生。
我们正在规划一种安全拨号系统,这意味着在一个电话号码拨号会话中拨打两个号码。
目前,我们有一个系统,允许我们拨打接入号码,等待提示音,然后拨打完整的电话号码。
这有点复杂,但正如我所说,这是一项安全功能。
我们现在正在尝试创建 Android 和 iPhone 应用程序,让我们只需点击虚拟按钮即可拨打接入号码 + 电话号码。
如何以编程方式实现这一点?我需要实现类似“access-number#phone-number”或任何有效的东西。
I am very new to both these operating systems.
We are planning a secure dialing system which means dialing two numbers in one phone number dialing session.
Currently we have a system which allows us to dial an access number, wait for a tone and then dial a full telephone number.
It's a bit elaborate but, like I said, it's a security feature.
What we are now trying to do is create Android and iPhone apps that will allow us to dial the access number + telephone number at the click of a virtual button.
How this can be accomplished programmatically? I need to implement something like "access-number#phone-number" or anything that works.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
iPhone 和 Android 都支持以相同的方式拨打电话。
您需要构造一个 URL 并“运行”该 URL。 iPhone 和 Android 都不支持任何类型的通话控制,因此您必须使用 url 来拨打电话。它们都支持 url 中的“暂停”字符和 dtmf 音调。
iPhone 不支持某些字符,特别是“#”和“*”字符。由于不支持“#”字符(出于安全原因),因此它会使处理 PBX 系统变得困难。
在 Android 上,您必须手动或使用 URLEncoder 对字符进行“编码”。我没有运气支持 Android 中的“#”字符,但我看到过有关它工作的报告。您需要对此进行测试,看看它是否适合您。
对于 iPhone,您使用 UIApplication openURL: 到 电话链接。
例如,
对于 android,您可以使用 INTENT_DIAL 或 ACTION_CALL。
INTENT_CALL 将显示电话拨号器,其中包含您填写的号码。它不需要任何特殊设置。
例如,
ACTION_CALL 需要清单文件中的 CALL_PHONE 权限。
例如
AndroidManifest.xml:
Both iphone and android support making phone calls in the same sort of manner.
You need to construct a URL and 'run' the url. Both iphone and android don't support any sort of call control so you have to make do with the url to make a phone call. They both support 'pause' character and dtmf tones in the url.
The iphone don't support some characters, notably the '#' and '*' characters. Because the '#' character is not supported (for security reasons), it can make it hard dealing with PBX systems.
On the android you have to 'encode' characters manually or using URLEncoder. I have not had any luck supporting the '#' character in Android but I have seen reports of it working. You will need to test this to see if it works for you.
For iphone you use the UIApplication openURL: to a tel link.
e.g.
For android you use the INTENT_DIAL or ACTION_CALL.
INTENT_CALL will display the phone dialler with you number filled out. It does not require any special setup.
e.g.
ACTION_CALL requires the CALL_PHONE permission in your manifest file.
e.g.
AndroidManifest.xml:
我不太确定这是否是您正在寻找的东西。
您可以在布局中创建一个按钮。
在您的主活动中创建指向它的指针 // findViewById();
按钮上的 OnClickListener。
在 onClick 中,使用选择的号码触发拨号意图。
如果这不是您要找的东西,恐怕我需要更多关于它到底是什么的信息,因为在这一点上,这是我根据给出的描述所能想到的唯一的事情。
I'm not quite sure if this is what you're looking for but.
You could create a button in your layout.
Create a pointer to it in your main activity // findViewById();
OnClickListener on the Button.
in the onClick, fire a Dial Intent with the number of choice.
If this isn't what you're looking for I'm afraid I'll need a bit more information on what it truely is, because at this point that's the only thing I can manage to think of with the description given.