Configuration Guide

API Keys

OpenRouter API Key Setup

  1. Obtain Key:

    • Sign up or log in

    • Navigate to "API Keys"

    • Click "Create API Key"

    • Copy the key (starts with sk-or-v1-...)

  2. Add to Project:

    • Open/create local.properties in project root

    • Add line: OPENROUTER_API_KEY=sk-or-v1-your-actual-key-here

    • Save file

  3. Verify:

    • Build project

    • Check BuildConfig.OPENROUTER_API_KEY is accessible

    • Test by starting a voice session

Security Best Practices

  • Never commit local.properties to version control

  • Never hardcode API keys in source files

  • Use BuildConfig to access keys at runtime

  • Consider ProGuard obfuscation for release builds

  • Monitor usage on OpenRouter dashboard

  • Rotate keys periodically

Build Configuration

App-Level build.gradle.kts

Key configurations:

Dependency Management

Using Gradle Version Catalog (gradle/libs.versions.toml):

ProGuard Rules

For release builds (proguard-rules.pro):

Permissions

AndroidManifest.xml Permissions

Runtime Permission Requests

Implemented in MainActivity.kt:

Last updated