media
media copied to clipboard
DownloadService is hard to configure via Hilt
Because the constructor of DownloadService takes parameters instead of it being configured at some point before onCreate, it isn't possible to build a reusable DownloadService implementation and then customise via Hilt injection.
DownloadService(
downloadNotificationId,
DEFAULT_FOREGROUND_NOTIFICATION_UPDATE_INTERVAL,
channelId,
downloadChannelNameResourceId,
downloadChannelDescriptionResourceId
) {
I'm starting with Hilt and I'm currently stuck with it. Is there some kind of workaround for this ? Thanks