Baseflow / ExoPlayerXamarin

Xamarin bindings library for the Google ExoPlayer library

Home Page:https://baseflow.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MonoAndroid bindings issues: IMediaSourceFactory and DownloadService

ivs88 opened this issue Β· comments

commented

πŸ”™ Regression

Hi, I've found couple issues in the latest MonoAndroid 12.0 build 2.18.9-xamarin.1

  1. Media source factory classes (DefaultMediaSourceFactory, ProgressiveMediaSource.Factory, etc) don't implement IMediaSourceFactory interface. So you can't properly initialize ExoPlayer.
  2. I've tried to use DownloadService and it throws excpetion "has no zero argument constructor". I'm not sure what's wrong, tried all variations of constructors with no luck. To reproduce this you can subclass DownloadService, add dummy implementation for missing members, add default constructor and call StartService().
  3. DownloadService is missing ACTION_RESTART constant

Version: 2.18.9-xamarin.1

Platform:

  • πŸ€– Android

The nuget you are referencing is not an official nuget by me. Also MonoAndroid is deprecated.

commented

The nuget you are referencing is not an official nuget by me. Also MonoAndroid is deprecated.

@martijn00 Sorry, I saw recent activity in #145 and thought it's a good place. But FYI: I think issues 2 and 3 are also happening in your nuget.

@janwiebe-jump do you have any plans on supporting MonoAndroid? If yes, could you take a look at issues above?

https://www.nuget.org/packages/Xam.Plugins.Android.ExoPlayer/2.18.9-xamarin.1

I've added a Xamarin based nuget too now. Please open a PR to fix any binding errors so i can update this.

commented

@martijn00 Thanks, I've tried 2.18.9-xamarin.1 and it has same issues I've described above (except WorkManager package version, removed that from description). Would you like to reopen this ticket?

I have no time to work on fixing this myself, but am open to PR's. Please open one for this, or maybe @janwiebe-jump or @ArchangelWTF can do it?

commented

I figured out the 2nd, it turns out that missing constructor is a general xamarin bindings limitation and the workaround would be to use ExportAttribute
https://learn.microsoft.com/en-us/xamarin/android/internals/limitations#missing-constructors

Hello, this issue is now still happening on the official monodroid package ?
Can it be re opened ?

@martijn00 I have made a Pull request but I am not sure if I have to bump the version.

#182