feat(wearable): add ANCS notification attributes parser and model - #3747
Open
digivasserver-ai wants to merge 2 commits into
Open
feat(wearable): add ANCS notification attributes parser and model#3747digivasserver-ai wants to merge 2 commits into
digivasserver-ai wants to merge 2 commits into
Conversation
added 2 commits
August 29, 2026 01:31
First block of the notification bridge for WearOS support (microg#2843). Implements parsing of ANCS 'Get Notification Attributes' Data Source frames into a structured value object (uid, app identifier, title, subtitle, message, message size, date, action labels) with strict bounds checking, plus a Control Point request builder. Pure JVM, covered by 7 unit tests.
|
Can you please provide a video of you pairing your watch with your phone using this version? |
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The first, fully self-contained block toward the notification bridge for WearOS support (#2843): a pure-JVM ANCS (Apple Notification Center Service) notification-attributes parser and model.
AncsNotifications.parse(byte[])decodes a Notification Attributes Data Source frame into a structured value object (notificationUid,appIdentifier,title,subtitle,message,messageSize,date, positive/negative action labels).AncsNotifications.readAttributesRequest(uid, ids…)builds the matching Control Point request.com.google.android.gms.wearable.AncsNotification, ready to be routed viaWearableListenerService#onNotificationReceived.Why
The
AncsNotificationAPI surface is currently an empty interface andinjectAncsNotificationForTestingis unimplemented — there is no notification path at all on the wear side. This is the parsing/transport-adjacent core that the companion notification flow needs regardless of which Bluetooth transport lands first.Verification
AncsNotificationsTest) covering full frames, theMESSAGE_SIZEuint32 special case, unknown-attribute skipping, and malformed/truncated rejection — all passing (verified standalone withjunit:junit:4.13.2).Next steps (tracked, device-dependent)
WearableListenerService.