Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(android): foreground issues & notification icon (#2048)
* fix(android): foreground issues (close #2045) - move execution of foregrounding and backgrounding to NotificationState.POSTED in order to avoid race condition where notificationId has not been set yet - avoid comparing to player states that don’t affect foregrounding, by ignoring LOADING, BUFFERING and READY states – all of which can occur both when playing or while paused - also avoid the initial IDLE state, since we are only interested when the player would become idle (i.e. all tracks were removed) - ENDED state should also cause foregrounding to stop (without removing notification) * Fix: Add missing icon to notification (close #2049) Using `ExoPlayerR.drawable.exo_notification_small_icon` which is exoplayer’s default notification icon.
- Loading branch information