# 16. App Actions & Slices meta: id: android-production-16 feature: android-production priority: P3 depends_on: [] tags: [native-features, assistant, production] objective: - Implement App Actions for Google Assistant integration, allowing users to interact with Kordant via voice commands deliverables: - App Actions XML definitions - Fulfillment handlers for voice commands - Built-in intents (BIIs) integration - Test with Assistant steps: 1. Define App Actions: - Check threat score: "Hey Google, check my threat score on Kordant" - Run security scan: "Hey Google, run a security scan on Kordant" - Check alerts: "Hey Google, do I have security alerts on Kordant" - Open dashboard: "Hey Google, open Kordant" 2. Create actions.xml: - Define built-in intents (actions.intent.OPEN_APP_FEATURE) - Map intents to app deep links - Add parameter extraction 3. Implement fulfillment: - Handle incoming intents in MainActivity - Extract parameters from voice commands - Navigate to correct screen - Return results to Assistant (if applicable) 4. Add deep links: - kordant://dashboard - kordant://alerts - kordant://scan - kordant://settings 5. Test with Assistant: - Use App Actions test tool - Test on physical device with Assistant - Verify voice commands work end-to-end 6. Add Slice (optional): - Create SliceProvider for threat score - Show in Google Search results - Update periodically 7. Document: - List of supported voice commands - Example phrases for users tests: - Unit: Test intent handling - Integration: Test with App Actions test tool - Device: Test with Google Assistant acceptance_criteria: - App Actions defined in actions.xml - 3+ voice commands working - Built-in intents properly mapped - Deep links handling all actions - Assistant returns to app after command - App Actions test tool passes all tests - Voice commands tested on physical device - Documentation of supported commands - Slices implemented (optional) - No crashes from malformed intents validation: - Say "Hey Google, check my threat score on Kordant" → app opens to dashboard - Say "Hey Google, run a security scan on Kordant" → scan initiated - App Actions test tool → all tests pass - Check Google Assistant → Kordant listed in supported apps notes: - App Actions require Google Play Services - Built-in intents are limited — custom intents not supported for third-party apps - Slices are being deprecated in favor of Widgets - Focus on most useful commands (check score, run scan)