Skip to content
New issue

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

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

Already on GitHub? # to your account

App crashes when trying to play songs #6

Closed
ghost opened this issue Apr 10, 2022 · 2 comments
Closed

App crashes when trying to play songs #6

ghost opened this issue Apr 10, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@ghost
Copy link

ghost commented Apr 10, 2022

Hello!

I've just found out about this amazing app! I've been waiting for someone to develop a music-focused application based on the NewPipe Extractor, and you've managed to do that with a simple, great user interface!

Unfortunately I'm not able to play songs on my device. When trying to play songs from the Explore section and even downloaded ones the app crashes instantly. Sometimes the song starts playing but the app crashes anyway. I believe the problem is somehow related to my Android version, 12. I'm sending you the crash log I got:

time: 1649558544066
msg: java.lang.IllegalArgumentException: com.zionhuang.music: 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.
stacktrace: java.lang.IllegalArgumentException: com.zionhuang.music: 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.getActivityAsUser(PendingIntent.java:458)
	at android.app.PendingIntent.getActivity(PendingIntent.java:444)
	at android.app.PendingIntent.getActivity(PendingIntent.java:408)
	at com.zionhuang.music.playback.SongPlayer$playerNotificationManager$1.createCurrentContentIntent(SongPlayer.kt:5)
	at com.google.android.exoplayer2.ui.PlayerNotificationManager.startOrUpdateNotification(PlayerNotificationManager.java:96)
	at com.google.android.exoplayer2.ui.PlayerNotificationManager$$ExternalSyntheticLambda0.handleMessage(R8$$SyntheticClass:5)
	at android.os.Handler.dispatchMessage(Handler.java:102)
	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)

Thanks!

@z-huang z-huang added the bug Something isn't working label Apr 10, 2022
@z-huang
Copy link
Owner

z-huang commented Apr 10, 2022

Thanks for the positive feedback! I'll keep perfecting the app.
The cause of bug might be a parameter of a flag I missed when handling the click action of the media notification. I'll use an Android emulator to check further. Thanks for reporting the bug.

@z-huang
Copy link
Owner

z-huang commented Apr 11, 2022

Adding missing FLAG_IMMUTABLE may fix the issue: 7214b3d

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant