Reputation: 3681
I am using Plugin.MediaManager.Forms
for playing audio. It is working fine in android and ios. But in windows, the app is breaking with System.NotImplementedException.
.
Version Details:
Plugin.MediaManager.Forms: 1.0.7
Xamarin Forms: 4.8.0.1821
Visual Studio: 16.8.3
Windows Target version: Windows 10 version 1903(10.0; Build 18362)
Windows Min Version: Windows 10 Fall Creators Update(10.0; Build 16299)
Also, I have added the "Background Media Playback", "Internet", "Music Library" and "Videos Library" in the Package.appxmanifest under capabilities.
What else I am missing?
Upvotes: 0
Views: 561
Reputation: 430
I already saw your issue on github and now saw this stack question. I fixed this problem in my Pull Request. When the PR gets merged you can update to the newest version. You have to use UWP 10.0.18362.0(Version 1903) min by the way.
The Target Version was downgraded from uap 10.0.18362.0(Version 1903) to 10.0.17763(Version 1809) from version 0.9.7 to 0.9.9. For now, you have to use v. 0.9.7.
Upvotes: 1
Reputation: 248
Plugin.MediaManager.Forms is not working in xamarin uwp
It looks a bug for Plugin.MediaManager.Forms
, Please try to reduce Plugin.MediaManager.Forms version to 0.9.6. And call CrossMediaManager.Current.Init();
in UWP client project like the following. It will work.
if (rootFrame == null)
{
// Create a Frame to act as the navigation context and navigate to the first page
rootFrame = new Frame();
rootFrame.NavigationFailed += OnNavigationFailed;
Xamarin.Forms.Forms.Init(e);
CrossMediaManager.Current.Init();
ApplicationView.PreferredLaunchViewSize = new Size(600, 900);
ApplicationView.PreferredLaunchWindowingMode = ApplicationViewWindowingMode.PreferredLaunchViewSize;
if (e.PreviousExecutionState == ApplicationExecutionState.Terminated)
{
//TODO: Load state from previously suspended application
}
// Place the frame in the current Window
Window.Current.Content = rootFrame;
}
Upvotes: 1