Skip to content

Phone link tel: crashed the app #324

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
nodefive opened this issue Jan 27, 2025 · 1 comment
Open

Phone link tel: crashed the app #324

nodefive opened this issue Jan 27, 2025 · 1 comment
Labels

Comments

@nodefive
Copy link

Added some phone number links with the html format tel:88888888

The app crashes when I click any of them

@mgks mgks added the bug label Feb 7, 2025
@mgks
Copy link
Owner

mgks commented Feb 7, 2025

update with this, I will also update the source code and add this in next release:

...
} else if (url.startsWith("tel:")) {
    Intent intent = new Intent(Intent.ACTION_DIAL, Uri.parse(url));

    // add try-catch block
    try {
        context.startActivity(intent);
    } catch (ActivityNotFoundException e) {
        Toast.makeText(context, "No dialer app found.", Toast.LENGTH_SHORT).show();
        Log.e("FCM_ERROR", "PORT_TEL", e); // logging the exception
    }
...

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

No branches or pull requests

2 participants