Problems using extensions in tel: hyperlinks on Android 4

不羁的心 提交于 2019-12-30 10:12:14

问题


We have a mobile web site with some phone number links, like this:

href="tel:12345678,123"

This works fine on most devices, but it appears it doesn't work on many/all Android 4 devices. The extension simply doesn't appear in the dialer when you tap the link.

Anyone found a solution to this?


回答1:


According to the documentation, the tel: scheme supports RFC 3966. Reading these RFCs is a bit like reading cuneiform on clay tablets, but from what I can tell, your syntax is not part of that standard. It looks like you would want tel:12345678;ext=123.




回答2:


I just tested both methods with Android 2.1.

tel:5553334444;ext=123 ends up dialing an extension of 358123 instead of 123 because it converts ext into a number instead.

The right way is to use comma.

tel:5553334444,123

Tried that with our extension here and it connected me through immediately. It first dials the number, then pauses, and then punches in the extension 123 on its own.




回答3:


Something you can consider since tel:5553334444;ext=123 only works for less than 4.0 and tel:5553334444,123 works for 4.0+ would be to check the user agent and put out the appropriate one.



来源:https://stackoverflow.com/questions/9838775/problems-using-extensions-in-tel-hyperlinks-on-android-4

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