Android
Amity Android UIKit Installation Guide
Gradle Installation
Prerequisite
SDK supports Android 5.0 (API Level 21) and above
Installation
Add the Jitpack repository in your project level build.grade
at the end of repositories:
Add the dependency in your module level build.grade.
Find latest UIKit version at Changelog.
Managing Conflicting File Generation
In your app module's build.gradle
, add the following packaging options.
Open-source Installation
With open source, developers have more flexibility and greater customization options, allowing you to have complete control over the visual style. Open sourcing allows for more transparency and visibility, and enables contributions from a greater developer community in terms of good design, implementation, code improvement, and fixes, translating into a better product and development experience.
Migrate Android Open Source UI Kit with Existing Project
Remove existing gradle dependency
If you've never used UI Kit from a gradle dependency before, you may skip this step and proceed to the next step. If you are migrating the UIKit with an existing gradle dependency, you will need to remove it from the gradle at the application level.
Import UI Kit module to your existing project
Clone or download source code from an open-source Github repository. https://github.com/AmityCo/Amity-Social-Cloud-UIKit-Android-OpenSource
Navigate to your current application in Android Studio, then at the top navigation bar go to File > New > Import Module...
Choose the source directory where you downloaded/cloned UI Kit source code.
Make sure that you import
:chat
,:common
,:social
, and:amity-uikit
module as per the screenshot described. The:sample
module is optional and solely contains examples of UIKit Fragments and Activities.
Navigate to the root project's
settings.gradle
file once the modules have been successfully imported. You may see that Android Studio generated a dependency path from the UI Kit source code directory you specified initially. However, there's a chance that Android Studio won't do so or may generate the incorrect path. Please double-check that the path is accurate.
Additionally, in the root project's
settings.gradle
it's also mandatory to declare jitpack.io repository destination by addingmaven { url https://jitpack.io }
to dependencyResolutionManagement > repositories.
Add the imported module to application's gradle file by adding:
Exclude these META-INF from the packaging options in application's gradle
Lastly, apply this in the
project-level
build.gradle file.apply from: "../Amity-Social-Cloud-UIKit-Android/buildsystem/dependencies.gradle"
Also make sure that your settings android.nonTransitiveRClass=false
in gradle.properties
file
Woohoo! All set now you're ready to explore and modify our UI Kit in your application project.
Modifying Android Open Source UI Kit
You can modify the Android open source UI Kit to customize behaviors to fit your needs. To modify the code, simply copy and paste it into your local machine.
We recommend that you first fork the repository before starting any customization work, so that it will be easier to merge the code with the next version update that we provide from the main repository.
Reference on forking: https://docs.github.com/en/get-started/quickstart/fork-a-repo
Get Latest Open Source UI Kit Updates
To update to the latest version of the UI Kit, you can pull the latest commit of the git submodule.
Last updated