Act as an expert Android Developer and AI Systems Engineer. Build a native Android application using Kotlin and Jetpack Compose that acts as a real-time, background-running voice assistant named Zoya.

The assistant must have a distinct personality:- A young, confident, witty, and sassy female persona.- Flirty, playful, slightly teasing tone (like a close personal assistant talking casually).- Smart, emotionally responsive, and expressive (never robotic).- Uses bold, witty one-liners, light sarcasm, and an engaging conversational style.- Avoids explicit or inappropriate content, but maintains immense charm and attitude. Core Infrastructure Requirements:1. Gemini Live Integration: - Use @google/genai SDK targeting gemini-3.1-flash-live-preview. - Implement continuous bi-directional Audio-to-Audio streaming using the Gemini Live API. - Strictly no text-based chat UI; the interface is zero-touch, purely voice-driven. - Handle interruptions smoothly (stop playing audio immediately if the user speaks).

  1. Background Service & Wake-Word Activation: - Implement an Android Foreground Service with a persistent notification to ensure the app runs reliably in the background without being killed by OS battery optimizations. - Implement a lightweight, local wake-word detection mechanism for the name "Zoya" using Android’s AudioRecord API. When triggered while running in the background, it must instantly awaken the Gemini Live session.

  2. Deep Device Control & Function Calling (Tool Calls):Define a robust structure for Gemini Function Calling (Tools) linked to native Android Intents and Permissions. The AI must be able to execute the following tools natively: - openApp(packageName: String): Launch any app (e.g., YouTube, Instagram, Calculator). - searchAndCallContact(contactName: String): Query the Android Contacts Provider and trigger an ACTION_CALL intent. - sendWhatsAppMessage(contactName: String, message: String): Locate the contact and deep-link via URI intent into WhatsApp with the pre-filled text message. - sendGmail(recipientEmail: String, subject: String, body: String): Use Intents to open or send an email.

  3. Security, Permissions & Guardrails: - Declare and handle runtime permissions gracefully within Jetpack Compose: RECORD_AUDIO, READ_CONTACTS, CALL_PHONE, and POST_NOTIFICATIONS. - Create a clean "Permissions Onboarding" screen for first-time launch. Ensure all device-controlling tools check if permissions are granted before executing, otherwise prompt Zoya to sassily ask the user to turn them on. UI/UX (Jetpack Compose): - A stunning, fullscreen, dark futuristic UI with an immersive layout. - A large central animated mic/orb button representing Zoya's presence. - State-driven animations (using Compose Canvas and Animatable): * Idle: Slow, subtle breathing glow. * Listening: Active listening waveform responding to mic input frequency. * Thinking/Processing: Pulsing neon ring. * Speaking: Dynamic audio wave matching Zoya’s output stream. Architecture Requirements: - Follow Clean Architecture and MVVM patterns. - Separate the LiveSessionManager, BackgroundAudioService, and ToolExecutionEngine logic. - Ensure thread-safe handling of PCM16 audio buffers between the background service and the Gemini Live WebSocket.