Results 1 to 9 of 9

Thread: [Android] a couple issues with Bluetooth and wired earphones

  1. #1

    [Android] a couple issues with Bluetooth and wired earphones

    I'm on Android 7

    1. I need to launch foobar2000 and press home button to keep foobar running. if I tap back twice to exit foobar, foobar won't play/start when bluetooth or wired earphone is connected (advanced option already checked start playback when earphone is plugged in). it looks like foobar doesn't tell Android that it's a music player and doesn't tell Android that it can be a player when bluetooth device conencts

    2. metadata (title, album, artist...etc) are displayed properly during bluetooth playback on the screen, but foobar stops displaying/sending meta data on some of the pause and resume

    3. with all other music players, they pause playback when I power down or unplugged earphone such that playback resumes when I power up and reconnect the earphone. However, foobar simply restart the song in this situation

  2. #2

    Re: [Android] a couple issues with Bluetooth and wired earphones

    As far as 1. I believe that is the intended intention.
    The app toast warns you that clicking back again would exit:
    So, click recents button and switch to other app or click home as you have done are currently your options.
    Stock Android does not currently support headphone detections. Therefore, apps only detects connections when they are running in memory.
    To force detection would be to have service running at boot all the time, which should never be the case.
    However, some custom ROMs support it by launching default app: http://gerrit.dirtyunicorns.com/*/c/6171/
    So there is not much devs can do in this case

    One thing could be having a dedicated "Exit" button in slide drawer, but that would need slide drawer implementation:


    I recommend taking a look at the design of Aimp player, which is very nice:

    It uses bass library instead of ffmpeg which is a drawback, as it causea stutter and crackles on some devices.

  3. #3

    Re: [Android] a couple issues with Bluetooth and wired earphones

    since foobar isn't reporting itself as music player, I'm not able to tell Android to launch foobar as default player when headphone or bluetooth devices are connected. when I tap on the media file, the only available programs are Google Music, Poweramp and Music Folder Player&*8206;. foobar isn't available to play the FLAC file

  4. #4

    Re: [Android] a couple issues with Bluetooth and wired earphones

    Quote Originally Posted by supercoolman View Post
    since foobar isn't reporting itself as music player, I'm not able to tell Android to launch foobar as default player when headphone or bluetooth devices are connected. when I tap on the media file, the only available programs are Google Music, Poweramp and Music Folder Player&*8206;. foobar isn't available to play the FLAC file
    I guess app needs to register intents: https://stackoverflow.com/a/15768688

    • https://github.com/android/platform_...nifest.xml*L41
      Code:
                  <intent-filter>
                      <action android:name="android.intent.action.MAIN" />
                      <action android:name="android.intent.action.MUSIC_PLAYER" />
                      <category android:name="android.intent.category.DEFAULT" />
                      <category android:name="android.intent.category.LAUNCHER" />
                      <category android:name="android.intent.category.APP_MUSIC" />
      </intent-filter>
    • https://github.com/vanilla-music/van...nifest.xml*L51
      Code:
      			<intent-filter>
      				<action android:name="android.intent.action.MAIN" />
      				<category android:name="android.intent.category.LAUNCHER" />
      				<category android:name="android.intent.category.APP_MUSIC" />
      				<category android:name="android.intent.category.DEFAULT" />
      			</intent-filter>

    <intent-filter> needs to be added to an activity in manifest file, ssee above examples from aosp music and vanilla music
    Currently, I believe only the following are used:
    Code:
                <intent-filter>
                    <action android:name="android.intent.action.MAIN" />
                    <category android:name="android.intent.category.LAUNCHER" />
                </intent-filter>
    Last edited by rancidfrog; May 22nd, 2017 at 11:43 AM.

  5. #5

    Re: [Android] a couple issues with Bluetooth and wired earphones

    yup, that's probably the root cause/bug

  6. #6
    Administrator
    Join Date
    Feb 2014
    Posts
    430

    Re: [Android] a couple issues with Bluetooth and wired earphones

    Noted, thanks for all the info.

  7. #7
    Administrator
    Join Date
    Feb 2014
    Posts
    430

    Re: [Android] a couple issues with Bluetooth and wired earphones

    OK, additional manifest lines added for the next update. I seem to be unable to verify if they change anything though, as in typical Android fashion none of the discussed behaviors appear on devices that I own, and other players (I use VLC as a reference) are not automatically started on headphone attach either. Time to buy some Nexus 5X I guess.

    Regarding playback of media files sent from various file explorer apps-
    We handled "file" scheme as used by older Android versions. As of modern Android versions this is no longer used, we get "content" scheme instead and have to go through the proper frameworks to access the file.
    As far as I know this is fixed in the current beta version (1.0.76). In Android 7 emulator we do play files sent from SD card browser.

    supercoolman: I've added you to the beta tester list - go to http://foobar2000.org/test-android to start receiving beta versions.

    Also,
    2. metadata (title, album, artist...etc) are displayed properly during bluetooth playback on the screen, but foobar stops displaying/sending meta data on some of the pause and resume
    Do you mean on the lock screen? Please clarify. Thanks.

  8. #8

    Re: [Android] a couple issues with Bluetooth and wired earphones

    Quote Originally Posted by Peter View Post
    OK, additional manifest lines added for the next update. I seem to be unable to verify if they change anything though, as in typical Android fashion none of the discussed behaviors appear on devices that I own, and other players (I use VLC as a reference) are not automatically started on headphone attach either. Time to buy some Nexus 5X I guess.

    Regarding playback of media files sent from various file explorer apps-
    We handled "file" scheme as used by older Android versions. As of modern Android versions this is no longer used, we get "content" scheme instead and have to go through the proper frameworks to access the file.
    As far as I know this is fixed in the current beta version (1.0.76). In Android 7 emulator we do play files sent from SD card browser.

    supercoolman: I've added you to the beta tester list - go to http://foobar2000.org/test-android to start receiving beta versions.

    Also,
    Do you mean on the lock screen? Please clarify. Thanks.
    *2 was seen when playing over bluetooth on car system with metadata (title, artist, album...etc) display on a screen. I was fiddling with foobar to see why foobar doesn't start playing music when bluetooth connection is made. car system can was probably the closest to earphone yet with some display for simple debug

  9. #9

    Re: [Android] a couple issues with Bluetooth and wired earphones

    Hi,

    I have an Honor 7 and would be happy to join the beta group if it would help in development?

    Being able to set Foobar as a default app would be desirable, not a big fan of stock player.

    Cheers,

    Stephen

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •