Select a dialer app when more than one installed#266
Select a dialer app when more than one installed#266nickoneill wants to merge 1 commit intomasterfrom
Conversation
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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"); |
There was a problem hiding this comment.
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(); |
There was a problem hiding this comment.
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