Baseflow / Baseflow/XamarinMediaManager

Player not loaded, notification not displayed also even with the android 12 patch branch and also with the android 12 2023 branch !!!

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

Description

Player not loaded, notification not displayed also even with the android 12 patch branch and also with the android 12 2023 branch !!!

here is the error I'm getting :

```
Java.Lang.IllegalArgumentException: com.xxx.app: 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.
at Java.Interop.JniEnvironment+InstanceMethods.CallNonvirtualVoidMethod (Java.Interop.JniObjectReference instance, Java.Interop.JniObjectReference type, Java.Interop.JniMethodInfo method, Java.Interop.JniArgumentValue* args) [0x00088] in /Users/runner/work/1/s/xamarin-android/external/Java.Interop/src/Java.Interop/obj/Release/JniEnvironment.g.cs:12324
at Java.Interop.JniPeerMembers+JniInstanceMethods.FinishCreateInstance (System.String constructorSignature, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) [0x0003e] in /Users/runner/work/1/s/xamarin-android/external/Java.Interop/src/Java.Interop/Java.Interop/JniPeerMembers.JniInstanceMethods.cs:174
at Android.Support.V4.Media.Session.MediaSessionCompat..ctor (Android.Content.Context context, System.String tag) [0x0008a] in D:\a\1\s\generated\androidx.media.media\obj\Release\monoandroid9.0\generated\src\Android.Support.V4.Media.Session.MediaSessionCompat.cs:1651
at MediaManager.Platforms.Android.MediaSession.MediaBrowserService.PrepareMediaSession () [0x00001] in D:\Devlopement\xxx\xx\src\xxxMobileApp\Lib\XamarinMediaManager-patch\MediaManager\Platforms\Android\MediaSession\MediaBrowserService.cs:91
at MediaManager.Platforms.Android.MediaSession.MediaBrowserService.OnCreate () [0x00009] in D:\Devlopement\xxx\xxx\src\xxxMobileApp\Lib\XamarinMediaManager-patch\MediaManager\Platforms\Android\MediaSession\MediaBrowserService.cs:49
--- End of managed Java.Lang.IllegalArgumentException stack trace ---
java.lang.IllegalArgumentException: com.xxx.app: 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.
at android.app.PendingIntent.checkFlags(PendingIntent.java:375)
at android.app.PendingIntent.getBroadcastAsUser(PendingIntent.java:645)
at android.app.PendingIntent.getBroadcast(PendingIntent.java:632)
at android.support.v4.media.session.MediaSessionCompat.(MediaSessionCompat.java:568)
at android.support.v4.media.session.MediaSessionCompat.(MediaSessionCompat.java:538)
at android.support.v4.media.session.MediaSessionCompat.(MediaSessionCompat.java:502)
at android.support.v4.media.session.MediaSessionCompat.(MediaSessionCompat.java:476)
at crc646e364d2ff34954e7.MediaBrowserService.n_onCreate(Native Method)
at crc646e364d2ff34954e7.MediaBrowserService.onCreate(MediaBrowserService.java:35)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:4487)
at android.app.ActivityThread.access$1700(ActivityThread.java:247)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2072)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7839)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
[Choreographer] Skipped 163 frames! The application may be doing too much work on its main thread.
[OpenGLRenderer] Davey! duration=2749ms; Flags=0, FrameTimelineVsyncId=69913, IntendedVsync=19126012349465, Vsync=19128729016023, InputEventId=0, HandleInputStart=19128737532016, AnimationStart=19128737556516, PerformTraversalsStart=19128738214116, DrawStart=19128748697016, FrameDeadline=19126045682797, FrameInterval=19128737296016, FrameStartTime=16666666, SyncQueued=19128756498316, SyncStart=19128757157416, IssueDrawCommandsStart=19128757434616, SwapBuffers=19128760740016, FrameCompleted=19128762522816, DequeueBufferDuration=28800, QueueBufferDuration=893700, GpuCompleted=19128762376316, SwapBuffersCompleted=19128762522816, DisplayPresentTime=0,
Message :Value cannot be null.
Resolved pending breakpoint at 'RemoteGenericRepository.cs:52,1' to void xxxApp.Repository.RemoteGenericRepository.d__2.MoveNext () [0x00195].
Resolved pending breakpoint at 'RemoteGenericRepository.cs:52,13' to void xxxApp.Repository.RemoteGenericRepository.d__2.MoveNext () [0x00195].
[Choreographer] Skipped 69 frames! The application may be doing too much work on its main thread.
[EGL_emulation] app_time_stats: avg=721.57ms min=282.37ms max=1160.76ms count=2
[OpenGLRenderer] Davey! duration=1178ms; Flags=0, FrameTimelineVsyncId=69961, IntendedVsync=19128745682689, Vsync=19129895682643, InputEventId=0, HandleInputStart=19129910386616, AnimationStart=19129910427716, PerformTraversalsStart=19129910512616, DrawStart=19129911044416, FrameDeadline=19128779016021, FrameInterval=19129909707116, FrameStartTime=16666666, SyncQueued=19129915981716, SyncStart=19129916385616, IssueDrawCommandsStart=19129916516016, SwapBuffers=19129920810016, FrameCompleted=19129924707016, DequeueBufferDuration=605500, QueueBufferDuration=1356900, GpuCompleted=19129923157716, SwapBuffersCompleted=19129924707016, DisplayPresentTime=0,
[EGL_emulation] app_time_stats: avg=161.63ms min=4.29ms ma
```

_Originally posted by @abdoutech93 in https://github.com/Baseflow/XamarinMediaManager/issues/866#issuecomment-1463841140_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.