-
Notifications
You must be signed in to change notification settings - Fork 15
Select a dialer app when more than one installed #266
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds functionality to let users choose which dialer app to use when making phone calls from the 5calls Android app. When multiple dialer apps are installed, users will see a chooser dialog to select their preferred app.
- Replaces automatic phone number linking with custom click handling that presents an app chooser
- Adds proper query declarations for tel intents to support Android 11+ package visibility requirements
- Implements fallback handling when no dialer apps are available
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| RepCallActivity.java | Implements custom phone number click handling with app chooser and fallback error handling |
| AndroidManifest.xml | Adds tel intent query declaration for Android 11+ compatibility |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| import android.text.util.Linkify; | ||
| import android.text.style.UnderlineSpan; | ||
| import android.text.SpannableString; | ||
| import android.graphics.Paint; |
Copilot
AI
Sep 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Paint import is unused and should be removed to keep imports clean.
| import android.graphics.Paint; |
| dialIntent.setData(android.net.Uri.parse("tel:" + phoneNumber)); | ||
|
|
||
| try { | ||
| Intent chooser = Intent.createChooser(dialIntent, "Choose phone app"); |
Copilot
AI
Sep 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The chooser title should be extracted to a string resource for localization and consistency with Android best practices.
| Intent chooser = Intent.createChooser(dialIntent, "Choose phone app"); | |
| Intent chooser = Intent.createChooser(dialIntent, getString(R.string.chooser_title)); |
| try { | ||
| startActivity(dialIntent); | ||
| } catch (android.content.ActivityNotFoundException e2) { | ||
| Toast.makeText(this, "No phone app available to make calls", Toast.LENGTH_SHORT).show(); |
Copilot
AI
Sep 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The toast message should be extracted to a string resource for localization and consistency with Android best practices.
| Toast.makeText(this, "No phone app available to make calls", Toast.LENGTH_SHORT).show(); | |
| Toast.makeText(this, getString(R.string.no_phone_app_available), Toast.LENGTH_SHORT).show(); |
What type of PR is this? (check all applicable)
Description
Android has other apps that can act as phone dialers, when multiple are installed we should give the user the option of which to use. Draft until I clean up some of the strings and such.
Were the changes tested?
have not been included