Deployment
- Deployment delivery: AAR formatted Android library
- Installers: Gradle
Obtain DMA library
- Obtain the latest DialMyApp framework which is provided as a zip File.
- Unzip the file and find "DialMyAppLib-release.aar" file
Gradle scripts and dependencies
Depending on this, different dependencies should be added to the gradle file!!!
Gradle integration of the .aar library and dependencies required by the library are described here.
- Create an "aars" folder in your project and put the "DialMyAppLib-release.aar" file into it (the name can be different, but change references to this folder accordingly):
MyAndroidProject/
├─ aars/
│ └─ DialMyAppLib-release.aar
├─ app/
│ ├─ src/
│ │ ├─ main/
│ │ │ ├─ java/
│ │ │ │ └─ com/
│ │ │ │ └─ example/
│ │ │ │ ├─ MainActivity.java
│ │ │ │ └─ ...
│ │ │ ├─ res/
│ │ │ │ ├─ drawable/
│ │ │ │ ├─ layout/
│ │ │ │ ├─ mipmap/
│ │ │ │ ├─ values/
│ │ │ │ └─ ...
│ │ │ └─ AndroidManifest.xml
│ │ ├─ test/
│ │ └─ ...
│ ├─ build.gradle
│ └─ ...
├─ build.gradle
├─ gradle/
│ └─ ...
├─ gradlew
├─ gradlew.bat
├─ settings.gradle
└─ ...
- In your gradle script add a reference to this folder:
Note
On newer gradle versions (e.g. 7.0.2+, etc), please add the provided "flatDir" script into the "settings.gradle" file, inside the "repositories{}" scope, instead of adding it in gradle.build of an app module. Example:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
jcenter() // Warning: this repository is going to shut down soon
flatDir {
dirs 'aars'
}
}
}
rootProject.name = "MyAndroidProject"
include ':app'
- Add dependency to the "aar" library:
-
Add other dependencies used by DialMyAppLib. Note, that if you use the same libraries, adjust versions so that the dependency is the only one. Dependencies list depend on the number of targetSDK parameter in your project:
Dependencies for android 14 libraries (Android API 34+)
In case your application targeting API 34+, please use next list of dependencies:
dependencies {
implementation 'com.googlecode.libphonenumber:libphonenumber:8.13.43'
implementation 'com.google.guava:guava:33.2.1-android'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'org.greenrobot:eventbus:3.3.1'
implementation "org.apache.cordova:framework:11.0.0"
implementation "androidx.webkit:webkit:1.11.0"
implementation "androidx.work:work-runtime:2.8.1"
implementation "com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava"
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation "com.faendir.rhino:rhino-android:1.5.2" //optional
implementation 'androidx.security:security-crypto:1.1.0-alpha04' //optional
...
}
Add next dependencies based on the app configuration:
| Platform | Dependencies |
|---|---|
| GMS | implementation 'com.android.installreferrer:installreferrer:2.2'implementation "com.google.android.gms:play-services-maps:17.0.0"implementation "com.google.android.gms:play-services-location:17.0.0" |
| HMS | implementation 'com.huawei.hms:maps:4.0.1.302'implementation 'com.huawei.hms:location:5.0.4.300' |
If the app will use a phone number verification by SMS add next dependencies:
| Platform | Dependencies |
|---|---|
| GMS | implementation 'com.google.android.gms:play-services-auth-api-phone:17.4.0'//optional; for using Phone Number Hint API implementation 'com.google.android.gms:play-services-auth:21.3.0' |
| HMS | implementation "com.huawei.hms:hwid:5.0.3.301" |
GMS - Google Mobile Services.
HMS - Huawei Mobile Services - usually required for publishing the app into the AppGallery (Huawei market).
Add, if the app uses OkHttp v.3 or OkHttp v.4:
| Version | Dependencies |
|---|---|
| OkHttp 3 | implementation "com.squareup.okhttp3:okhttp:3.*.*"implementation 'com.squareup.okhttp3:logging-interceptor:3.*.*' |
| OkHttp 4 | implementation "com.squareup.okhttp3:okhttp:4.10.0"implementation 'com.squareup.okhttp3:logging-interceptor:4.10.0'implementation "com.squareup.okhttp3:okhttp-brotli:4.10.0" |
Dependencies for android 12 libraries (Android API 31-33)
In case your application targeting API 31-33, please use next list of dependencies:
dependencies {
implementation 'com.googlecode.libphonenumber:libphonenumber:8.13.43'
implementation 'com.google.guava:guava:33.2.1-android'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'org.greenrobot:eventbus:3.3.1'
implementation "org.apache.cordova:framework:11.0.0"
implementation "androidx.webkit:webkit:1.11.0"
implementation "androidx.work:work-runtime:2.8.1"
implementation "com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava"
implementation 'androidx.appcompat:appcompat:1.3.1'
implementation "com.faendir.rhino:rhino-android:1.5.2" //optional
implementation 'androidx.security:security-crypto:1.1.0-alpha04' //optional
...
}
Note
You can use androidx.security:security-crypto:1.1.0-alpha03 instead of alpha04 in case you are not ready to use compileSdkVersion 33
Add next dependencies based on the app configuration:
| Platform | Dependencies |
|---|---|
| GMS | implementation 'com.android.installreferrer:installreferrer:2.2'implementation "com.google.android.gms:play-services-maps:17.0.0"implementation "com.google.android.gms:play-services-location:17.0.0" |
| HMS | implementation 'com.huawei.hms:maps:4.0.1.302'implementation 'com.huawei.hms:location:5.0.4.300' |
If the app will use a phone number verification by SMS add next dependencies:
| Platform | Dependencies |
|---|---|
| GMS | implementation 'com.google.android.gms:play-services-auth-api-phone:17.4.0'//optional; for using Phone Number Hint API implementation 'com.google.android.gms:play-services-auth:21.3.0' |
| HMS | implementation "com.huawei.hms:hwid:5.0.3.301" |
GMS - Google Mobile Services.
HMS - Huawei Mobile Services - usually required for publishing the app into the AppGallery (Huawei market).
Add, if the app uses OkHttp v.3 or OkHttp v.4:
| Version | Dependencies |
|---|---|
| OkHttp 3 | implementation "com.squareup.okhttp3:okhttp:3.*.*"implementation 'com.squareup.okhttp3:logging-interceptor:3.*.*' |
| OkHttp 4 | implementation "com.squareup.okhttp3:okhttp:4.10.0"implementation 'com.squareup.okhttp3:logging-interceptor:4.10.0'implementation "com.squareup.okhttp3:okhttp-brotli:4.10.0" |