Gameball Developers Guide
v3.0
v3.0
  • Introduction
  • What's New in V3.0
  • Installing Gameball
    • Web
      • Show Gameball Customer Widget
      • Track Customer Events
      • Track Orders & Cashback Reward
      • Integrate Redemption
      • Track Referrals
      • Go-Live Checklist
    • iOS
      • Getting Started
      • Initialize Gameball Customer Profile
      • Track Customer Events
      • Track Orders & Cashback Reward
      • Integrate Redemption
      • Track Referrals
      • Push Notifications
      • Go-Live Checklist
    • Android
      • Getting Started
      • Initialize Gameball SDK
      • Initialize Gameball Customer Profile
      • Track Customer Events
      • Track Referrals
      • Push Notifications
      • Go-Live Checklist
    • React Native
      • Getting Started
      • Initialize Gameball Customer Profile
      • Track Customer Events
      • Track Orders & Cashback Reward
      • Integrate Redemption
      • Track Referrals
      • Push Notifications
      • Go-Live Checklist
      • Migration from v1 to v2
    • Flutter
      • Getting Started
      • Initialize Gameball SDK
      • Initialize Gameball Customer Profile
      • Track Customer Events
      • Track Referrals
      • Go-Live Checklist
    • Generic Mobile App
      • Initialize Gameball Customer Profile
      • Track Customer Events
      • Track Orders & Cashback Reward
      • Integrate Redemption
      • Track Referrals
      • Push Notifications
    • Retail & Modern POS
      • Initialize Gameball Customer Profile
      • Track Orders & Cashback Reward
      • Track Refunds
      • Enable Redemption
        • Prepare POS for Redemption
        • Using Virtual ID
          • Using Virtual Card
  • REST API
    • Overview
      • Server-Side SDKs
    • Authentication
    • API Reference
      • Customer
      • Event
      • Transactions
      • Order
      • Coupons
      • Leaderboard 👑
      • Notifications 👑
      • Configurations 👑
      • Batches 👑
        • Batch Operations Data
      • OTP
      • Partner 🤝
        • Client 🤝
        • Redemption Rule 🤝
        • Cashback Rule 🤝
    • Webhooks
      • Notifications Webhook
      • Customer Profile Webhook
    • Errors
    • Object Reference
  • Tutorials
    • Build Custom UI Elements 👑
      • Display Reward Campaign Progress
      • Show VIP Tiers
      • Show Customer Points Balance
      • Build Leaderboards
      • Show Notifications Inbox
      • Adapt UI to Configurations
      • Advanced UI Techniques
        • Increase Sales with Cashback UI Elements
        • Derive Engagement with Rewards Campaigns UI Elements
    • Tracking Customer Events
    • Build your Own Notification System
    • Checkout Integration Example
    • Redemption Integration Options
      • Redeem with coupon system
        • Integrate your coupon system
          • Example using e-commerce platform(WooCommerce)
          • Example using a custom coupon system
        • Build couponing experience
          • Using Gameball widget
          • Build custom experience
            • Showing customers available points
            • Allowing customers to create coupons
            • Apply the discount code to your cart
        • Coupon integration reference
      • Redeem with direct debt
        • Get customers points balance
        • Redeem customer points
  • Third Party Integrations
    • Segment Integration
Powered by GitBook
On this page
  • Setting up Gameball SDK
  • To install Firebase Google Play Services dependencies
  1. Installing Gameball
  2. Android

Getting Started

Install the Gameball Android SDK into your app

Gameball's Android SDK enables you to use the show Gameball customer profile in your app, track app customer events, integrate referrals and display Gameball's in-app push notifications.

Setting up Gameball SDK

Follow the below steps to start installing Gameball's Android SDK to your app.

Add JitPack repository to your project's build.gradle (or settings.gradle if you're on newer versions) file.

dependencyResolutionManagement {
    ...
    repositories {
        ...
        maven { url "https://jitpack.io" }
    }
}

Add the following dependency to the application's build.gradle file to import Gameball's SDK into your project.

dependencies {
    ...
    implementation 'com.github.gameballers:gb-mobile-android:1.5.1'  
}

Make sure that you added the INTERNET permission in your application's AndroidManifest.xml file as follows:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
    ...
    <uses-permission android:name="android.permission.INTERNET" />
    ...
</manifest>
    

To install Firebase Google Play Services dependencies

Gameball SDK uses Firebase Dynamic Links to track referrals and Firebase Messaging for sending push notifications, you'll need to add the following dependencies.

dependencies {
    ...
    // Make sure to include this dependency even if you won't include Firebase Messaging
    implementation platform('com.google.firebase:firebase-bom:<latest_version>')
    // Firebase Dynamic Links only - must be included
    implementation "com.google.firebase:firebase-dynamic-links"    
    // Firebase Messaging only - optional depending on whether or not you want to use FCM
    implementation 'com.google.firebase:firebase-messaging'  
}

You also need to add google-services plugin to your application.

App's build.gradle file:

plugins {
    ...
    id 'com.google.gms.google-services'
}

Project's build.gradle file:

buildscript{
    ...
    dependencies {
        ...
        classpath 'com.google.gms:google-services:<latest_version>'

    }
}

Don't forget to include your google-services.json to your app root after registering it to a Firebase project.

When publishing your app, make sure if you are using ProGuard rules, to exclude gameball packages to avoid Reductions/Code obfuscation by adding the following line in the proguard-rules.pro file.

-keep class com.gameball.gameball.** { *; }
PreviousAndroidNextInitialize Gameball SDK

Last updated 6 months ago

For the latest Firebase SDK (BOM, Cloud Messaging, Deep Links, and Google Services) versions check their .

Follow tutorial to learn more on how to register your Android application to Firebase.

release notes
this