Skip to content

add in record audio on AI glasses snippets#877

Merged
trambui09 merged 3 commits intoandroid:mainfrom
trambui09:tb/mic-access-projected-context
Apr 21, 2026
Merged

add in record audio on AI glasses snippets#877
trambui09 merged 3 commits intoandroid:mainfrom
trambui09:tb/mic-access-projected-context

Conversation

@trambui09
Copy link
Copy Markdown
Contributor

@trambui09 trambui09 commented Apr 20, 2026

Add in code snippets to record audio on AI glasses via:

  1. Bluetooth HFP
  2. Projected context

@trambui09 trambui09 marked this pull request as ready for review April 20, 2026 23:16
@trambui09 trambui09 requested a review from a team as a code owner April 20, 2026 23:16
@snippet-bot
Copy link
Copy Markdown

snippet-bot Bot commented Apr 20, 2026

Here is the summary of changes.

You are about to add 2 region tags.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds audio recording functionality for Bluetooth HFP and projected device contexts. The review identifies several issues: a potential null-pointer exception when using the audio manager, resource leaks from unreleased AudioRecord instances, and a lack of error handling for buffer size initialization which could lead to runtime crashes.

Comment thread xr/src/main/java/com/example/xr/projected/ProjectedHardware.kt
Comment thread xr/src/main/java/com/example/xr/projected/ProjectedHardware.kt
Comment thread xr/src/main/java/com/example/xr/projected/ProjectedHardware.kt
Comment thread xr/src/main/java/com/example/xr/projected/ProjectedHardware.kt Outdated
@trambui09 trambui09 marked this pull request as draft April 20, 2026 23:19
@trambui09 trambui09 marked this pull request as ready for review April 20, 2026 23:28
Comment thread xr/src/main/java/com/example/xr/projected/ProjectedHardware.kt Outdated
Comment thread xr/src/main/java/com/example/xr/projected/ProjectedHardware.kt Outdated
@trambui09 trambui09 force-pushed the tb/mic-access-projected-context branch from 6e886fa to 281de79 Compare April 21, 2026 16:54
Copy link
Copy Markdown
Member

@devbridie devbridie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@trambui09 trambui09 merged commit 452ce94 into android:main Apr 21, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants