Android How to make a call that includes “#” or “p” in the dial?

后端 未结 7 1712
伪装坚强ぢ
伪装坚强ぢ 2020-12-31 06:44

I need to make calls in my Android app that includes \"#\" or \"p\" in the dial.

If I use the next code:

Intent intent = new Intent(Intent.ACTION_CAL         


        
相关标签:
7条回答
  • 2020-12-31 07:25

    You can not parse such special numbers with an URI since these are not compliant to tel: standard. (http://www.ietf.org/rfc/rfc3966.txt Page 6ff) You might want to use ACTION_DIAL and give the user the possibility to enter the number himself. Maybe then the phone interprets this as the pause signal p is intended for. To send such pause signals, check Alex Klimashevsky's answer.

    0 讨论(0)
  • 2020-12-31 07:27

    Check this out, hope it helps :)

    Some phones don’t have “p” character, but “,” (comma), somewhere it is “T” and if your phone does not have these fancy characters available, try “*” or “#“. Hopefully one of this characters will work. Beware, on some phones are letters case sensitive, so P can not work.

    • http://rekrowten.wordpress.com/2011/08/29/special-characters-in-telephone-number/
    0 讨论(0)
  • 2020-12-31 07:29

    Try tel:629941945%2322412 instead of tel:629941945#22412

    %23 will be replaced with #

    0 讨论(0)
  • 2020-12-31 07:30

    Try to use others symbol for pause. Look at http://androidforums.com/android-applications/6733-how-do-i-dial-extension.html or http://code.google.com/p/android/issues/detail?id=7514 But! As I see threre are not one solution and this is depends of phone model

    0 讨论(0)
  • 2020-12-31 07:33

    I have solved this problem Here is the code solving it.

    Intent shortcutIntent = new Intent(Intent.ACTION_CALL, Uri.parse("tel:"+Uri.encode("*111*2#")));
    startActivity(shortcutIntent);
    

    Its working fine at my end. I hope its also helpful to you guys...

    0 讨论(0)
  • 2020-12-31 07:35

    Try using "," (comma) instead of p. No idea about "#" though, sorry.

    0 讨论(0)
提交回复
热议问题