linkrunner
The Linkrunner Android SDK provides native integration for Linkrunner functionality in Android applications.
Features
Easy initialization and setup
User management and tracking
Payment tracking and management
Event tracking
Deeplink handling
Installation
dependencies {
implementation 'io.linkrunner:android-sdk:1.0.0'
}Measuring LinkRunner SDK Size Impact
Quick Size Overview
Download Size: 123KB (AAR file)
Estimated APK Impact: 30-80KB (varies by app configuration)
Method Count: ~300 methods
How to Measure SDK Size Impact in Your App
Method 1: Before/After APK Comparison (Simplest)
Measure Base APK Size:
# Build your app WITHOUT LinkRunner SDK
./gradlew assembleRelease
# Note the size
ls -lh app/build/outputs/apk/release/app-release.apkContent copied to clipboardAdd LinkRunner SDK:
// In app/build.gradle
dependencies {
implementation 'io.linkrunner:android-sdk:2.1.5'
}Content copied to clipboardMeasure New APK Size:
./gradlew clean assembleRelease
ls -lh app/build/outputs/apk/release/app-release.apkContent copied to clipboardCalculate Impact:
SDK Impact = New APK Size - Original APK Size
Method 2: Using Android Studio APK Analyzer
Open Android Studio
Analyze Base APK:
Build your app without SDK
Go to
Build > Analyze APKSelect your APK
Note total size and DEX size
Analyze With SDK:
Add LinkRunner SDK
Build again
Analyze new APK
Compare sizes
Look for
io.linkrunnerin DEX filesKey Metrics to Check:
Total APK size difference
DEX file size increase
Number of methods added
New dependencies introduced
Method 3: Using Gradle Build Analysis
Add this to your app's build.gradle:
android {
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
// Add at the end of the file
tasks.register("apkSizeReport") {
doLast {
def apkDir = new File("${project.buildDir}/outputs/apk/release")
apkDir.listFiles().each { file ->
if (file.name.endsWith('.apk')) {
println "APK: ${file.name}"
println "Size: ${file.length() / 1024 / 1024} MB"
}
}
}
}Then run:
./gradlew clean assembleRelease apkSizeReportSize Optimization Tips
Enable R8/ProGuard:
android {
buildTypes {
release {
minifyEnabled true
shrinkResources true
}
}
}Content copied to clipboardAdd ProGuard Rules:
# Add to proguard-rules.pro
-keep class io.linkrunner.sdk.** { *; }Content copied to clipboardEnable ABI Filters if you don't need all architectures:
android {
defaultConfig {
ndk {
abiFilters 'armeabi-v7a', 'arm64-v8a'
}
}
}Content copied to clipboard
Expected Size Impact
| Minimal | ~30KB | - ProGuard enabled - App already uses similar dependencies - ABI filtering enabled |
| Average | ~50KB | - ProGuard enabled - Some shared dependencies - Default configuration |
| Maximum | ~80KB | - ProGuard disabled - No shared dependencies - All ABIs included |
Dependency Size Breakdown
Our SDK uses these major dependencies:
Retrofit + OkHttp: ~150-200KB
Coroutines: ~100-150KB
Koin: ~50KB
Play Services: ~100KB
Note: If your app already uses these dependencies, they won't add to the final APK size.
Troubleshooting Size Issues
If you see unexpectedly large size increases:
Check Dependency Conflicts:
./gradlew app:dependenciesContent copied to clipboardAnalyze DEX Content:
Use Android Studio's APK Analyzer
Look for duplicate classes
Check if R8/ProGuard is working correctly
Enable Detailed Build Reports:
android {
buildTypes {
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}Content copied to clipboard
Need Help?
If you're seeing unexpected size impacts or need help optimizing, please:
Open an issue on our GitHub repository
Include your build configuration
Share the size analysis results
List any optimization steps you've tried
We're committed to helping you maintain an optimal app size while using our SDK.