Allow passing in notification channel name & description as strings on DownloadService
@marcbaechinger is already working on this.
Since Sep 4, 2023.
- Dominant language
- Java
- Stars
- 3k
- Forks
- 955
- Avg merge
- 12d 14h
- Merged PRs (30d)
- 2
Description
Use case description
We'd like to make use of the DownloadService and take advantage of the ability to have the Service itself create the Notification Channel for us, but can't rely on string resources for notification channel name & description.
Proposed solution
Add an additional constructor to DownloadService that rather than taking in a String resource for channel name and description, would take String or CharSequence instead. This way implementors can use their own localization mechanism, not having to give up on this feature and rely on creating the notification channel themselves.
Proposed constructor
protected DownloadService(
int foregroundNotificationId,
long foregroundNotificationUpdateInterval,
@Nullable String channelId,
String channelName,
String chanelDescription)
Alternatives considered
Currently the only option to circumvent this inconvenience is to use the simpler cosntructor:
protected DownloadService(
int foregroundNotificationId, long foregroundNotificationUpdateInterval)
and to create the notfiication channel separately.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.