Baseflow / Baseflow/XamarinMediaManager

MediaItemFinished randomly fires when switching songs sometimes

Open
#842 0 comments 2 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
763
Forks
299
PR merge metrics
No merged PRs in 30d

Description

## 🐛 Bug Report

im using xamarin forms and testing on Android. I have 4 buttons and each time i click the button to play a song, i call the media player to play it. I also have an event to listen for when the song ends, which is working as expected. What is not working correctly is that sometimes, when switching songs, the event gets triggered even though a media item hasn't finished.
### Expected behavior
should only fire when the song ends
### Reproduction steps
have buttons that play different songs, i have 4 in mine. Set up and mediaItemFinished event and have it do something when the song ends. Start switching songs by clicking on different buttons and notice that the mediaItemFinshed event is executing code when it shouldnt be.
### Configuration

**Version:** 1.x

**Platform:**
- [ ] :iphone: iOS
- [ ] :robot: Android
- [ ] :checkered_flag: WPF
- [ ] :earth_americas: UWP
- [ ] :apple: MacOS
- [ ] :tv: tvOS
- [ ] :monkey: Xamarin.Forms

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue in Xamarin.Forms on Android using four controls that switch songs and observe the MediaItemFinished event while changing tracks. Trace the event path from playback switching to determine why it fires before a song ends; done means the event runs only for genuinely finished media items.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, csharp
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.