Add Auto-switching of Activity by Conditions
Add conditions to sort activities and switch the active activity automatically. For auto switching, conditions shall be be selectable manually as required conditions or "probable" conditions. -->> Remark: do we really need that?
- [x] predecessor activity active (this alone shall never reach the threshold for auto-switching, for sure)
- [ ] resume last activity (e. g. "Short Break" will very likely just interrupt the previous activity which is restarted afterwards)
- [ ] datetime modulo conditions
- [x] Time of day
- [ ] modulo behavior
- [ ] real cyclic update, add new Service like RefreshService
- [ ] weekday
- [ ] date
- [x] Time of day
- [ ] recurrence evaluation (never do autoswitching based on this)
- [ ] wifi network
- [ ] bluetooth connection
- [x] location #49
- [ ] gps speed
- [ ] movement / sensors detecting things like jogging
- [ ] illumination level
- [ ] NFC tags?
- [ ] calendar events
Due to sorting we also have a "Alphabetical"Condition, likelihood for autoswitching should not really be influenced by this, but it might be sufficient to keep the weight small for it.
It seems reasonable to require a certain "distance" of the most likely to the second activity, that only if one is outstanding more likely it is auto selected. This distance will solve the sort-only conditions like alphabetical.
do not forget to adjust the wiki after implementing this.
- [ ] add new notification and a channel to show that an activity changed. Prio shall by HIGH, beep and vibrate as default. Show there the new selected activity and the actions "CHANGE", "DELAY" and "OK"
also important might be even the case, that no new activity was reliably detected, but still the current activities likelihood to stay active reduced below the threshold. In that case a notification shall popup to ask whether it is intended to do that for so extraordinary long time, at this unusual place or whatever condition might have decreased.
linked to #182