Android SDK Setup
To integrate AppsOnAir Android SDK into your Android native Apps with Java or Kotlin, follow the below steps
Basic Requirements for Service Usage
Essential Setup
- Make sure to configure the App ID properly. For additional information Getting started
- Install or update Android Studio to its latest version.
- Make sure that your project meets these requirements:
- Targets API level 24 (NOUGAT) or higher
- Uses Android 7.0 or higher
- Android Gradle Plugin (AGP): Version 8.0.2 or higher
- Gradle: Version 8.0 or higher
- Uses Jetpack (AndroidX), which includes meeting these version requirements:
compileSdkVersion34 or later
Add AppsOnAir AppRemark in Gradle Plugin and SDK
Newer versions of Android Studio
When creating a new project from Android Studio Arctic Fox (or newer) the allprojects{...} is no longer added in the project level gradle, so you need to add it in settings.gradle
- Groovy
- Kotlin
settings.gradle
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
...
maven { url 'https://jitpack.io' }
}
}

settings.gradle.kts
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
...
maven("https://jitpack.io")
}
}

gradle.properties
android.useAndroidX = true
android.enableJetifier = true
Open Your Root build.gradle File and Add the Following
- Groovy
- Kotlin
build.gradle
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
build.gradle.kts
allprojects {
repositories {
...
maven("https://jitpack.io")
}
}
Add the Following to Your dependencies Section.
libs.versions.toml
[versions]
appsonairAndroidAppremark = "Tag" // latest version
[libraries]
appsonair-android-appremark = { module = "com.github.apps-on-air:AppsOnAir-Android-AppRemark", version.ref = "appsonairAndroidAppremark" }
app/build.gradle
dependencies {
implementation (libs.appsonair.android.appremark)
}

Sync Gradle
Make sure to press "Sync Now" on the banner that pops up after saving!
Add the AppsOnAir Initialization Code and Usage
You can call initialization at your preference however, we recommend that you add the initialization code in Main Launcher Activity(MainActivity.java) file onCreate method as follows:
- Java
- Kotlin
MainActivity.java
import com.appsonair.appremark.services.AppRemarkService;
public class MainActivity extends AppCompatActivity {
private ActivityMainBinding binding;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Map<String, Object> options = new HashMap<>();
options.put("appBarTitleText", "Add Remark");
//AppRemark service Initialization with customizes and handle shakeGestureEnable with feedback status listner
AppRemarkService.initialize(
this,
true,
options,
(JSONObject response) -> {
Log.d("AppRemark", response.toString());
return Unit.INSTANCE; // Required for Unit return type
}
);
}
}
MainActivity.kt
import com.appsonair.appremark.services.AppRemarkService
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
val options = mutableMapOf(
"appBarTitleText" to "Add Remark"
)
//AppRemark service Initialization with customizes and handle shakeGestureEnable with feedback status listner
AppRemarkService.initialize(
activity,
shakeGestureEnable = true,
options = options
) { result ->
Log.d("AppRemark", result.toString())
}
}
}
- This method initializes the AppRemark services.
context: The context of the activity in which the remark service is being initialized.shakeGestureEnable: A boolean value that enables or disables the shake gesture for triggering the remark screen.shakeSensitivity(optional): Controls how hard the device must be shaken to trigger the remark screen. Defaults toShakeSensitivity.MEDIUM.options: A Map that allows customization of the remark screen’s UI, such as setting the app bar title or other visual elements.onRemarkResponse: The listener for the feedback status when feedback is submitted, such as success or failure responses.
shakeSensitivity values
| Value | Description |
|---|---|
ShakeSensitivity.VERY_LOW | Very hard, deliberate shake required |
ShakeSensitivity.LOW | Firm shake required |
ShakeSensitivity.MEDIUM | Normal shake (default) |
ShakeSensitivity.HIGH | Light shake triggers feedback |
ShakeSensitivity.VERY_HIGH | Any motion triggers feedback |
Pass shakeSensitivity in initialize:
- Java
- Kotlin
MainActivity.java
AppRemarkService.initialize(
this,
true,
options,
ShakeSensitivity.MEDIUM,
(JSONObject response) -> {
Log.d("AppRemark", response.toString());
return Unit.INSTANCE;
}
);
MainActivity.kt
AppRemarkService.initialize(
activity,
shakeGestureEnable = true,
options = options,
shakeSensitivity = ShakeSensitivity.MEDIUM
) { result ->
Log.d("AppRemark", result.toString())
}
onRemarkResponse listener response
{
"message": "Remark added successfully.",
"status": "SUCCESS"
}
| Field | Type | Description | Example |
|---|---|---|---|
message | string | A descriptive message providing details about the feedback submission status. | "Remark added successfully." |
status | "SUCCESS" | "FAILURE" | Indicates whether the feedback submission succeeded or failed in the onRemarkResponse listener. | "SUCCESS" |
Available keys of options for Customization
| Key | DataType | Value | Description |
|---|---|---|---|
pageBackgroundColor | String | "#E8F1FF" | Set page background color |
appBarBackgroundColor | String | "#E8F1FF" | Set appbar background color |
appBarTitleText | String | "Add Remark" | Set appbar title text |
appBarTitleColor | String | "#000000" | Set appbar title color |
remarkTypeLabelText | String | "Remark Type" | Set remark type label text |
descriptionLabelText | String | "Description" | Set description label text |
descriptionHintText | String | "Add description here..." | Set description hint text |
descriptionMaxLength | int | 255 | Set description max length |
buttonText | String | "Submit" | Set button text |
buttonTextColor | String | "#FFFFFF" | Set button text color |
buttonBackgroundColor | String | "#007AFF" | Set button background color |
labelColor | String | "#000000" | Set text field label color |
hintColor | String | "#B1B1B3" | Set text field hint color |
inputTextColor | String | "#000000" | Set text field input text color |
Manually Open AppRemark Screen
- Java
- Kotlin
MainActivity.java
import com.appsonair.appremark.services.AppRemarkService;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
//Help to open remark screen manually
AppRemarkService.addRemark(this);
}
}
MainActivity.kt
import com.appsonair.appremark.services.AppRemarkService
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
//Help to open remark screen manually
AppRemarkService.addRemark(this)
}
}
- This method is used to manually open the remark screen, allowing users to provide feedback.
context: The context of the activity in which the remark service is being initialized.
Manually Add Additional Meta
- Java
- Kotlin
MainActivity.java
import com.appsonair.appremark.services.AppRemarkService;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
//Help to add extra data about app
Map<String, Object> options = new HashMap<>();
options.put("userId", "USER_ID");
options.put("isShake", true);
AppRemarkService.setAdditionalMetaData(options);
}
}
MainActivity.kt
import com.appsonair.appremark.services.AppRemarkService
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
//Help to add extra data about app
AppRemarkService.setAdditionalMetaData( mapOf(
"userId" to "USER_ID",
"isShake" to true
))
}
}
- The
setAdditionalMetaDatamethod is optional and can be used to pass additional metadata inextraPayloadparams, such as the app version, flavors, or any other contextual information. This data is sent along with the feedback to enhance tracking and categorization, making it easier to analyze and act on user inputs effectively. If you want to use this method, follow the examples above.
Run App & Verify App Remark Services
Run your app by using Android Studio on Android simulators or any physical device to make sure it builds correctly.
note
All submitted screenshots and feedback will be displayed on a web portal.