Skip to content

Conversation

@nickoneill
Copy link
Member

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization

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?

  • Yes, automated tests in please name test methods or files
  • Yes, manually tested: tested with multiple dial intent apps installed and with only one, and with none.
  • No, and this is why: please replace this line with details on why tests
    have not been included
  • I need help with writing tests

@nickoneill nickoneill requested a review from Copilot September 17, 2025 04:57
Copy link
Contributor

Copilot AI left a 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;
Copy link

Copilot AI Sep 17, 2025

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.

Suggested change
import android.graphics.Paint;

Copilot uses AI. Check for mistakes.
dialIntent.setData(android.net.Uri.parse("tel:" + phoneNumber));

try {
Intent chooser = Intent.createChooser(dialIntent, "Choose phone app");
Copy link

Copilot AI Sep 17, 2025

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.

Suggested change
Intent chooser = Intent.createChooser(dialIntent, "Choose phone app");
Intent chooser = Intent.createChooser(dialIntent, getString(R.string.chooser_title));

Copilot uses AI. Check for mistakes.
try {
startActivity(dialIntent);
} catch (android.content.ActivityNotFoundException e2) {
Toast.makeText(this, "No phone app available to make calls", Toast.LENGTH_SHORT).show();
Copy link

Copilot AI Sep 17, 2025

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.

Suggested change
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();

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants