vitorpamplona / amethyst

Nostr client for Android
MIT License
1.08k stars 148 forks source link

[BUG] Amethyst is always playing media when I enter my car and my phone connects to bluetooth #971

Open owen1917 opened 2 weeks ago

owen1917 commented 2 weeks ago

Describe the bug My phone connects to my car via Bluetooth (not Android Auto - plain old Bluetooth). When I enter the car, my phone automatically connects to Bluetooth which automatically starts playing media from Amethyst, even though the app is not in active use.

To Reproduce Steps to reproduce the behavior:

  1. Connect your Android device to a car media system via Bluetooth
  2. Leave the car/disconnect from the car Bluetooth
  3. Open Amethyst, casually scroll your feed (making sure to scroll past some video content)
  4. Put the Phone to sleep
  5. Enter the car/connect to the car Bluetooth
  6. Car media system is playing the audio from the last video that I viewed on my Amethyst feed

Expected behavior Amethyst should ideally never be playing media through the car sound system, unless I explicitly open the app and watch a video with the app in the foreground.

Video and Screenshots IMG_20240702_082353_725

Screenshot_20240702-082419

Device (please complete the following information):

Bounty (in Bitcoin sats) offered for a solution 20k sats

davotoula commented 2 weeks ago

Oh yeah, I get exactly the same thing.

It could be an android "feature" rather than an amethyst bug but let's see what others think.

I tried a few things. Android keeps the latest used app in the "media drawer".

Sometimes the media keeps playing even after closing amethyst.. Could be background play functionality but there is no sound from phone.

This will then start playing sound on a new Bluetooth connection like a car.

owen1917 commented 2 weeks ago

Oh yeah, I get exactly the same thing.

It could be an android "feature" rather than an amethyst bug but let's see what others think.

I tried a few things. Android keeps the latest used app in the "media drawer".

Sometimes the media keeps playing even after closing amethyst.. Could be background play functionality but there is no sound from phone.

This will then start playing sound on a new Bluetooth connection like a car.

I agree, this is likely a core Android functionality.

I believe the expected behavior is for the player to disappear when the app goes into the background, which it does.

However, as a user, I often use Amethyst and then put my device to sleep. When I later get into my car and Amethyst is the last app used, I wouldn't expect it to start playing automatically.

In contrast, Primal does not seem to utilize this functionality at all and does not have this issue.

I question whether there is even a real use case for Amethyst utilizing this Android feature, as I doubt anyone is actively using the background player.

davotoula commented 2 weeks ago

17201315489060.png

Try disabling Now playing notifications?

owen1917 commented 2 weeks ago

Try disabling Now playing notifications?

I tried this, unfortunately the issue still occurs