feat: add notification for sync and download, closes #328#396
feat: add notification for sync and download, closes #328#396Heropowwa wants to merge 4 commits into
Conversation
|
|
||
| workers.joinAll() | ||
| _isDownloadingLibrary.value = false | ||
| delay(2000) |
| } | ||
|
|
||
| progressCallback(1.0f, Res.string.info_syncing_finished) | ||
| delay(2000) |
| import platform.UserNotifications.UNAuthorizationOptionAlert | ||
| import platform.UserNotifications.UNAuthorizationOptionSound | ||
|
|
||
| actual class NotificationManager { |
There was a problem hiding this comment.
I would not implement this on ios at all, notifications are more obtrusive on ios and you’re not really meant to use them for like download progress or anything
Also ios can’t even do downloads or networking while your app is in the background (though this has finally changed somewhat in ios 26 but it still sucks)
There was a problem hiding this comment.
Can we just ditch ios support at this point 👉👈...
| <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> | ||
| <uses-permission android:name="android.permission.ACCESS_LOCAL_NETWORK" /> | ||
| <uses-permission android:name="android.permission.INTERNET" /> | ||
| <uses-permission android:name="android.permission.POST_NOTIFICATIONS" /> |
There was a problem hiding this comment.
I think you can somehow send download notifications without permission because i’ve seen apps do that, not sure if you did that here im too lazy to look, but I would definitely prefer that
For example, chrome or discord can download a file in the background, with progress being shown in a silent notification, and it will notify when its finished (or at least thats how it works for me on grapheneos, idk how it behaves on other roms)
There was a problem hiding this comment.
I tried not putting it and putting it and don't asking for permission but it doesn't work, idk honestly
|
|
||
| launch { | ||
| notificationManager.showProgressNotification( | ||
| id = NotificationIds.SYNC_LIBRARY, |
There was a problem hiding this comment.
I don’t really see a use case for sync notifications honestly, the sync should just be a process that silently happens in the background, not something that the user needs to know about
There was a problem hiding this comment.
At the moment sync in background doesn't work i think, but if we implement that you can do the initial sync that for some people takes time in background
Added notification with progress when syncing the library, or downloading it.
closes #328.