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.
- Features
- Requirements
- Quick Start
- Firebase Setup
- Agora Setup
- Configuration / Environment
- Android-Specific Changes
- iOS-Specific Changes
- Useful Commands
- Troubleshooting
- Security & Production Notes
- License
- 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)
- 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_engineoragora_uikitβ checkpubspec.yamlfor exact versionfirebase_core,firebase_authpackages
-
Clone the repository:
git clone https://github.com/Naruto109k/be-my-guide.git cd be-my-guide -
Install dependencies:
flutter pub get
-
Add Firebase config files (see Firebase Setup below)
-
Add Agora credentials (see Agora Setup below)
-
Run the app:
flutter run
- Go to Firebase Console and create or open a project
- Add Android app:
- Package name must match your Flutter Android package (
android/app/build.gradle) - Download
google-services.json - Place it in
android/app/
- Package name must match your Flutter Android package (
- Add iOS app:
- Bundle ID must match your Xcode project bundle identifier
- Download
GoogleService-Info.plist - Place it in
ios/Runner/
- Enable authentication providers:
- Firebase Console β Authentication β Sign-in method
- Enable Email/Password and any other providers (Google, Apple, etc.)
- Initialize Firebase in
main.dart:void main() async { WidgetsFlutterBinding.ensureInitialized(); await Firebase.initializeApp(); runApp(MyApp()); }
- Create an Agora project at console.agora.io
- Copy your App ID
- Configure these values in your app:
AGORA_APP_IDAGORA_TOKEN(optional; leave empty when App Certificate is disabled)AGORA_CHANNEL(channel name to join/create)
- Add the Agora Flutter package to
pubspec.yaml:agora_rtc_engineoragora_uikit
- Example β join a channel:
RtcEngine engine = await RtcEngine.create(APP_ID); await engine.enableVideo(); await engine.joinChannel(TOKEN, CHANNEL_NAME, null, 0);
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_channelOr set them via platform-specific mechanisms (Gradle properties, Xcode build settings, secrets manager).
-
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"/>
-
Set minSdkVersion (
android/app/build.gradle):defaultConfig { minSdkVersion 21 } -
Add google-services plugin:
- In
android/build.gradle:classpath 'com.google.gms:google-services:4.3.14' - In
android/app/build.gradleat bottom:apply plugin: 'com.google.gms.google-services'
- In
-
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>
-
Set platform in Podfile:
platform :ios, '12.0'
-
Add
GoogleService-Info.plistto the Runner target in Xcode
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 artifactsMissing 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/AndroidManifestentries
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 installinsideios/folder, and open workspace in Xcode
- 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
This project is licensed under the MIT License β see the LICENSE file for details.
Built with β€οΈ by Nour Yehia