Closed Golbinex closed 2 years ago
Do you use an Android Wear smartwatch or an external smartwatch, like pebble? If it's the former, then I haven't added Android Wear support yet. If it's the latter, then theres something wrong with Auxio's MediaSession implementation again.
I use Mi Band 6, so an external smart band.
Probably a MediaSession issue again then, my implementation is a broken mess. I'll lump it in with #52 and address it eventually. What's curious is that the app doesn't even show up in the menu. I have zero idea how that is happening, which makes me wonder if it's some other issue.
@Golbinex I actually think I figured out the issue. Gadgetbridge queries for BroadcastReciever
instances in the app manifest that handle the Intent.ACTION_MEDIA_BUTTON
intent. Auxio does not do expose such, as it instead relies on the media session to intercept media button events.
I doubt I can fix this issue on my end, as my only options are reintroducing #20 or having every media button press result in it calling twice. I would recommend reporting this as an issue to the Gadgetbridge developers. Their code should be able to handle apps that only expose a MediaSession
instead of using an implementation straight out of 2011.
For more info, this is the offending piece of code.
@Golbinex @foldfree
I found a way around this issue. The media library does actually expose it's BroadcastReceiver
under androidx.media.session.MediaButtonReceiver
. So, I believe it's possible to hack around this issue by simply exposing that library class in my manifest.
Can you guys try this debug APK? [Rename the extension] I don't have a smartwatch, so I'm only able to confirm that GadgetBridge detects the media button intent and not if it can use it.
I tried multiple times and the app crash when i press either pause or next, previous. I shared the log below
PS: I'm not sure if thoses logs are relevant, let me know if I need to do something else.
@foldfree I think I may have gotten the intent structure wrong. Try this APK?
@foldfree I think I may have gotten the intent structure wrong. Try this APK?
Thanks, it works perfect, tried all the buttons.
Fantastic. Let me clean up this implementation and I'll close the issue.
Media control is not responsive with the latest release (2.3.0) I checked back with 2.2.2 and it worked so something broke it after that release.
Oh, you have got to be kidding me. I removed the BroadcastReciever code (while keeping the manifest entry) assuming that the MediaSession had some code somewhere that would handle it normally, and that my own code was largely redundant. I was completely wrong, it turns out. I'll write a fix.
If you want, heres a 2.3.0* build with the fix in. I'm only doing this since this fix will likely arrive in a 2.4.0 (which could be a ways away with the changes I'm working on)
Describe the bug/crash:
Gadgetbridge is a FOSS app for controlling smart watches and bands. It also supports controlling media playback from watches. Most players are supported and play/pause, forward/rewind actions on the gadget are working. However on Auxio I can only see the name of played track and change volume. Auxio is not visible in Gadgetbridge music player list.
Steps To Reproduce the bug/crash:
Logs/Stack Traces:
Screenshots:
Phone Information:
Android 12
Due Diligence: