Skip to content

TimeShare is a Social Media Application inspired from Instagram, Facebook and Messenger. It is built using Native-Android(Kotlin & XML) and backend using Firebase.

SekhGulamMainuddin/Time-Share

Repository files navigation

Time-Share

Social Media App built using Kotlin and XML. It has functionalities like Chatting(1-1 and Group), Content Sharing(Image, GIF, Video, PDF, etc.), Voice and Video Conferencing(One to One and Group), Reels, Stories, Posts, etc. BackEnd is built on Firebase (Firestore, Realtime DB, Firebase Storage, and FCM). Authentication and Sign-Up using Email-Password|Google Sign-In|Phone Number-OTP. Used Agora.io for Voice and Video Conferencing.

Video

Post, Stories, Reel, Upload, Search, Account Video -> Start to 03:55

Chats and Calling Video -> 03:56 to End

Time-Share.mp4

Languages and Tools Used:

android kotlin java XML firebase agora   agora  

TechStack Used

Client: Kotlin, Java, XML, CMake, C++

Server & Backend: Firebase, Firebase Firestore, Firebase Real-Time Database, Firebase Storage, Firebase Auth, FCM

Features

  • Posts
  • Status & Stories
  • Reels
  • Follow and Friend
  • Message (1-1 and Group)
  • File & Content Sharing (Image, GIF, Video, PDF, etc.)
  • Voice & Video Calling (1-1 and Group)
  • Share Reel & Share Post
  • Voice Message
  • Activity Status
  • Notification of Events and Messages

Libraries Used

MVVM Pattern is used to build this App

  • Firebase (Auth, Storage, Firestore, Realtime-DB) - Authentication and Data Storage
  • FCM - For Notification
  • Agora - For Voice and Video Calling
  • Dagger-Hilt - For Dependency Injection
  • Retrofit2 - For calling FCM API for Notification
  • RoomDB - For offline data caching
  • Glide - For Image Processing
  • Giphy - For showing GIF
  • Exoplayer - For playing remote videos smoothly
  • Kotlin Serialization - For JSON-Parsing and Object Parsing
  • Other Libraries are Kotlin Coroutines, Navigation Component, ViewModels, CameraX, LottieAnimations, etc.

Installation

  • First of all Clone the repository
git clone https://github.com/SekhGulamMainuddin/Time-Share.git
  • Create a Firebase Project
  • Open the Cloned Repo in Android Studio and Connect it to the Firebase Project
  • Generate your SHA-1 or SHA-2 key and ADD it to your Firebase Project
keytool -list -v -keystore "C:\Users\ReplaceThisWithYourUserName\.android\debug.keystore" -alias androiddebugkey -storepass android -keypass android
  • After connected to firebase download and place the google-services.json at app/
  • Create an Agora Project
  • Retrieve the App-Id and App-Certificate from Agora Project
  • Also Create a Giphy Project
  • Retrieve the API key for Giphy
  • Store all the above keys using CMake -> Follow this article
  • Remember to follow this structure in Kotlin Part
object Keys {
    init {
        System.loadLibrary("native-lib")
    }
    external fun apiKey(): String
    external fun giphyKey(): String
    external fun getAppIdAgora(): String
    external fun getAppCertificateAgora(): String
    external fun getFCMKey(): String
    external fun getProjectNumber(): String
}

and this structure in CPP part

#include <jni.h>
#include <string>
extern "C" JNIEXPORT jstring
JNICALL
Java_com_sekhgmainuddin_timeshare_utils_Keys_apiKey(JNIEnv *env, jobject object) {
    std::string api_key = "<your_api_key_goes_here>";
    return env->NewStringUTF(api_key.c_str());
}

JNICALL
extern "C"
JNIEXPORT jstring JNICALL
Java_com_sekhgmainuddin_timeshare_utils_Keys_giphyKey(JNIEnv *env, jobject thiz) {
    std::string giphy_api_key = "<your-giphy-api-key>";
    return env->NewStringUTF(giphy_api_key.c_str());
}

extern "C"
JNIEXPORT jstring JNICALL
Java_com_sekhgmainuddin_timeshare_utils_Keys_getAppIdAgora(JNIEnv *env, jobject thiz) {
    std::string app_id = "<your-agora-app-id>";
    return env->NewStringUTF(app_id.c_str());
}

extern "C"
JNIEXPORT jstring JNICALL
Java_com_sekhgmainuddin_timeshare_utils_Keys_getAppCertificateAgora(JNIEnv *env, jobject thiz) {
    std::string app_certificate = "<your-agora-app-certificate>";
    return env->NewStringUTF(app_certificate.c_str());
}
extern "C"
JNIEXPORT jstring JNICALL
Java_com_sekhgmainuddin_timeshare_utils_Keys_getFCMKey(JNIEnv *env, jobject thiz) {
    std::string server_key = "<your-fcm-server-key>";
    return env->NewStringUTF(server_key.c_str());
}
extern "C"
JNIEXPORT jstring JNICALL
Java_com_sekhgmainuddin_timeshare_utils_Keys_getProjectNumber(JNIEnv *env, jobject thiz) {
    std::string project_number = "<your-firebase-project-number-required-for-group-notification>";
    return env->NewStringUTF(project_number.c_str());
}
  • Now Build the project and run it on your Device or Emulator
  • Some indexing may be required on the Firebase Firestore end for multiple queries.

About

TimeShare is a Social Media Application inspired from Instagram, Facebook and Messenger. It is built using Native-Android(Kotlin & XML) and backend using Firebase.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published