0

I'm trying to use intent to pass a number in dialer but when I tried using telephone numbers, there we're no parenthesis shown for example I have the ff. number (828) 316-0593 and will show as 8283160593, it seems parenthesis and dashes are being ignored.

Code:

 Uri phone = Uri.parse("tel:" + record.getString("phone"));
 Intent dial = new Intent(Intent.ACTION_DIAL, phone);
 startActivity(dial);

I also tried using mobile number +1 123 4512533 but the '+' symbol still shown after passing to dialer.

When I used an emulator, it shows the same format when I open the dialer but when I try to used a physical device, it doesn't show the same.

How can I make the same output after passing to dialer? Which of these(emulator, physical) shows the correct output?

Hakan Dilek
  • 2,178
  • 2
  • 23
  • 35
plexus
  • 101
  • 1
  • 11
  • 1
    Does this answer your question? [android: how do I format number as phone with parentheses](https://stackoverflow.com/questions/21270686/android-how-do-i-format-number-as-phone-with-parentheses) – Wini Jul 02 '20 at 08:05
  • Valid US formats are `(828) 316-0593` or `828-316-0593`, not `(828)-316-0593` – Andreas Jul 02 '20 at 08:06
  • @Wini I also tried android: how do I format number as phone with parentheses but it doesn't work when I tried using physical device – plexus Jul 02 '20 at 08:12

1 Answers1

0

Probably be it depends on the operating system. But you wont be able to face any error form it.

Bensal
  • 3,316
  • 1
  • 23
  • 35