Android Story Quick Start Guide
Quick Start Guide for Integrating AmityUIKit's Story Feature into Android Applications
Welcome to the Quick Start Guide for integrating Amity Social Cloud's Story feature into your existing Android application. This guide provides step-by-step instructions to incorporate social storytelling into your app, enhancing user engagement through shared experiences.
Prerequisites
Android Studio installed on your system.
An Android project targeting API level 21 (Android 5.0) or higher.
A valid Amity Social Cloud account and an API key.
Step 1: Prepare Your Android Project
Ensure your project targets Android 5.0 (API Level 21) or above in your build.gradle
(Module) file:
Step 2: Add JitPack Repository
Add the JitPack repository to your project-level build.gradle
file to access AmityUIKit:
Step 3: Add AmityUIKit Dependency
Insert the dependency for AmityUIKit in your app-level build.gradle
file. Ensure to replace x.y.z
with the latest version:
Step 4: Configure Gradle Settings
Enable data binding, set the Java and Kotlin compatibility versions in your app-level build.gradle
:
Step 5: Manage Conflicting File Generation
To avoid build errors related to conflicting files, add these lines to your app-level build.gradle
:
Step 6: Initialize AmityUIKit SDK
Initialize the SDK with your API key before using any of its features:
Optionally, specify endpoints manually if required by your application's infrastructure needs.
Step 7: Integrating Story Feature
For integrating the story feature into your Android application, you can use Jetpack Compose for a modern and efficient UI implementation.
For displaying stories related to a specific community:
For navigating to the story creation page, specifying a target community ID:
To allow users to create stories, initiate the story creation page with a specific target, such as a community ID:
Step 8: Customizing the UI
AmityUIKit supports extensive customization options via a config.json
file. You can modify themes, colors, and icons for various components and elements of the story feature according to your application's design requirements.
Example customization snippet:
You can exclude certain UI elements or customize specific components and elements as per your needs.
You have now successfully integrated the Amity Social Cloud Story feature into your Android application. For further customization options, refer to the detailed documentation provided with the SDK. If you encounter any issues or require assistance, our community forum at community.amity.co is always here to help.
Last updated