Giter Club home page Giter Club logo

Comments (1)

patrickjquinn avatar patrickjquinn commented on May 28, 2024

I'll give that a go 🙂

Worth pointing out that bluetooth events should probably automatically link up with the remote button events receiver by default.

It stops listening for events on recent Android versions once the app accepting them no longer has audio focus. i.e I implemented

private void askForAudioFocus () {
		mAudioManager.requestAudioFocus(changedListener, AudioManager.STREAM_MUSIC, AudioManager.AUDIOFOCUS_GAIN);
}

Which I called when an event happened (to ensure we maintain audio focus), on my own fork of the OG repo and that fixed the play/pause issue (also worked when the app was backgrounded).

I think "skip / next" was supposed to be handled by the system on older Android versions (according to a comment i've seen on older forks of the original music controls repo) but that behaviour has since changed.

All in all I think properly hooking bluetooth events is the way to go 👍

Will let you know what I find!

from capacitor-music-controls-plugin-new.

Related Issues (9)

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.