WHEN: player is started
THEN: Notification is not displayed (i.e. playerNotificationManager.setPlayer(null) on startup)
WHEN: a song if played or resumed:
THEN: if notification is not displayed, display it, (i.e. playerNotificationManager.setPlayer(player))
WHEN: media player is playing
THEN: notification is active and cannot be removed
WHEN: media player is paused
THEN: notification can be removed
WHEN: back is pressed on the MainActivity and the app is exited
AND: the player is in ANY state
AND: The notification is present
THEN: The notification is NOT removed
WHEN: The media player is playing and the app is removed from the current tasks
THEN: The notification is NOT removed
WHEN: The media player is paused and the app is removed from the current tasks
THEN: The notification is removed
Requirements
WHEN: player is started THEN: Notification is not displayed (i.e.
playerNotificationManager.setPlayer(null)
on startup)WHEN: a song if played or resumed: THEN: if notification is not displayed, display it, (i.e.
playerNotificationManager.setPlayer(player)
)WHEN: media player is playing THEN: notification is active and cannot be removed
WHEN: media player is paused THEN: notification can be removed
WHEN: back is pressed on the MainActivity and the app is exited AND: the player is in ANY state AND: The notification is present THEN: The notification is NOT removed
WHEN: The media player is playing and the app is removed from the current tasks THEN: The notification is NOT removed
WHEN: The media player is paused and the app is removed from the current tasks THEN: The notification is removed