Skip to content

Add OACP v0.3 SDK integration#353

Closed
0xharkirat wants to merge 2 commits intoFossifyOrg:mainfrom
0xharkirat:feature/oacp-sdk
Closed

Add OACP v0.3 SDK integration#353
0xharkirat wants to merge 2 commits intoFossifyOrg:mainfrom
0xharkirat:feature/oacp-sdk

Conversation

@0xharkirat
Copy link
Copy Markdown

Summary

  • Integrates OACP Kotlin SDK for voice control via Hark assistant
  • start_recording: activity dispatch — opens app and starts RecorderService
  • pause/resume/stop/discard: broadcast dispatch — background, no UI
  • Rich oacp.json with aliases/keywords/examples for embedding-based matching

Key implementation details

  • Activity intent filter on MainActivity for foreground action
  • onNewIntent() handler for singleTask redelivery
  • OacpActionReceiver (extends SDK's OacpReceiver) for background actions
  • Tested on device: "record audio" opens app and starts recording

Test plan

  • "record audio" → opens Voice Recorder, starts recording
  • ContentProvider serves manifest at ${applicationId}.oacp

See OACP_INTEGRATION.md for full documentation.

Generated with Claude Code

0xharkirat and others added 2 commits April 4, 2026 13:55
Integrates the OACP Kotlin SDK (oacp-android-release.aar) for voice
control via the Hark assistant.

Two dispatch patterns used:
- start_recording: type=activity — Hark calls startActivity() directly,
  opening the app and starting the RecorderService. Handled via intent
  filter on MainActivity + onNewIntent().
- pause/resume/stop/discard: type=broadcast — Hark sends broadcast,
  OacpActionReceiver (extends OacpReceiver from SDK) handles in background.

Files added:
- app/libs/oacp-android-release.aar — OACP SDK
- app/src/main/assets/oacp.json — capability manifest (5 capabilities)
- app/src/main/assets/OACP.md — LLM context for disambiguation
- app/src/main/kotlin/.../oacp/OacpActionReceiver.kt — broadcast handler

Files modified:
- app/build.gradle.kts — SDK + annotation dependency
- AndroidManifest.xml — activity intent filter + receiver registration
- MainActivity.kt — onNewIntent() handles OACP start recording intent

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Documents how OACP was added: files changed, two dispatch patterns
(activity for foreground, broadcast for background), BAL restrictions,
onNewIntent handling, and adb test commands.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@0xharkirat 0xharkirat requested a review from naveensingh as a code owner April 4, 2026 03:40
@0xharkirat 0xharkirat closed this Apr 4, 2026
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.

1 participant