Created Playback states & service states (markdown)
parent
1bbc5c5abb
commit
50658a9468
|
@ -0,0 +1,15 @@
|
|||
**Service running**: Service is running, but startForeground was not called.
|
||||
**Service as Foreground**: Service is running, startForeground was called, Notification is shown
|
||||
**stopForeground**: If we exit foreground, we can specify a flag, whether to remove, or to detach the notification.
|
||||
If detached, the notification will stay, even when the service has been de-foregrounded
|
||||
|
||||
|
||||
|
||||
| Condition | Playback State | Service running | Service as Foreground | stopForeground() |
|
||||
|----------------------------------|----------------|-----------------|-----------------------|--------------------------------------------|
|
||||
| App starts, no resumable track | STOPPED | ✗ | ✗ | No |
|
||||
| App starts, with resumable track | PAUSED | ✓ | ? | No |
|
||||
| Active playing | PLAYING | ✓ | ✓ | No |
|
||||
| Paused by the user | PAUSED | ✓ | ? | stopForeground(DETACH) |
|
||||
| Playback has finished / idle | STOPPED | ? | ? | stopForeground() or stopForeground(DETACH) |
|
||||
| | | | | |
|
Loading…
Reference in New Issue