Skip to content

Android Compose E-Learning App with Chat Feature that provides an online learning and teaching platform.

License

Notifications You must be signed in to change notification settings

OmAr-Kader/Curso

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Curso Demo

Curso is an education technology application with Chat Feature that provides an online learning and teaching platform. Students take courses primarily to improve job-related skills Some courses generate credit toward technical certification This is an Android application that allows users to enroll in courses and lecturer articles. The application uses Realm Cloud to store user data and course information. Firebase Cloud Messaging is used to send push notifications to users when new course materials are available. Firebase Storage is used to store course materials articles, videos and images. Dropbox is used to backup user data and course materials. Amazon AWS Storage is used to videos.

Getting Started

To get started with this application, you will need to have Android Studio installed on your computer. You will also need to create accounts with Realm Cloud, Firebase, Dropbox, and Amazon AWS.

Dependencies

  • Realm Cloud: Provides cloud-based data storage.
  • Firebase Cloud Messaging: Provides push notification services.
  • Retrofit: Provides REST API for push notifications.
  • Firebase Storage: Provides cloud storage services for videos and images.
  • Dropbox: Provides cloud storage services for videos and images.
  • pCloud: Provides cloud storage services for videos and images.
  • Share File: Provides cloud storage services for videos and images.
  • Amazon AWS: Provides cloud storage services for videos and images.
  • Dagger Hilt: Provides dependency injection.

Configuration

Realm Cloud

  1. Create a Realm Cloud account.
  2. Create a new Realm app.
  3. Add the following to your project-level build.gradle file:
plugins {
    id("io.realm.kotlin") version "1.12.0" apply false
}
  1. Add the following to your app-level build.gradle file:
dependencies {
    implementation("io.realm.kotlin:library-base:1.12.0")
    implementation("io.realm.kotlin:library-sync:1.12.0")
}

Firebase Cloud Messaging

  1. Follow the instructions provided by Firebase to add Firebase to your Android project.

  2. Create a Firebase account.

  3. Create a new Firebase project.

  4. Enable Firebase Messaging.

  5. Add the Firebase configuration file to the app directory.

  6. Add the following to your project-level build.gradle file:

plugins {
    id("com.google.gms.google-services") version("4.4.0") apply false
}
  1. Add the following to your app-level build.gradle file:
dependencies {
    implementation(platform("com.google.firebase:firebase-bom:32.5.0"))
    implementation("com.google.firebase:firebase-messaging-ktx:23.3.1")
    implementation("com.google.firebase:firebase-messaging-directboot:23.3.1")
}
  1. Add the following to your app's manifest file:
<service
    android:name=".MyFirebaseMessagingService"
    android:exported="false">
    <intent-filter>
        <action android:name="com.google.firebase.MESSAGING_EVENT" />
    </intent-filter>
</service>
  1. Create a new class called MyFirebaseMessagingService that extends FirebaseMessagingService:
class MyFirebaseMessagingService : FirebaseMessagingService() {
    override fun onMessageReceived(remoteMessage: RemoteMessage) {
        // Handle FCM message here.
    }
}

Firebase Storage

  1. Follow the instructions provided by Firebase to add Firebase to your Android project.
  2. Enable Firebase Messaging Storage .
  3. Add the following to your app-level build.gradle file:
dependencies {
    implementation("com.google.firebase:firebase-storage-ktx:20.3.0")
}
  1. Use the following code to upload a file to Firebase Storage:
val storage = FirebaseStorage.getInstance()
val storageRef = storage.reference
val fileRef = storageRef.child("path/to/file")
val file = Uri.fromFile(File("path/to/local/file"))
val uploadTask = fileRef.putFile(file)

Dropbox

  1. Follow the instructions provided by Dropbox to add Dropbox to your Android project.

  2. Add the following to your app-level build.gradle file:

dependencies {
    implementation("com.dropbox.core:dropbox-core-sdk:3.1.0")
}
  1. Use the following code to upload a file to Dropbox:
val config = DbxRequestConfig.newBuilder("dropbox/java-tutorial").build()
val client = DbxClientV2(config, ACCESS_TOKEN)
FileInputStream("path/to/local/file").use { inputStream ->
    val metadata = client.files().uploadBuilder("/path/to/dropbox/file")
        .uploadAndFinish(inputStream)
}

Amazon AWS Storage

  1. Follow the instructions provided by Amazon to add Amazon AWS Storage to your Android project.

  2. Add the following to your app-level build.gradle file:

dependencies {
    implementation "aws.sdk.kotlin:s3:0.25.0-beta"
}
  1. Use the following code to upload a file to Amazon AWS Storage:
val credentialsProvider = CognitoCachingCredentialsProvider(
    applicationContext,
    "identityPoolId",
    Regions.US_EAST_1
)

val s3Client = AmazonS3Client(credentialsProvider)

val transferUtility = TransferUtility.builder()
    .context(applicationContext)
    .awsConfiguration(AWSMobileClient.getInstance().configuration)
    .s3Client(s3Client)
    .build()

val file = File("path/to/local/file")
val transferObserver = transferUtility.upload(
    "bucketName",
    "keyName",
    file
)

pCloud

  1. Follow the instructions provided by pCloud to add pCloud to your Android project.

  2. Add the following to your app-level build.gradle file:

dependencies {
    implementation("com.pcloud.sdk:core-ktx:1.8.0")
    implementation("com.pcloud.sdk:android:1.8.1")
}
  1. Use the following code to upload a file to pCloud:
PcloudSdk.init(context, "appKey", "appSecret")
PcloudAuth.startAuthActivityForResult(activity, requestCode)

Share File

  1. Follow the instructions provided by Share File to add Share File to your Android project.

  2. Add the following to your app-level build.gradle file:

dependencies {
    implementation "com.citrix.sharefile:sfandroidsdk:1.0.0"
}
  1. Use the following code to upload a file to Share File:
val authManager = SFAuthenticationManager.getInstance()
authManager.login(activity, object : SFOAuthCallback {
    override fun onSuccess() {
        val file = SFSDKFile()
        file.fileName = "file.txt"
        file.filePath = "path/to/local/file"
        SFSDKFileManager.getInstance().uploadFile(file, object : SFSDKFileManager.SFSDKFileManagerCallback {
            override fun onSuccess() {
                // File uploaded successfully.
            }

            override fun onError(e: Exception) {
                // Error occurred while uploading file.
            }
        })
    }

    override fun onError(e: Exception) {
        // Error occurred while logging in.
    }
})

IOS App

IOS

πŸ”— Links

Android Studio

Compose

Dagger Hilt

Retrofit

Realm

Firebase Storage

Firebase Cloud Messaging

Amazon AWS Storage

Screenshots

Lecturer

Student

Common