Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android App Crashes on Devices with OS Version 31 and Above #25

Open
KinjalDhamat312 opened this issue Apr 14, 2023 · 2 comments
Open

Comments

@KinjalDhamat312
Copy link

The Flutter_video_cast library seems to function correctly on Android devices with an operating system version of 30 or earlier. However, it crashes on devices with version 31 and higher. Below is the crash log for reference.

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:408)
       at android.app.PendingIntent.getBroadcastAsUser(PendingIntent.java:688)
       at android.app.PendingIntent.getBroadcast(PendingIntent.java:675)
       at com.google.android.gms.cast.framework.media.internal.zzm.zza(zzm.java:46)
       at com.google.android.gms.cast.framework.CastSession$zza.onResult(CastSession.java:11)
       at com.google.android.gms.common.api.internal.BasePendingResult$CallbackHandler.handleMessage(BasePendingResult.java:11)
       at android.os.Handler.dispatchMessage(Handler.java:106)
       at android.os.Looper.loopOnce(Looper.java:226)
       at android.os.Looper.loop(Looper.java:313)
       at android.app.ActivityThread.main(ActivityThread.java:8757)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)
@socialweb-iaraya
Copy link

socialweb-iaraya commented Apr 18, 2023

Hey @KinjalDhamat312 I was having the same issue, can you update your dependencies like this and see how it goes?

dependencies {
...
implementation 'com.google.android.gms:play-services-cast-framework:20.1.0'
implementation 'com.google.android.exoplayer:extension-cast:2.11.5'
implementation 'androidx.work:work-runtime-ktx:2.7.1'
}

@KinjalDhamat312
Copy link
Author

Issue is resolved after upgrading dependencies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants