android / android/nowinandroid

[FR]: Add network connectivity check before launching Chrome Custom Tab

Open Beginner friendly
#2,110 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Kotlin
Stars
21.8k
Forks
4.6k
Avg merge
19h 20m
Merged PRs (30d)
2

Description

### Is there an existing issue for this?

- [x] I have searched the existing issues

### Describe the problem

Currently, when someone taps on a news article card, the app immediately launches a Chrome Custom Tab without verifying whether an internet connection is available. If the device is offline, Chrome opens and displays its own network error page, taking the user outside of the app with no feedback

### Describe the solution

Before calling "launchCustomChromeTab", verify network connectivity using the existing "NetworkMonitor" available in the app and show a Snackbar informing the user that an internet connection is required to open the article.

### Additional context

_No response_

### Code of Conduct

- [x] I agree to follow this project's Code of Conduct

Contributor guide

Open the contributing guide

Research direction

Locate the launchCustomChromeTab entry point and inspect how the existing NetworkMonitor reports connectivity. Before launching the Chrome Custom Tab, handle the offline case with a Snackbar stating that an internet connection is required to open the article. Done means offline taps stay in the app with feedback, while online taps still open the article.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
mobile
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.