Task ID: NativeChatApp
A feature-rich, real-time chat application built with React Native and Firebase. This app provides seamless messaging with online/offline status tracking, read receipts, live location sharing, typing indicators, and push notifications.
-
User Authentication
- Sign up and login using Firebase Authentication
- User profile management (name, photo, status)
- Secure password authentication
-
Real-Time Messaging
- One-on-one chat conversations
- Real-time message sending and receiving
- Persistent message history with timestamps
-
Online/Offline Status
- Display user's online/offline presence
- Show "Last seen" timestamp
- Real-time presence updates
-
Read Receipts
- Three-state message status: sent (✓), delivered (✓✓), read (✓✓ blue)
- Automatic status updates when messages are viewed
-
Live Location Sharing
- Share current location with chat contacts
- Display location on interactive map
- Distance calculation between users
-
Typing Indicator
- Show "typing..." when the other user is composing
- Auto-hide after inactivity
-
Push Notifications
- Firebase Cloud Messaging integration
- Notify users when app is backgrounded/closed
-
Additional Features
- Beautiful, modern UI
- User search functionality
- Unread message counter
- Profile image upload
- Custom status messages
- Frontend: React Native 0.74.5
- Navigation: React Navigation 6.x
- Backend: Firebase (Authentication, Firestore, Realtime Database, Storage, Cloud Messaging)
- Maps: React Native Maps
- Icons: React Native Vector Icons
- Notifications: Notifee
- Node.js (v16 or higher)
- npm or yarn
- React Native CLI
- Android Studio (for Android development)
- CocoaPods (for iOS dependencies - macOS only)
git clone https://github.com/DevanshSharma351/NativeChatApp.git
cd NativeChatAppnpm install
# For iOS (macOS only)
cd ios && pod install && cd ..-
Create a project at Firebase Console
-
Add iOS and Android apps to your Firebase project
-
Download configuration files:
- iOS:
GoogleService-Info.plist→ place inios/NativeChatApp/ - Android:
google-services.json→ place inandroid/app/
- iOS:
-
Enable these Firebase services in the console:
- Authentication (Email/Password)
- Cloud Firestore
- Realtime Database
- Cloud Storage
- Cloud Messaging
- Get API key from Google Cloud Console
- Android: Add to
android/app/src/main/AndroidManifest.xml:<meta-data android:name="com.google.android.geo.API_KEY" android:value="YOUR_GOOGLE_MAPS_API_KEY"/>
- iOS: Add to
ios/NativeChatApp/AppDelegate.mm:[GMSServices provideAPIKey:@"YOUR_GOOGLE_MAPS_API_KEY"];
# Start Metro bundler
npm start
# Run on Android
npm run android
# Run on iOS (macOS only)
npm run ios{
"react": "18.2.0",
"react-native": "0.74.5",
"@react-navigation/native": "^6.1.9",
"@react-native-firebase/app": "^20.5.0",
"@react-native-firebase/auth": "^20.5.0",
"@react-native-firebase/firestore": "^20.5.0",
"@react-native-firebase/database": "^20.5.0",
"@react-native-firebase/storage": "^20.5.0",
"@react-native-firebase/messaging": "^20.5.0",
"react-native-maps": "^1.8.3",
"react-native-vector-icons": "^10.0.2",
"@notifee/react-native": "^7.9.0"
}NativeChatApp/
├── src/
│ ├── config/ # Firebase configuration
│ ├── context/ # React Context (Auth)
│ ├── services/ # Firebase services
│ ├── screens/ # App screens
│ ├── navigation/ # Navigation setup
│ └── App.js # Root component
├── android/ # Android native code
├── ios/ # iOS native code
└── index.js # App entry point
-
Metro bundler errors
npm start -- --reset-cache
-
iOS build fails
cd ios && pod install && cd ..
-
Android build fails
cd android && ./gradlew clean && cd ..
-
Firebase not connecting
- Verify
google-services.json(Android) andGoogleService-Info.plist(iOS) are in correct locations - Check Firebase project configuration
- Verify
-
Maps not showing
- Verify Google Maps API key is correct
- Ensure billing is enabled in Google Cloud Console
- Android Emulator DNS: Some Android emulators may have DNS resolution issues preventing Firebase connectivity. This is a macOS-specific emulator configuration issue. Workaround: Use a physical device or configure emulator DNS settings.
- Never commit Firebase credentials to public repositories
- Use environment variables for sensitive data in production
- Implement proper Firebase security rules
- Validate user inputs
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License.
Devansh Sharma
- GitHub: @DevanshSharma351
- React Native team
- Firebase team
- React Navigation
- All open-source contributors
Note: This is an educational project. Add proper error handling, testing, and optimizations before production deployment.
Made with ❤️ using React Native and Firebase

