nowinandroid icon indicating copy to clipboard operation
nowinandroid copied to clipboard

Handle `ActivityNotFoundException` when launching Chrome custom tab

Open SimonMarquis opened this issue 2 years ago • 3 comments

Fixes #1068

Screen_recording_20231210_133959.webm

SimonMarquis avatar Dec 10 '23 12:12 SimonMarquis

I think we have the same issue with the default LocalUriHandler:

https://github.com/android/nowinandroid/blob/a5c030f74048897256f2c2f8fb29f0a2e8222d60/feature/settings/src/main/kotlin/com/google/samples/apps/nowinandroid/feature/settings/SettingsDialog.kt#L260 https://github.com/android/nowinandroid/blob/a5c030f74048897256f2c2f8fb29f0a2e8222d60/feature/settings/src/main/kotlin/com/google/samples/apps/nowinandroid/feature/settings/SettingsDialog.kt#L262 https://github.com/android/nowinandroid/blob/a5c030f74048897256f2c2f8fb29f0a2e8222d60/feature/settings/src/main/kotlin/com/google/samples/apps/nowinandroid/feature/settings/SettingsDialog.kt#L275 https://github.com/android/nowinandroid/blob/a5c030f74048897256f2c2f8fb29f0a2e8222d60/feature/settings/src/main/kotlin/com/google/samples/apps/nowinandroid/feature/settings/SettingsDialog.kt#L280

And we probably should use a more generic message for these.

SimonMarquis avatar Dec 22 '23 10:12 SimonMarquis

After discussion with the team, we decided that this is a good opportunity to introduce a general error handler which displays errors using a SnackBar one after each other (following the Material guidelines).

dturner avatar Dec 22 '23 17:12 dturner

Additionally, we may want to consider having a persistent "you're offline" bar (similar to Spotify) which would avoid the contention for Snackbars between the offline Snackbar and other messages.

dturner avatar Dec 22 '23 17:12 dturner

I'm going to close this as having a Toast isn't aligned with our material guidelines. Have filed https://github.com/android/nowinandroid/issues/1435 in case anyone from the community wants to pick up the implementation of a better solution.

dturner avatar May 13 '24 22:05 dturner