Skip to main content

Installation & Setup

This guide helps you set up your project and install the Gameball Android SDK v3.1.0.
After completing these steps, proceed to Initialize the SDK to start using Gameball in your app.

Requirements

Your project must meet the following minimum requirements:
  • Minimum SDK Version: 21 (Android 5.0)
  • Target SDK Version: 34
  • Kotlin: 2.0.0+
  • AndroidX: Required
  • Internet permission in your AndroidManifest.xml:
<uses-permission android:name="android.permission.INTERNET" />

Install the SDK

1. Add Repositories

Add the required repositories to your project-level settings.gradle (or build.gradle for older projects):
dependencyResolutionManagement {
  repositories {
    google()
    mavenCentral()
    maven { url "https://jitpack.io" }
    maven { url 'https://developer.huawei.com/repo/' }
  }
}
If your project uses an older Gradle configuration, add these repositories under: allprojects { repositories { ... } }.

2. Add the Gameball Dependency

In your app-level build.gradle:
dependencies {
  implementation 'com.github.gameballers:gb-mobile-android:3.1.0'
}

3. (Optional) Maven Installation

If you are using Maven:
<dependency>
  <groupId>com.gameball</groupId>
  <artifactId>gameball-sdk</artifactId>
  <version>3.1.0</version>
</dependency>

ProGuard / R8 Configuration

If you are using ProGuard or R8, add the following rules to your proguard-rules.pro:
# Gameball SDK
-keep class com.gameball.gameball.** { *; }
-keep class com.gameball.gameball.model.** { *; }

# Gson
-keepattributes Signature
-keepattributes *Annotation*
-keep class com.google.gson.** { *; }
The SDK automatically enables debug logging in debug builds. Network requests and responses are logged when BuildConfig.DEBUG is true.

Troubleshooting Setup

Symptoms: Gradle cannot resolve com.gameball:gameball-sdk:3.1.0. Solutions:
  • Ensure jitpack.io and Huawei repos are added under repositories.
  • Sync Gradle again from Android Studio.
  • Check for typos in the dependency coordinates.
Symptoms: Calls fail or time out after integrating the SDK. Solutions:
  • Verify INTERNET permission is present in AndroidManifest.xml.
  • Check network connectivity on the test device/emulator.
  • Confirm your API key is correct in the Gameball dashboard (once you initialize the SDK).

Debug Logging

The SDK logs useful information when BuildConfig.DEBUG is true.

Logcat Tags

TagDescription
GameballAppGeneral SDK operations and lifecycle
LoggingInterceptorNetwork requests and responses
HeaderInterceptorRequest headers and authentication

Example:

adb logcat -s GameballApp LoggingInterceptor HeaderInterceptor
No extra configuration is required, debug logs are automatically enabled in debug builds.

Next Steps