Allow users to remap the Bluetooth headset "next" button to create a
bookmark at the current playback position instead of jumping forward.
This is useful for headsets that intercept multi-press gestures at the
firmware level, making other trigger mechanisms unreliable.
Adds a new toggle in Settings > Playback Settings, backed by a mediaNextButtonCreateBookmark device setting (defaults to off).
When enabled, KEYCODE_MEDIA_NEXT creates a bookmark via the server API;
when disabled, it retains the original jump-forward behavior.
Android only. The media button handling (MediaSessionCallback, PlayerNotificationService) and the bookmark API call (ApiHandler) are all in the Android native Kotlin layer. The setting toggle in settings.vue is also protected behind v-if="!isiOS".
Does this change the frontend or the backend of the apps?
Both. The frontend (Vue/Nuxt) has a new toggle in the Settings page for the user to enable the remapping. The backend (Android native Kotlin) handles the actual media button interception, the bookmark creation logic, and the API call to the audiobookshelf server.
In-depth Description
The PR is fairly small so I can't give a more in-depth discussion than what's written at the top. In terms of whether this is a general problem or an issue specific to my set-up, I would say is somewhere in between. In issue #548 there are at least 4 users saying they would love to have this ability to create bookmarks without interacting with their phone, so that they can create bookmarks to come back to once they have access to their phone again.
How have you tested this?
I have built the app locally in Android studio, and connected my own phone (Google Pixel 10) via USB. Tested and validated working with my own bluetooth headphones (both with the new setting on and off).
Screenshots
The only UI change lies in the settings screen:
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
## 📋 Pull Request Information
**Original PR:** https://github.com/advplyr/audiobookshelf-app/pull/1823
**Author:** [@dcaixinha](https://github.com/dcaixinha)
**Created:** 3/12/2026
**Status:** 🔄 Open
**Base:** `master` ← **Head:** `add-support-for-bookmarks-on-bluetooth-headset`
---
### 📝 Commits (2)
- [`9603893`](https://github.com/advplyr/audiobookshelf-app/commit/96038937fea634ae86a09cdabdc50041ced16ea7) Add `android/.project` and `android/.settings/` to `android/.gitignore`
- [`fc855b9`](https://github.com/advplyr/audiobookshelf-app/commit/fc855b9f485815c2b98b588104142cc28c1f0e03) 🎧 Add option to remap media next button to create bookmark
### 📊 Changes
**8 files changed** (+80 additions, -4 deletions)
<details>
<summary>View changed files</summary>
📝 `android/.gitignore` (+4 -0)
📝 `android/app/src/main/java/com/audiobookshelf/app/data/DeviceClasses.kt` (+4 -2)
📝 `android/app/src/main/java/com/audiobookshelf/app/device/DeviceManager.kt` (+3 -0)
📝 `android/app/src/main/java/com/audiobookshelf/app/player/MediaSessionCallback.kt` (+12 -1)
📝 `android/app/src/main/java/com/audiobookshelf/app/player/PlayerNotificationService.kt` (+21 -0)
📝 `android/app/src/main/java/com/audiobookshelf/app/server/ApiHandler.kt` (+16 -0)
📝 `pages/settings.vue` (+18 -1)
📝 `strings/en-us.json` (+2 -0)
</details>
### 📄 Description
## Brief summary
Allow users to remap the Bluetooth headset "next" button to create a
bookmark at the current playback position instead of jumping forward.
This is useful for headsets that intercept multi-press gestures at the
firmware level, making other trigger mechanisms unreliable.
Adds a new toggle in Settings > Playback Settings, backed by a
`mediaNextButtonCreateBookmark` device setting (defaults to off).
When enabled, `KEYCODE_MEDIA_NEXT` creates a bookmark via the server API;
when disabled, it retains the original jump-forward behavior.
## Which issue is fixed?
Fixes #548
## Pull Request Type
**Does this affect only Android, only iOS, or both?**
Android only. The media button handling (`MediaSessionCallback`, `PlayerNotificationService`) and the bookmark API call (`ApiHandler`) are all in the Android native Kotlin layer. The setting toggle in `settings.vue` is also protected behind `v-if="!isiOS"`.
**Does this change the frontend or the backend of the apps?**
Both. The frontend (Vue/Nuxt) has a new toggle in the Settings page for the user to enable the remapping. The backend (Android native Kotlin) handles the actual media button interception, the bookmark creation logic, and the API call to the audiobookshelf server.
## In-depth Description
The PR is fairly small so I can't give a more in-depth discussion than what's written at the top. In terms of whether this is a general problem or an issue specific to my set-up, I would say is somewhere in between. In issue #548 there are at least 4 users saying they would love to have this ability to create bookmarks without interacting with their phone, so that they can create bookmarks to come back to once they have access to their phone again.
## How have you tested this?
I have built the app locally in Android studio, and connected my own phone (Google Pixel 10) via USB. Tested and validated working with my own bluetooth headphones (both with the new setting on and off).
## Screenshots
The only UI change lies in the settings screen:
<img width="1080" height="1861" alt="Screenshot_20260312-220644" src="https://github.com/user-attachments/assets/d119bd2d-ae0e-4523-bd8f-7d55a0d998bb" />
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/advplyr/audiobookshelf-app/pull/1823
Author: @dcaixinha
Created: 3/12/2026
Status: 🔄 Open
Base:
master← Head:add-support-for-bookmarks-on-bluetooth-headset📝 Commits (2)
9603893Addandroid/.projectandandroid/.settings/toandroid/.gitignorefc855b9🎧 Add option to remap media next button to create bookmark📊 Changes
8 files changed (+80 additions, -4 deletions)
View changed files
📝
android/.gitignore(+4 -0)📝
android/app/src/main/java/com/audiobookshelf/app/data/DeviceClasses.kt(+4 -2)📝
android/app/src/main/java/com/audiobookshelf/app/device/DeviceManager.kt(+3 -0)📝
android/app/src/main/java/com/audiobookshelf/app/player/MediaSessionCallback.kt(+12 -1)📝
android/app/src/main/java/com/audiobookshelf/app/player/PlayerNotificationService.kt(+21 -0)📝
android/app/src/main/java/com/audiobookshelf/app/server/ApiHandler.kt(+16 -0)📝
pages/settings.vue(+18 -1)📝
strings/en-us.json(+2 -0)📄 Description
Brief summary
Allow users to remap the Bluetooth headset "next" button to create a
bookmark at the current playback position instead of jumping forward.
This is useful for headsets that intercept multi-press gestures at the
firmware level, making other trigger mechanisms unreliable.
Adds a new toggle in Settings > Playback Settings, backed by a
mediaNextButtonCreateBookmarkdevice setting (defaults to off).When enabled,
KEYCODE_MEDIA_NEXTcreates a bookmark via the server API;when disabled, it retains the original jump-forward behavior.
Which issue is fixed?
Fixes #548
Pull Request Type
Does this affect only Android, only iOS, or both?
Android only. The media button handling (
MediaSessionCallback,PlayerNotificationService) and the bookmark API call (ApiHandler) are all in the Android native Kotlin layer. The setting toggle insettings.vueis also protected behindv-if="!isiOS".Does this change the frontend or the backend of the apps?
Both. The frontend (Vue/Nuxt) has a new toggle in the Settings page for the user to enable the remapping. The backend (Android native Kotlin) handles the actual media button interception, the bookmark creation logic, and the API call to the audiobookshelf server.
In-depth Description
The PR is fairly small so I can't give a more in-depth discussion than what's written at the top. In terms of whether this is a general problem or an issue specific to my set-up, I would say is somewhere in between. In issue #548 there are at least 4 users saying they would love to have this ability to create bookmarks without interacting with their phone, so that they can create bookmarks to come back to once they have access to their phone again.
How have you tested this?
I have built the app locally in Android studio, and connected my own phone (Google Pixel 10) via USB. Tested and validated working with my own bluetooth headphones (both with the new setting on and off).
Screenshots
The only UI change lies in the settings screen:
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.