Skip to content

Android notification channels (categories) SAF-782 #1276

Open
@tindn

Description

@tindn

Why this issue
The notification problem is a bit confusing, so I wanted to create a document to explain my findings. Also, there will be PRs in 2 repositories, so I wanted a place to describe the whole solution.

Existing problem

Issue reported here on Jira.
There are 4 different notification categories (called Channels in code) on Android, and they're a bit confusing.
In addition to being confusing, having a Sync Service notification might cause concerns that the app is syncing collected data.

Cause

  • Every notification on android requires having a channel.
  • The existing 4 channels are created in 2 different places
    • Setting up the react-native-push-notification to be used for pushing local notifications. This is a valid category of notifications, however, the configuration in the AndroidManifest here used the code name "covidsafepaths_kit_notification_channel" for the category instead of a human readable name.
    • The Path-Check/background-geolocation-android submodule setting up the other 3 categories
      (a) Service channel - required to do background notification. This is valid, but should be renamed.
      (b) Sync channel - this should be removed as we're not doing any syncing work.
      (c) Android Permission Channel - as far as I can tell, this is not being used, as we're creating our own notifications for the permission here. However, I don't want to remove it without additional knowledge. We should still rename this to avoid the duplication and make it clear.

Proposed solution

  1. Remove the sync service category, and rename the other categories as follows

Note: the unreadable channel name was configured in AndroidManifest.xml instead of code, so the change will not be reflected after the app update, but only after a fresh install or reinstall. I have tried to find solutions to this but haven't found any. Perhaps someone with better Android experience can help.

  1. Once we've determined that the Android Permission category is not actually used, we should remove it, leaving only 2 valid categories, Background service and General notifications.

  2. Rename the background notification from

as it is not clear, and some text is cut off (no option to expand) to the newer version (copy can be changed):

I will submit the related PRs for this proposed solutions and update the issue.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions