Android Testing SDK Integration Manual
Automate Google Play 14-day closed testing compliance. Embed the lightweight SDK to verify authentic 1-minute daily testing sessions and grant tester rewards securely.
โก Quick-Start Integration (4 Easy Steps)
Include SDK and Dependencies
Add the `apptestershub-sdk.aar` file into your app's `libs` directory and include required dependencies in your app's `build.gradle`:
dependencies {
// AppTestersHub SDK
implementation files('libs/apptestershub-sdk-debug.aar')
// Networking and Serialization
implementation 'com.squareup.okhttp3:okhttp:4.12.0'
implementation 'com.google.code.gson:gson:2.10.1'
// Hardware-backed encrypted storage
implementation 'androidx.security:security-crypto:1.1.0-alpha06'
// UI & Lifecycle
implementation 'com.google.android.material:material:1.11.0'
}
Obtain Your App Credentials
Navigate to your Dashboard or List New App. Your app details page will provide your:
- App ID: (e.g.
42) - SDK API Key: (64-character hexadecimal public key)
- SDK API Secret: (64-character secret key used for HMAC request signing)
Initialize SDK in Your Main Activity
Call initialize() inside onCreate() of your launcher activity:
package com.yourcompany.app;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import com.apptestershub.sdk.AppTestersHubSDK;
public class MainActivity extends AppCompatActivity {
private static final String APP_ID = "YOUR_APP_ID";
private static final String API_KEY = "YOUR_SDK_API_KEY";
private static final String API_SECRET = "YOUR_SDK_API_SECRET";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
// Initialize AppTestersHub SDK
AppTestersHubSDK.initialize(this, APP_ID, API_KEY, API_SECRET);
}
}
Relay Lifecycle Events
Forward onResume() and onPause() events so the SDK can track active foreground testing time and trigger heartbeats:
@Override
protected void onResume() {
super.onResume();
AppTestersHubSDK.onActivityResumed(this);
}
@Override
protected void onPause() {
super.onPause();
AppTestersHubSDK.onActivityPaused(this);
}
๐ก๏ธ Security & Anti-Cheat Features
- โ HMAC-SHA256 Signatures: Every SDK transmission is signed with your private secret to guarantee origin authenticity.
- โ Hardware Device Binding: Session tokens are tied to hardware IDs to prevent emulator spoofing.
- โ Server-Side Rate Limiting: Endpoints are throttled (60 req/min) to prevent brute-force attacks.
- โ Encrypted Keystore: User emails and session tokens are encrypted with AES-256-GCM in the device's secure enclave.
๐งช What the Tester Experiences
- 1. On first launch, a polished branded dialog asks the tester for their AppTestersHub email.
- 2. A floating overlay displays the testing session timer (counting up to 60 seconds).
- 3. At 60 seconds, an automatic screenshot is taken and verified, awarding 1 coin to the tester.
- 4. Testers can test once per calendar day per app across the full 14-day compliance cycle.
ProGuard / R8 Rules (If Obfuscating)
If you have Proguard or R8 enabled in release builds, add these rules to proguard-rules.pro:
-keep class com.apptestershub.sdk.** { *; }
-keepclassmembers class com.apptestershub.sdk.models.** { *; }
-dontwarn okhttp3.**
-dontwarn com.google.gson.**
Ready to list your Android app?
Sign up now to get 14 free welcome coins โ enough to sponsor your first complete 14-day test cycle.
Create Account & Get 14 Free Coins