Game Slot Android SDK Integration Guide
Updated: 2026-05-09
This document is for Android app integrators. It explains MiniGame Game Slot Android SDK dependencies, initialization, component integration, and test parameters.
Attachment:
AAR package and Demo APK.
1. Integration Requirements
1.1 Dependencies
Place the SDK AAR in the host project's libs directory, then add the following dependencies in the app module:
1.2 Permissions
Declare network permissions in the host app's AndroidManifest.xml:
2. Project Integration
2.1 Initialization Parameters
Production initialization parameters are obtained from the merchant platform or the MiniGame contact. The following parameters can be used for test environment debugging:
| Parameter | Test Value |
|---|---|
client_id | 233802991579168768 |
api_key | 5e567421-c0a5-4723-80a6-2f5567517146 |
api_key corresponds to secretKey in the initialization method.
| Parameter | Type | Description |
|---|---|---|
context | Context | Application Context |
clientId | String | Client ID assigned by operations |
secretKey | String | Secret assigned by operations |
appId | String | App package name |
uid | String | Unique user identifier |
appVersion | String | App version |
2.2 Initialization and Component Integration Example
Initialize the SDK in the first Activity that hosts a game slot or during the app initialization flow. The environment can be set to DEV or PROD; if not set, it defaults to PROD.
3. Game Slot Integration
3.1 BigCardView
BigCardView is used for displaying a single large-card game slot. The component handles click behavior and reports clicks when the user taps the card or button before opening the game.
Test slot_id:
| Component | Test slot_id |
|---|---|
BigCardView | TSZ3R9W6P2K8 |
XML layout:
Code integration:
3.2 BigVideoView
BigVideoView is used for game slots with video display capabilities. Make sure the host project has included the required androidx.media3 dependencies.
Test slot_id:
| Component | Test slot_id |
|---|---|
BigVideoView | TSB4F2H8Y3Q7 |
XML layout:
Code integration:
3.3 ThreeCardsView
ThreeCardsView is used for scenarios where multiple game cards are displayed at once. You can specify the display count and card style during integration.
Test slot_id:
| Component | Test slot_id |
|---|---|
ThreeCardsView | TSK9P4X1Q6B2 |
XML layout:
Code integration:
4. Callback Reference
The host app can use SlotListener to listen for game slot loading, display, click, and game open or close events:
| Callback | Trigger |
|---|---|
onSlotLoaded(gs: GameSlot, slotId: String) | Game slot loaded successfully |
onSlotFailed(message: String, slotId: String) | Game slot failed to load |
onSlotShow(gs: GameSlot, slotId: String) | Game slot displayed |
onSlotClick(gs: GameSlot, slotId: String) | User clicked the game slot |
onGameStart(gs: GameSlot) | Game starts opening |
onGameClose(gs: GameSlot) | Game closed |
5. Integration Notes
SDK initialization must happen before calling component
loadSlot.clientId,secretKey, andslot_idmust be isolated between test and production environments.If the component already handles basic exposure and click flows, the host app should not report the same component again.
The video component depends on Media3. If the host project already uses a different version, watch for dependency conflicts.
Before production launch, verify offline, weak network, API failure, game open failure, and page destruction scenarios.



