How do I give option to dial an extension in Tel: link?

前端 未结 2 2072
不知归路
不知归路 2021-01-06 18:18

While putting a tel link as Dial and clicking it from a mobile browser, only initial number gets transferred t

2条回答
  •  悲&欢浪女
    2021-01-06 19:01

    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:+91123456789;ext=123.

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

    Dial //Less than 4.0
    Dial     //Greater than 4.0
    

    Source: Problems using extensions in tel: hyperlinks on Android 4

提交回复
热议问题