INNER CODE UNIT · Kotlin

handleAssistLaunch

Ayush0Chaudhary/blurr · app/src/main/java/com/blurr/voice/AssistEntryActivity.kt:24

    private fun handleAssistLaunch(intent: Intent?) {
        Log.d("AssistEntryActivity", "Assistant invoked via ACTION_ASSIST, intent=$intent")

        // If agent already running, you can signal it to focus/show UI instead of starting again
        if (!ConversationalAgentService.isRunning) {
            val serviceIntent = Intent(this, ConversationalAgentService::class.java).apply {
                action = "com.blurr.voice.ACTION_START_FROM_ASSIST"
                putExtra("source", "assist_gesture")       // optional metadata
            }
            ContextCompat.startForegroundService(this, serviceIntent)
        } else {
            // e.g., tell the service to bring its overlay/mic UI to front
            sendBroadcast(Intent("com.blurr.voice.ACTION_SHOW_OVERLAY"))
        }
    }
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…