Skip to content

Latest commit

 

History

29 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

ModdakirSDK-Android

Android Library connects you Directly with teacher to learn the Holy Qur’an 📖

Getting Started

These instructions will help you setup, integrate and run your project integrated with our SDK.

Note: The minSdkVersion should be 23 for supporting the 16KB Page Size

Integration Steps

  1. Copy the AAR file Place the .aar file in the libs directory of your Android module (e.g., app/libs). If the libs folder doesn't exist, create it manually in your module's directory.

  2. Update the build.gradle File Open the build.gradle file of your module (e.g., app/build.gradle).

Add the following block to include the libs folder as a repository:

repositories {
    flatDir {
        dirs 'libs'
    }
}

Add the AAR file as a dependency:

dependencies {
    implementation(name: 'moddakir-sdk-v1.x.x', ext: 'aar')
}
  1. Sync the Project Click on Sync Now in Android Studio to apply the changes.

  2. Check the Dependencies Open the Project Structure (File > Project Structure > Dependencies). Verify that your AAR file has been added to the dependencies list.

  3. Handle Transitive Dependencies 3- Add In your build.gradle these dependencies :

dependencies {
    implementation(name: 'moddakir-sdk-v1.x.x', ext: 'aar')
}
  1. Add the dependency
 dependencies {

     // Add moddakir-sdk.aar path
    implementation(files("libs/moddakir-sdk.aar"))

    // Circle Imageview
    implementation("de.hdodenhof:circleimageview:3.0.1")

    // Localization
    implementation("com.akexorcist:localization:1.2.11")

    // Agora
    implementation("io.agora.rtc:full-sdk:4.6.0")
    implementation("io.agora:agora-rtm-lite:2.2.4")

    // RxJava
    implementation("io.reactivex.rxjava2:rxandroid:2.1.1")
    implementation("io.reactivex.rxjava2:rxjava:2.2.21")

    // Retrofit
    implementation("com.squareup.retrofit2:converter-gson:2.9.0")
    implementation("com.squareup.retrofit2:adapter-rxjava2:2.3.0")

    // Easy Permissions
    implementation("pub.devrel:easypermissions:3.0.0")

    // Timber
    implementation("com.jakewharton.timber:timber:4.7.1")

    //Glide
    implementation ("com.github.bumptech.glide:glide:4.15.1")
}

Restoring Ongoing Calls

To ensure the user returns to the ongoing call screen when reopening your app (for example after screen lock, pressing Home, or switching apps), add this code inside your Activity:

@Override
protected void onResume() {
    super.onResume();

    // If a call is currently active, bring the call screen to the front
    if (CallState.isCalling()) {
        Intent intent = new Intent(this, AgoraActivity.class);
        intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
        startActivity(intent);
    }
}

Quick Start

Call makeCall method :

makeCall(String moddakirId,String moddakirKey, Context Context ,String Gender,
String Name,String Phone,String Email,
String Language, boolean isLightMode, Integer primaryColor)

to initialize a new call with a random teacher and it will be responsible for:

Validate the user’s name,user's phone number,user's email ,user's gender and language.

Present the waiting screen to the user while trying to connect with a teacher.

Present the in-call screen once the teacher accepts the call.

Present the rating screen after the call ends if it continues more than 30 seconds.

Present the rating done pop-up after rating the teacher and the call.

this funtion take:

moddakirId : Contact Moddakir Support to get this value

moddakirKey: Contact Moddakir Support to get this value

Context: Context of activity that will start the call

Gender: The user’s gender "male/female"

Name: The user's Name

Phone: The user Phone include the country code

Email: The user Email

Language: application language "ar/en/fr/in/ur"

isLightMode: 'true' if the app is light theme / 'false' if app is dark theme

primaryColor: apply your primary color

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors