Coder Social home page Coder Social logo

Comments (12)

OxygenCobalt avatar OxygenCobalt commented on August 15, 2024 1

@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.

from auxio.

OxygenCobalt avatar OxygenCobalt commented on August 15, 2024 1

@foldfree I think I may have gotten the intent structure wrong. Try this APK?

Auxio_GadgetBridge2.zip

from auxio.

OxygenCobalt avatar OxygenCobalt commented on August 15, 2024 1

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.

from auxio.

OxygenCobalt avatar OxygenCobalt commented on August 15, 2024

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.

from auxio.

Golbinex avatar Golbinex commented on August 15, 2024

I use Mi Band 6, so an external smart band.

from auxio.

OxygenCobalt avatar OxygenCobalt commented on August 15, 2024

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.

from auxio.

OxygenCobalt avatar OxygenCobalt commented on August 15, 2024

@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.

Auxio_GadgetBridge.zip

from auxio.

foldfree avatar foldfree commented on August 15, 2024

I tried multiple times and the app crash when i press either pause or next, previous.
I shared the log below

https://pastebin.com/7N4FZ6wZ

PS: I'm not sure if thoses logs are relevant, let me know if I need to do something else.

from auxio.

foldfree avatar foldfree commented on August 15, 2024

@foldfree I think I may have gotten the intent structure wrong. Try this APK?

Auxio_GadgetBridge2.zip

Thanks, it works perfect, tried all the buttons.

from auxio.

OxygenCobalt avatar OxygenCobalt commented on August 15, 2024

Fantastic. Let me clean up this implementation and I'll close the issue.

from auxio.

foldfree avatar foldfree commented on August 15, 2024

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.

from auxio.

OxygenCobalt avatar OxygenCobalt commented on August 15, 2024

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)

Auxio_2.3.0_GadgetBridgeFix.zip

from auxio.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.