Comments (6)
This is happening because the service is never set to Foreground which is due to the initialization of the PlayerNotificationManager is happening incorrectly. The PlayerNotificationManager is being built on line 118. but one of it's parameters isn't is null when it's invoked: https://github.com/Baseflow/XamarinMediaManager/blob/develop/MediaManager/Platforms/Android/MediaSession/MediaBrowserService.cs#L118
Since the NotificationListener is properly constructed on the next line, switching those two lines will resolve the problem.
from xamarinmediamanager.
@ArchangelWTF @janwiebe-jump can you help me?
from xamarinmediamanager.
same here. I noticed the app is crashing/closing after 10-15 mins when the app is in the background/foreground.
from xamarinmediamanager.
Same issue here. It woks fine when the phone is charging, but otherwise after 2-3 minutes the audio stops. I'm trying to play an stream.
Platform: Android (Android 13)
MAUI (.net 7)
Plugin.MediaManager 1.2.2
from xamarinmediamanager.
Maybe you need to aquire a wifi lock to support streaming content.
from xamarinmediamanager.
Android devices has battery optimization settings for the apps. Could you try to get this permission and see that's work for you.
if (Build.VERSION.SdkInt >= BuildVersionCodes.M) { String? packageName = Platform.CurrentActivity?.PackageName; Android.Content.Intent intent = new Android.Content.Intent(); intent.SetAction(Android.Provider.Settings.ActionRequestIgnoreBatteryOptimizations); intent.SetData(Android.Net.Uri.Parse("package:" + packageName)); Platform.CurrentActivity?.StartActivity(intent); }
Also add this to manifest
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
from xamarinmediamanager.
Related Issues (20)
- PlayingNext() doesnt work on Android and Play works only on iOS
- Java.Lang.NoClassDefFoundError com.google.android.exoplayer2.source.ConcatenatingMediaSource in version 1.2.2 HOT 1
- Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent. Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles. HOT 2
- Player not loaded, notification not displayed also even with the android 12 patch branch and also with the android 12 2023 branch !!!
- 1.2.2 could crash on earlier Android devices when starting the foreground service. HOT 3
- Ios doesnt play from queue
- Event fired when an element inside of a list of elements sent to play finishes
- Replace conditional compilation with partial classes
- Why version 1.2.2 not support Xamarin?
- Can we change the playback control images of the player using media manager plugin HOT 4
- VideoView Play, Pause and Progressbar controls are not showing on iOS 16+ HOT 1
- M3u8 video playing issue
- Any plans to support WASM / WebAssembly?
- Why no support for `NET7` - and is it planned?
- PositionChanged in milliseconds
- MediaManagerBase.TimerInterval
- MediaManager stops after locking screen HOT 8
- PARAMETER_TS_ALLOW_NON_IDR_AVC_KEYFRAMES
- Cannot play audio from stream in Android HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xamarinmediamanager.