-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Notify when storage is 75% and when it is full. #412
Conversation
Release 1.2.1
Release 1.2.2
fixes issue #141 |
radar-commons-android/src/main/java/org/radarbase/android/util/StorageLevelReceiver.kt
Outdated
Show resolved
Hide resolved
radar-commons-android/src/main/java/org/radarbase/android/util/StorageLevelReceiver.kt
Outdated
Show resolved
Hide resolved
radar-commons-android/src/main/java/org/radarbase/android/util/StorageLevelReceiver.kt
Outdated
Show resolved
Hide resolved
radar-commons-android/src/main/java/org/radarbase/android/util/StorageLevelReceiver.kt
Outdated
Show resolved
Hide resolved
radar-commons-android/src/main/java/org/radarbase/android/data/TapeCache.kt
Outdated
Show resolved
Hide resolved
radar-commons-android/src/main/java/org/radarbase/android/data/TapeCache.kt
Outdated
Show resolved
Hide resolved
@@ -123,6 +126,30 @@ abstract class SourceService<T : BaseSourceState> : LifecycleService(), SourceSt | |||
sourceTypes = emptySet() | |||
broadcaster = LocalBroadcastManager.getInstance(this) | |||
|
|||
broadcaster.run{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The intention here is good, but it's probably better put in RadarService -- only one notification should run at a time and probably the most urgent one (full) should be shown. In DataHandler you could keep a whole list of storageReceiver, one per DataCache, and if at least ONE of them becomes full, show a full notification. Otherwise, if at least ONE of them becomes partially full, show the other notification.
radar-commons-android/src/main/java/org/radarbase/android/data/DataHandlerConfiguration.kt
Show resolved
Hide resolved
Hi @blootsvoets is it what you are saying for? Or some other changes are required. |
Hi,
Please review the attached pull request and provide your feedback.
Thanks