Skip to main content

Prerequisites

Before you begin, make sure you have:
  • Android Studio (latest stable version recommended)
  • Physical Android device with API level 24 or higher
  • Firebase project with Authentication and Firestore enabled
  • Git installed on your machine
While emulators are supported, voice recognition features work best on physical devices. Google’s speech recognition engine may throw errors on emulators without updated Play Store services.

Quick setup

1

Clone the repository

Clone the project to your local machine:
git clone https://github.com/demodogo/ev_sum_2_android.git
cd ev_sum_2_android
2

Add Firebase configuration

Download your google-services.json file from the Firebase Console and place it in the app/ directory:
app/
├── build.gradle.kts
├── google-services.json  # Add this file here
└── src/
The google-services.json file connects your app to your Firebase project. Without it, authentication and Firestore features won’t work.
3

Open in Android Studio

Launch Android Studio and open the project:
  1. Click File > Open
  2. Navigate to the cloned repository folder
  3. Click OK to open the project
4

Sync Gradle files

Android Studio should automatically sync Gradle files. If not, click the Sync Project with Gradle Files button in the toolbar, or go to:File > Sync Project with Gradle FilesThis will download all dependencies specified in build.gradle.kts:
app/build.gradle.kts
dependencies {
    implementation(platform("com.google.firebase:firebase-bom:33.7.0"))
    implementation("com.google.firebase:firebase-auth-ktx")
    implementation("com.google.firebase:firebase-firestore-ktx")
    implementation("com.google.android.gms:play-services-location:21.3.0")
    implementation("androidx.navigation:navigation-compose:2.8.5")
    // ... more dependencies
}
5

Connect your device

Connect your Android device via USB and enable Developer Options:
  1. Go to Settings > About phone
  2. Tap Build number 7 times to enable Developer Options
  3. Go to Settings > Developer options
  4. Enable USB debugging
  5. Connect your device and authorize the computer when prompted
6

Run the app

Click the Run ‘app’ button in the Android Studio toolbar (or press Shift + F10):
  1. Select your connected device from the deployment target dropdown
  2. Wait for the build to complete
  3. The app will install and launch on your device
First build may take several minutes as Gradle downloads dependencies and compiles the project.

Verify installation

Once the app launches, you should see the authentication screen. The app automatically routes users based on session state:
MainActivity.kt
class MainActivity : ComponentActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        ThemeStore.loadTheme(this)

        setContent {
            val isDarkTheme by ThemeStore.isDarkTheme.collectAsState()

            Ev_sum_2Theme(darkTheme = isDarkTheme) {
                Box(modifier = Modifier.fillMaxSize()) {
                    AppNavGraph()  // Handles routing
                    // Theme toggle button...
                }
            }
        }
    }
}
The RouterScreen component evaluates the auth state in real-time:
  • No session: Redirects to Login screen
  • Active session: Redirects to Home screen

Test voice features

To verify voice input is working:
  1. On the login screen, tap the microphone icon next to the email field
  2. Say something like: “demo arroba example punto com”
  3. The field should populate with: [email protected]
Voice normalization converts Spanish spoken words to symbols. For example:
  • “arroba” → @
  • “punto” → .
  • “guion bajo” → _
  • “uno dos tres” → 123

Next steps

Detailed setup

Learn about Firebase configuration, permissions, and advanced setup

Architecture

Understand the app’s Service-Repository pattern and folder structure

Authentication

Explore how Firebase Authentication powers user management

Voice input

Deep dive into speech-to-text normalization algorithms

Troubleshooting

Make sure you’ve placed the google-services.json file in the app/ directory (not the project root). The file should be at the same level as app/build.gradle.kts.
Google’s speech recognition engine requires Google Play Services and may not work properly on emulators. Use a physical device for testing voice features.
The app requires runtime permissions for location access. Make sure to grant both ACCESS_FINE_LOCATION and ACCESS_COARSE_LOCATION when prompted.
Try these steps:
  1. Click File > Invalidate Caches
  2. Delete the .gradle folder in your project
  3. Click File > Sync Project with Gradle Files
  4. Ensure you have a stable internet connection for dependency downloads

Build docs developers (and LLMs) love