Skip to content

MediaButtonReceiver and KEYCODE_HEADSETHOOK #1581

Description

@DavidEdwardsBL

Version

Media3 main branch

More version details

No response

Devices that reproduce the issue

SDK_INT >= 26

Devices that do not reproduce the issue

No response

Reproducible in the demo app?

Not tested

Reproduction steps

  1. Run a media app
  2. Play some content
  3. Pause it
  4. Swipe the app away from recents
  5. Make a headset hook event adb shell input keyevent 79

Expected result

The App should behave as if a play event was received.

Actual result

The App delivers

Ignore key event that is not a play command on API 26 or above to avoid an 'ForegroundServiceDidNotStartInTimeException'

Related issue: #1493

The headset hook key event is not taken into account when only allowing a play command through the MediaButtonReceiver.

Media

n/a

Bug Report

  • You will email the zip file produced by adb bugreport to [email protected] after filing this issue.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions