Overview
This guide covers complete installation of the Stringboot Android SDK, including analytics integration for A/B testing. Follow all steps to unlock the full capabilities of dynamic strings, translations, and experiments.A/B Testing Setup is Included: This guide includes analytics handler and device ID configuration required for experiments. These are core features, not optional add-ons.
Step 1: Add Maven Repository
Add Maven Central to your projectβssettings.gradle.kts:
settings.gradle.kts
Step 2: Add SDK Dependency
In your appβsbuild.gradle.kts:
build.gradle.kts
Step 3: Sync Project
Click Sync Now in Android Studio or run:Step 4: Secure API Credentials
Add to gradle.properties
Create or editgradle.properties in your project root and add to .gitignore:
gradle.properties
Configure Build Script
Inapp/build.gradle.kts, configure manifest placeholders:
build.gradle.kts
Step 5: Configure AndroidManifest.xml
Add required permissions and SDK configuration:AndroidManifest.xml
Step 6: Analytics Handler (Required for A/B Testing)
Why Analytics Integration is Required
The analytics handler enables:- Experiment tracking: Know which users see which variants
- Results analysis: Measure impact of string changes
- Data-driven decisions: Use analytics platforms for statistical analysis
- Firebase Analytics
- Mixpanel
- Amplitude
- Custom Analytics
Step 7: Device ID Configuration (Required for A/B Testing)
Why Device ID is Required
- Consistent assignments: Same device always gets same variant
- Cross-session persistence: Experiments persist across app restarts
- Accurate results: Users donβt switch between variants randomly
- Auto-Generated (Default)
- Firebase Installation ID
- Custom Device ID
SDK-Generated UUID (Recommended)
By default, the SDK generates a persistent UUID per app installation:StringbootApplication.kt
- Persists across app launches
- Unique per app installation
- Automatically managed by SDK
- Use this unless you have a specific reason to use custom ID
Step 8: Complete SDK Initialization
Hereβs the complete Application class with all components:StringbootApplication.kt
Step 9: Verify Setup
Test SDK Initialization
- Run your app with debug logging enabled
- Check Logcat for Stringboot initialization messages:
Test String Retrieval
Add a test in your MainActivity:MainActivity.kt
Test Experiment Assignment
If you have experiments running:Verify Analytics Integration
- Check your analytics platform (Firebase/Mixpanel/Amplitude)
- Look for user properties like
stringboot_exp_cta_test - Value should be variant name:
control,variant-a, etc.
Common Setup Issues
Build fails with 'STRINGBOOT_API_TOKEN not configured'
Build fails with 'STRINGBOOT_API_TOKEN not configured'
Cause: API token not in gradle.propertiesSolution:
- Create
gradle.propertiesin project root (next to settings.gradle.kts) - Add
STRINGBOOT_API_TOKEN=your_token_here - Add
gradle.propertiesto.gitignore - Sync project
Analytics handler not called
Analytics handler not called
Possible causes:
- No experiments running in dashboard
- Analytics handler not passed to
autoInitialize() - Device not assigned to any experiments
- Create test experiment in dashboard
- Verify
analyticsHandlerparameter is set - Check device ID is being sent with requests
Strings show '??key??' pattern
Strings show '??key??' pattern
Causes:
- API token invalid
- No network connectivity
- Strings not created in dashboard
- Verify API token in dashboard
- Check internet permission in manifest
- Ensure strings exist for your app
Device ID changes on each launch
Device ID changes on each launch
Cause: Using non-persistent ID or regenerating UUIDSolution:
- Use default SDK-generated UUID (it persists automatically)
- If using custom ID, store it in SharedPreferences
- Donβt generate new UUID on each launch
Next Steps
Now that setup is complete, learn how to use the three core features:Dynamic Strings
Update app copy without releases
Translations
Multi-language support and switching
A/B Testing
Run experiments to optimize messaging
Additional Resources
Best Practices
Production-ready patterns
Advanced Usage
FAQ management, caching, optimization
Core Concepts
Architecture and offline behavior
Troubleshooting
Common issues and solutions
Questions? Contact [email protected]