CommunityToolkit / CommunityToolkit/Maui
[BUG] MediaElement prevent app from unload correct on Android
- Dominant language
- C#
- Stars
- 2.7k
- Forks
- 500
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 7
Description
### Is there an existing issue for this?
- [x] I have searched the existing issues
### Did you read the "Reporting a bug" section on Contributing file?
- [x] I have read the "Reporting a bug" section on Contributing file: https://github.com/CommunityToolkit/Maui/blob/main/CONTRIBUTING.md#reporting-a-bug
### Current Behavior
MediaElement prevent the app from restarting correctly.
After mediaElement has been played and you kill the app on android the app remains and when you restart it's runs
CreateWindow but not OnStart/OnResume
### Expected Behavior
After mediaElement has been played and you kill the app on android the app and you restart it's running
CreateWindow and OnStart
### Steps To Reproduce
1. open the app and navigate to tab 2 where the video plays
2. on android tapp the button for show active apps and swipe up to kill the app
3. restart the app by klicka on the app icon.
4. now the app stay on the start shell and never runs the OnStart() function.
If force kill the app on the emulator
1. open the app and stay on tab 1 (We don't play any video)
2. on android tapp the button for show active apps and swipe up to kill the app
3. restart the app by klicka on the app icon.
4. now the app show the start shell and runs the OnStart() function.
### Link to public reproduction project repository
https://github.com/JoacimWall/Joacim_Bug_Report/tree/main/MediaBug
### Environment
```markdown
- .NET MAUI mediaElement: 6.0.2
- OS: Mac OS, Android 8.0 emulator (We see this on production on customers devices )
- .NET MAUI:9.0.60
```
### Anything else?
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.