Step 0 : Add Reve SaaS module to your project
Collect artifactory_username
and artifactory_password
from Dhiman da and add them to your project level gradle file.
buildscript {
ext.artifactory_username = 'USER_NAME'
ext.artifactory_password = 'PASSWORD'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.1'
}
}
Add the following repositories to your project level gradle file
allprojects {
repositories {
google()
jcenter()
maven {
url "http://maven.alalamin19.com:8081/artifactory/libs-release-local"
credentials {
username = "$artifactory_username"
password = "$artifactory_password"
}
}
maven { url 'https://maven.google.com/' }
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
maven { url "http://sdk.revechat.com:8081/artifactory/revechatsdk" }
mavenCentral()
maven {
url 'http://www.idescout.com/maven/repo/'
name 'IDEScout, Inc.'
}
maven { url 'https://jitpack.io' }
maven{ url 'https://s3.amazonaws.com/repo.commonsware.com' }
}
}
Now add the following dependancy in you app module gradle file
implementation 'com.revesoft.sdk:dialer:1.1.0'
Add tools:replace="android:allowBackup,android:theme,android:roundIcon"
in <application/>
tag of your manifest
Now sync
Step 1 : You must use material theme in your project and must define the following colors
Add material branding files from the following repository http://git.iptelephony.revesoft.com/ifta/MaterialBrandingFiles
clone this repository to a empty folder. Copy all files to your values folder
Step 2 : Add the following packaging option in your build.gradle file under android.
android{
.....
packagingOptions {
exclude 'LICENSE'
exclude 'LICENSE.txt'
exclude 'license'
exclude 'license.txt'
exclude 'NOTICE'
exclude 'notice'
exclude 'METAINF/ASL2.0'
exclude 'METAINF/LICENSE'
exclude 'METAINF/license'
exclude 'METAINF/NOTICE'
exclude 'META-INF/MANIFEST.MF'
exclude 'META-INF/DEPENDENCIES'
exclude 'asmlicense.txt'
exclude 'META-INF/services/com.fasterxml.jackson.core.JsonFactory'
exclude 'META-INF/services/com.fasterxml.jackson.core.ObjectCodec'
}
}
If you already have packaging option you can add these to yours.
Step 3 : Enable data binding to your project. Add the following in your build.gradle file under android.
android{
.....
dataBinding {
enabled = true
}
}
Step 4 : Provide authority for file compression library in the SaaS.
Add the following provider in application tag of your manifest
<application>
....
<provider
android:name="com.iceteck.silicompressorr.provider.GenericFileProvider"
android:authorities="${applicationId}.silli.provider"
android:exported="false"
android:grantUriPermissions="true"
tools:replace="android:authorities">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/silli_provider_paths"
tools:replace="android:resource" />
</provider>
</application>
Step 5 : Add other providers
Add the following 2 providers in manifest used by the sdk
<application>
....
<provider
android:name="com.revesoft.itelmobiledialer.util.GenericFileProvider"
android:authorities="${applicationId}.provider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/provider_paths" />
</provider>
</application>
Step 6 : Add firebase to your project
Step 7 : Add compileOptions in app module gradle under android tag
android {
....
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
....
}
Step 8 : Enable multidex
android {
....
defaultConfig {
...
multiDexEnabled true
}
....
}
Final step :
Create an application class and extend ReveSaaSApplication
.
Declare the application class as name in your android manifest at application tag.
<application
...
android:name=".BaseApplication"
...>
...
....
</application>
You must Override onCreate()
and onTerminate()
method.