Giter Site home page Giter Site logo

Comments (8)

gateshibill avatar gateshibill commented on June 17, 2024

I hava the same question,
other player can receice bluetooth cmd.

from audioplayer.

moda20 avatar moda20 commented on June 17, 2024

For bluetooth commands and any other media commands ( controllers, wire headphones, ...) you can check my fork of this library. https://github.com/moda20/audioplayer
It is outdated a little bit compared to this one especially for the iOS side, but for android the command listeners are well implemented.

from audioplayer.

gateshibill avatar gateshibill commented on June 17, 2024

For bluetooth commands and any other media commands ( controllers, wire headphones, ...) you can check my fork of this library. https://github.com/moda20/audioplayer It is outdated a little bit compared to this one especially for the iOS side, but for android the command listeners are well implemented.

thank moda20,
you provide audioplayer is different to rxlabz/audioplayer,it has no the audioPlayer.onPlaybackKeyEvent().
if I use your audioplayer ,will I do more code to adapt it?

from audioplayer.

moda20 avatar moda20 commented on June 17, 2024

it has onPlaybackKeyEvent. check the docs on the repo. my version shouldn't be much different from this repo.

from audioplayer.

gateshibill avatar gateshibill commented on June 17, 2024

rxlabz/audioplayer doesn't have onPlaybackKeyEvent,

from audioplayer.

gateshibill avatar gateshibill commented on June 17, 2024

it has onPlaybackKeyEvent. check the docs on the repo. my version shouldn't be much different from this repo.
moda20/audioplayer is very good,has the onPlaybackKeyEvent.
i am using it instead of rxlabz/audioplayer.
i don't know it whether include all featrues rxlabz/audioplayer has.

from audioplayer.

gateshibill avatar gateshibill commented on June 17, 2024

W/Choreographer(15953): Frame time is 17.409424 ms in the future! Check that graphics HAL is generating vsync timestamps using the correct timebase.
W/Choreographer(15953): Frame time is 16.27997 ms in the future! Check that graphics HAL is generating vsync timestamps using the correct timebase.
D/ViewRootImpl(15953): DisplayId = 0
I/MediaBrowserService(15953): No root for client com.android.bluetooth from service android.service.media.MediaBrowserService$ServiceBinder$1
D/AndroidRuntime(15953): Shutting down VM
E/AndroidRuntime(15953): FATAL EXCEPTION: main
E/AndroidRuntime(15953): Process: com.freejoy.music, PID: 15953
E/AndroidRuntime(15953): java.lang.RuntimeException: Unable to stop service bz.rxla.audioplayer.AudioplayerPlugin@40c9b0d: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.media.session.MediaSession.release()' on a null object reference
E/AndroidRuntime(15953): at android.app.ActivityThread.handleStopService(ActivityThread.java:4048)
E/AndroidRuntime(15953): at android.app.ActivityThread.access$1900(ActivityThread.java:233)
E/AndroidRuntime(15953): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1917)
E/AndroidRuntime(15953): at android.os.Handler.dispatchMessage(Handler.java:106)
E/AndroidRuntime(15953): at android.os.Looper.loop(Looper.java:233)
E/AndroidRuntime(15953): at android.app.ActivityThread.main(ActivityThread.java:7225)
E/AndroidRuntime(15953): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(15953): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:499)
E/AndroidRuntime(15953): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:962)
E/AndroidRuntime(15953): Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.media.session.MediaSession.release()' on a null object reference
E/AndroidRuntime(15953): at bz.rxla.audioplayer.AudioplayerPlugin.onDestroy(AudioplayerPlugin.java:199)
E/AndroidRuntime(15953): at android.app.ActivityThread.handleStopService(ActivityThread.java:4028)
E/AndroidRuntime(15953): ... 8 more
I/Process (15953): Sending signal. PID: 15953 SIG: 9
Lost connection to device.

from audioplayer.

gateshibill avatar gateshibill commented on June 17, 2024

it has onPlaybackKeyEvent. check the docs on the repo. my version shouldn't be much different from this repo.

with moda20/audioplayer ,app collapse when the Bluetooth switch of the mobile phone is switched,from close to open.
if with rxlabz/audioplayer,it it normal.

log as the following:
W/Choreographer(15953): Frame time is 17.409424 ms in the future! Check that graphics HAL is generating vsync timestamps using the correct timebase.
W/Choreographer(15953): Frame time is 16.27997 ms in the future! Check that graphics HAL is generating vsync timestamps using the correct timebase.
D/ViewRootImpl(15953): DisplayId = 0
I/MediaBrowserService(15953): No root for client com.android.bluetooth from service android.service.media.MediaBrowserService$ServiceBinder$1
D/AndroidRuntime(15953): Shutting down VM
E/AndroidRuntime(15953): FATAL EXCEPTION: main
E/AndroidRuntime(15953): Process: com.freejoy.music, PID: 15953
E/AndroidRuntime(15953): java.lang.RuntimeException: Unable to stop service bz.rxla.audioplayer.AudioplayerPlugin@40c9b0d: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.media.session.MediaSession.release()' on a null object reference
E/AndroidRuntime(15953): at android.app.ActivityThread.handleStopService(ActivityThread.java:4048)
E/AndroidRuntime(15953): at android.app.ActivityThread.access$1900(ActivityThread.java:233)
E/AndroidRuntime(15953): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1917)
E/AndroidRuntime(15953): at android.os.Handler.dispatchMessage(Handler.java:106)
E/AndroidRuntime(15953): at android.os.Looper.loop(Looper.java:233)
E/AndroidRuntime(15953): at android.app.ActivityThread.main(ActivityThread.java:7225)
E/AndroidRuntime(15953): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(15953): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:499)
E/AndroidRuntime(15953): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:962)
E/AndroidRuntime(15953): Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.media.session.MediaSession.release()' on a null object reference
E/AndroidRuntime(15953): at bz.rxla.audioplayer.AudioplayerPlugin.onDestroy(AudioplayerPlugin.java:199)
E/AndroidRuntime(15953): at android.app.ActivityThread.handleStopService(ActivityThread.java:4028)
E/AndroidRuntime(15953): ... 8 more
I/Process (15953): Sending signal. PID: 15953 SIG: 9
Lost connection to device.

from audioplayer.

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.