Bug Fixes
Fixed: Playback freezes when tapping notification or rotating device
When tapping the media notification to open the player, or rotating the device, the UI would appear frozen/stuck, requiring a disconnect and reconnect to fix.
Root cause: Missing lifecycle methods and activity recreating on configuration changes.
Fix:
- Added
onResume()andonNewIntent()lifecycle methods to re-sync UI state - Added
configChangesattribute to prevent activity recreation on rotation - Added
launchMode="singleTop"to ensure notification tap reuses existing activity - Enhanced
syncUIWithPlayerState()to restore the now playing view when reconnecting
Testing
- ✅ Tap notification while playing → App opens with correct play/pause state
- ✅ Rotate device → Playback continues, UI stays on now playing view
- ✅ Background/foreground the app → UI state remains synchronized