Search code examples
androidandroid-6.0-marshmallowphone-call

call phone with extension fails on android 6


trying to call phone, say tel:01234567,1815 where the extension is 1815 and comma is the pause.

this fails in all three ways 1) using an intent, 2) autolink a text field and 3)using openurl.

in most cases it passes the pure phone number to the dialpad, but not the complete number with the extension. i need this to directly go into a conference room.

permission CALL_PHONE has been set in manifest as well a checked during runtime in the code.


Solution

  • Could you try PhoneNumberUtils.PAUSE or PhoneNumberUtils.WAIT

    callIntent.setData(Uri.parse(String.format("tel:%s%s%s","01234567",PhoneNumberUtils.PAUSE,"#1815"));
    

    or

    callIntent.setData(Uri.parse(String.format("tel:%s%s%s","01234567",PhoneNumberUtils.WAIT,"#1815"));