Audio-only demo project. Uses voice-sdk — the video module is not available.
Use this project only when the PRD is explicitly audio-only.
./gradlew assembleDebug # build debug APK
./gradlew installDebug # build + install to connected device
./gradlew test # unit tests
./gradlew connectedAndroidTest # instrumented tests (device required)Edit app/src/main/res/values/string-config.xml:
<string name="agora_app_id" translatable="false">YOUR_APP_ID</string>
<string name="agora_app_certificate" translatable="false">YOUR_CERT</string>
<string name="agora_access_token" translatable="false">YOUR_ACCESS_TOKEN</string>Leave certificate and token blank if your project has not enabled App Certificate.
The registration mechanism is identical to APIExample. Required steps:
-
Create a Fragment class under
app/src/main/java/io/agora/api/example/examples/{basic|advanced|audio}/- Extend
BaseFragment - Add
@Example(index, group, name, actionId, tipsId)annotation
- Extend
-
Add string resources to
app/src/main/res/values/strings.xml:namestring (display name in the list)tipsstring (description shown on the case screen)
-
Add navigation entries to
app/src/main/res/navigation/nav_graph.xml:<fragment>destination for the new Fragment<action>frommainFragmentwith theactionIdused in the annotation
-
Build and run — the case appears automatically via reflection.
- Do NOT call
enableVideo(),setupLocalVideo(), orVideoCanvas—voice-sdkhas no video module and will crash at runtime. - Do NOT add video, screen sharing, or beauty cases — use
APIExample/instead. - Each case Fragment must create and destroy its own
RtcEngineinstance. - Always call
engine.leaveChannel()beforeRtcEngine.destroy()inonDestroy(). - All
IRtcEngineEventHandlercallbacks run on a background thread — usehandler.post {}for UI updates. - Always call
checkOrRequestPermission()beforejoinChannel(). Audio cases only needRECORD_AUDIO.
.kiro/skills/add-new-case/— step-by-step guide for adding a new audio case (voice-sdk template, nav placement, verify checklist).kiro/skills/query-cases/— query existing cases by API, group, or sort index; usesARCHITECTURE.mdas fast index
.kiro/hooks/build-on-task-complete.json— automatically runs./gradlew assembleDebugafter each Spec task completes to verify the build
| File | Inclusion | Purpose |
|---|---|---|
.kiro/steering/project-routing.md |
Always | routes work to the correct sub-project; enforces audio-only constraint |
.kiro/steering/coding-standards.md |
Always | RtcEngine lifecycle rules, Java standards, voice-sdk constraints, naming conventions |
.kiro/steering/complex-case-spec.md |
Manual | Spec workflow for complex cases; include via #complex-case-spec when creating a Spec |
ARCHITECTURE.md— full directory layout and case registration details