G-Loot Esports Platform

G-Loot Esports Platform

  • Mobile game wrapper
  • G-Rewards

›Integrations

General

  • About

Tracking

  • Web Application Events

Integrations

  • Native
  • Android
  • Unity

Integration for Android

G-Loot implementation for Native

​

Prerequisites

​ We currently support native implementation in the following languages and platforms: ​

  • Swift(iOS)
  • Kotlin(Android) ​

Using the SdkManager

​ In order to start using the G-Loot SDK, we make use of a singleton. To access the G-Loot SDK use the following pierce of code: ​ ​

Swift
Kotlin
SdkManager.Companion().instance()
SdkManager.instance()
​

Configure your game

​ To make G-Loot SDK able to identify your game in our system, we make use of the configure method. The configure method looks up if your game is available and that the user location is a accepted one. ​ For obvious reasons the ’useDevelopmentMode’ should be bound to which variant you want to build. ​

Swift
Kotlin
SdkManager.Companion().instance()?.configure(
sdkID: "7823102390223902",
useDevelopmentMode: true
)
SdkManager.instance()?.configure(
sdkID = "7823102390223902",
useDevelopmentMode = true
)

Listen for events in the G-Loot SDK

​

Swift
Kotlin
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate, BroadcastEventInterface, GameDelegate, OnboardingDelegate {
func handleBroadcastEvent(event: String, value: String) {
print("Event: \(event) Value: \(value)")
switch event {
case "playMatch":
if let match = MatchFactory().create(json: value) {
//Take user to the actual game, and send the match object along with it
} else {
print("Could not parse match from json:\n\(value)")
}
break
case "ready":
//The G-Loot SDK is now ready. Use this to hide spinners or enable buttons
break
case "onboarding":
//If you have a tutorial step for your game. When the webapp sends "onboarding" it means you can start the tutorial mode
break
default:
break
}
}
}
​
​
SdkManager.Companion().instance()?.setBroadcastEventListener(broadcastEventInterface: self)
SdkManager.instance()?.setBroadcastEventListener(this)
← NativeUnity →
  • Prerequisites
    • Using the SdkManager
    • Configure your game
    • Listen for events in the G-Loot SDK
G-Loot Esports Platform
Docs
Getting Started (or other categories)Guides (or other categories)API Reference (or other categories)
Community
User ShowcaseStack OverflowProject ChatTwitter
More
BlogGitHubStar
Facebook Open Source
Copyright © 2020 G-Loot