Skip to content

Repository files navigation

πŸ“± Be My Guide

A Flutter mobile application for real-time video calls powered by Agora SDK and Firebase authentication. Be My Guide enables users to sign in securely and join live video channels for one-to-one or group calls.


πŸ“‹ Table of Contents


Features

  • Email/password authentication using Firebase Authentication
  • Google Sign-In (optional, if configured)
  • Real-time video calls using Agora SDK (one-to-one or group channels)
  • Minimal UI for login, join/leave video channel, and basic in-call controls (mute/unmute, camera toggle)

Requirements

  • Flutter SDK (stable) β€” recommended: latest stable release
  • Dart SDK (bundled with Flutter)
  • Android Studio / Xcode for device/emulator
  • A Firebase project
  • An Agora project (App ID; optional Token for production)
  • Internet access on test devices

Tested with:

  • Flutter 3.x / 4.x
  • agora_rtc_engine or agora_uikit β€” check pubspec.yaml for exact version
  • firebase_core, firebase_auth packages

Quick Start

  1. Clone the repository:

    git clone https://github.com/Naruto109k/be-my-guide.git
    cd be-my-guide
  2. Install dependencies:

    flutter pub get
  3. Add Firebase config files (see Firebase Setup below)

  4. Add Agora credentials (see Agora Setup below)

  5. Run the app:

    flutter run

Firebase Setup

  1. Go to Firebase Console and create or open a project
  2. Add Android app:
    • Package name must match your Flutter Android package (android/app/build.gradle)
    • Download google-services.json
    • Place it in android/app/
  3. Add iOS app:
    • Bundle ID must match your Xcode project bundle identifier
    • Download GoogleService-Info.plist
    • Place it in ios/Runner/
  4. Enable authentication providers:
    • Firebase Console β†’ Authentication β†’ Sign-in method
    • Enable Email/Password and any other providers (Google, Apple, etc.)
  5. Initialize Firebase in main.dart:
    void main() async {
      WidgetsFlutterBinding.ensureInitialized();
      await Firebase.initializeApp();
      runApp(MyApp());
    }

Agora Setup

  1. Create an Agora project at console.agora.io
  2. Copy your App ID
  3. Configure these values in your app:
    • AGORA_APP_ID
    • AGORA_TOKEN (optional; leave empty when App Certificate is disabled)
    • AGORA_CHANNEL (channel name to join/create)
  4. Add the Agora Flutter package to pubspec.yaml:
    • agora_rtc_engine or agora_uikit
  5. Example β€” join a channel:
    RtcEngine engine = await RtcEngine.create(APP_ID);
    await engine.enableVideo();
    await engine.joinChannel(TOKEN, CHANNEL_NAME, null, 0);

Configuration / Environment

Provide Agora credentials via a .env file (never commit real secrets):

AGORA_APP_ID=your_app_id_here
AGORA_TOKEN=your_token_or_empty_for_dev
AGORA_CHANNEL=default_channel

Or set them via platform-specific mechanisms (Gradle properties, Xcode build settings, secrets manager).


Android-Specific Changes

  1. AndroidManifest permissions (android/app/src/main/AndroidManifest.xml):

    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.CAMERA"/>
    <uses-permission android:name="android.permission.RECORD_AUDIO"/>
  2. Set minSdkVersion (android/app/build.gradle):

    defaultConfig {
        minSdkVersion 21
    }
  3. Add google-services plugin:

    • In android/build.gradle: classpath 'com.google.gms:google-services:4.3.14'
    • In android/app/build.gradle at bottom: apply plugin: 'com.google.gms.google-services'

iOS-Specific Changes

  1. Add privacy descriptions (ios/Runner/Info.plist):

    <key>NSCameraUsageDescription</key>
    <string>Camera access is required for video calls</string>
    <key>NSMicrophoneUsageDescription</key>
    <string>Microphone access is required for audio during calls</string>
  2. Set platform in Podfile:

    platform :ios, '12.0'
  3. Add GoogleService-Info.plist to the Runner target in Xcode


Useful Commands

flutter pub get          # Install dependencies
flutter analyze          # Run static analysis
flutter run              # Run on selected device
flutter build apk --release   # Build Android release APK
flutter build ios --release   # Build iOS release (requires Mac + Xcode)
flutter clean            # Clean build artifacts

Troubleshooting

Missing google-services.json / GoogleService-Info.plist

  • Ensure files are placed correctly and not excluded by .gitignore

Permission denied for camera/mic

  • Confirm runtime permission requests and Info.plist/AndroidManifest entries

Agora video not showing / black screen

  • Confirm engine.enableVideo() was called before joining
  • Confirm both users joined the same channel with valid App ID and token

Token/Authentication errors with Agora

  • If using App Certificate, tokens must be generated server-side
  • For quick local testing, disable App Certificate in Agora console (not for production)

Crash on iOS after adding Agora

  • Check Podfile platform, run pod install inside ios/ folder, and open workspace in Xcode

Security & Production Notes

  • Never embed production App Certificates or tokens in client apps β€” use a secure token server
  • Use Firebase security rules for any database or storage usage
  • Limit log output in production builds to avoid leaking sensitive data

License

This project is licensed under the MIT License β€” see the LICENSE file for details.


Built with ❀️ by Nour Yehia

About

A Flutter mobile app for real-time video calls using Agora SDK and Firebase authentication

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages