Skip to main content
All CollectionsInstallation
Mobile SDK Installation Guide for Android
Mobile SDK Installation Guide for Android
Hakan Baybas avatar
Written by Hakan Baybas
Updated over 11 months ago

Commented's Mobile SDK for Android allows you to integrate Commented's commenting and collaboration features seamlessly into your Android application. With this SDK, you can provide a collaborative environment for your app users to leave comments and feedback right within your mobile app.

Mobile SDK Installation for Android: A Step-by-Step Guide

Follow these steps to install Commented's Mobile SDK on your Android application:

Step 1: Add the SDK to Your Project

In your project-level build.gradle file, add the mavenCentral repository if it's not already added. If you are using Groovy, modify the build.gradle file; otherwise, if you are using Kotlin DSL, update the settings.gradle.kts file.

buildscript { repositories { mavenCentral() // Add this line if not already present // ... } // ... }

In your app-level build.gradle file, add the SDK dependency:

For Kotlin.dsl

dependencies { // ... implementation("io.commented.android:commented:commented-sdk-version") // Replace 'commented-sdk-version' with the latest. // ... }

For Groovy

dependencies { // ... implementation 'io.commented.android:commented:commented-sdk-version' // Replace 'commented-sdk-version' with the latest. // ... }

Step 2: Sync Gradle

After adding the dependency, sync your project and download the SDK.

You may need to clean and rebuild your project.

Step 3: Initialize the SDK

Here's how you initialize the Commented SDK in the activity you want to use:

For Kotlin

import android.app.Application import com.commented.sdk.CommentedActivity class MyApplication : Application() { override fun onCreate() { super.onCreate() // Initialize the SDK here CommentedActivity(this).setupCommented() } }

For Java

import android.app.Application; import com.commented.sdk.CommentedActivity; public class MyApplication extends Application { @Override public void onCreate() { super.onCreate(); // Initialize the SDK here new CommentedActivity(this).setupCommented(); } }

Step 4: Build and Run Your App

Build and run your Android application to test the integration of the com.commented.sdk.

Did this answer your question?