Skip to content
This repository has been archived by the owner on Oct 22, 2022. It is now read-only.

Is it possible to populate the phone number but not dial? #79

Open
wenindoubt opened this issue Sep 23, 2019 · 8 comments
Open

Is it possible to populate the phone number but not dial? #79

wenindoubt opened this issue Sep 23, 2019 · 8 comments

Comments

@wenindoubt
Copy link

wenindoubt commented Sep 23, 2019

Based on the documentation, it seems like when the Call Number service is called, it immediately dials the phone number using the native phone app.

Is it possible to only populate the phone number in the native phone app, and allow the user to manually press the call button?

  public onOpenPhone(phoneNumber: string): void {
    this.callNumber.callNumber(phoneNumber, true);
  }
@wenindoubt
Copy link
Author

I am still running into this issue if someone could help out.

@Djunnni
Copy link
Contributor

Djunnni commented Oct 23, 2019

i think it is trouble .
i'm revising code and testing.
i will request PR this week.

@Djunnni
Copy link
Contributor

Djunnni commented Oct 24, 2019

Now you can use : )

@wenindoubt
Copy link
Author

Now you can use : )

Thank you! Would you kindly provide a simple example of how I would use this plugin and only populate the number and not dial?

@Djunnni
Copy link
Contributor

Djunnni commented Oct 25, 2019

if bypassAppChooser is true, go to dial now
else if bypassAppChooser is false, call directly

it's easy

@darkoandreev
Copy link

I tried it with bypassAppChooser=true, but it's still not working. It's calling the number directly and I don't want that. I want only to show the number in the dialer app and then to allow the user clicking on the green phone button to make the call.
Do you know what is the problem? I'm using the latest Android version. @Djunnni @wenindoubt

@wenindoubt
Copy link
Author

I tried it with bypassAppChooser=true, but it's still not working. It's calling the number directly and I don't want that. I want only to show the number in the dialer app and then to allow the user clicking on the green phone button to make the call.
Do you know what is the problem? I'm using the latest Android version. @Djunnni @wenindoubt

@darkoandreev I actually worked around this by using location.href.

  public openPhone(phoneNumber: string): void {
    location.href = `tel:${phoneNumber}`;
  }

That will populate the phone number but not dial it :)

@darkoandreev
Copy link

darkoandreev commented Apr 12, 2021

I tried it with bypassAppChooser=true, but it's still not working. It's calling the number directly and I don't want that. I want only to show the number in the dialer app and then to allow the user clicking on the green phone button to make the call.
Do you know what is the problem? I'm using the latest Android version. @Djunnni @wenindoubt

@darkoandreev I actually worked around this by using location.href.

  public openPhone(phoneNumber: string): void {
    location.href = `tel:${phoneNumber}`;
  }

That will populate the phone number but not dial it :)

It works on both operating systems (Android and iOS). It's more like a workaround, but it's working. Thank you!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants