-
Notifications
You must be signed in to change notification settings - Fork 4
Home
Muhammad Hammad edited this page Jan 21, 2026
·
5 revisions
AdManageKit is a comprehensive Android library designed to simplify the integration and management of Google AdMob ads, Google Play Billing, and User Messaging Platform (UMP) consent.
Latest Version: 2.8.0
-
Loading Strategy for AdManager:
forceShowInterstitial()now respects global loading strategy -
Global Auto-Reload Config: New
interstitialAutoReloadsetting with per-call override -
New Method:
forceShowInterstitialAlways()for explicit force fetch behavior
- Banner Ads: Auto-refresh, collapsible banners, smart retry
- Native Ads: Small, Medium, Large formats with caching
- Interstitial Ads: Time/count-based triggers, dialog support, loading strategies
- App Open Ads: Lifecycle-aware with activity exclusion
- 17 Template Styles: card_modern, material3, minimal, list_item, magazine, video templates
- XML & Programmatic: Set templates via
app:adTemplateorsetTemplate() - Material 3 Theming: Automatic dark/light mode support
- ON_DEMAND: Fetch fresh ads with loading dialog
- ONLY_CACHE: Instant display from cache
- HYBRID: Cache-first with fallback fetch (recommended)
- AdManageKitConfig: Single configuration point
- Environment-specific settings (debug vs production)
- Runtime configuration changes
- Smart retry with exponential backoff
- Circuit breaker for failing ad units
- Memory leak prevention with WeakReference
- UMP consent management (GDPR/CCPA)
- Automatic ad hiding for purchased users
Step 1: Add JitPack to your root build.gradle:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
}Step 2: Add dependencies to your app's build.gradle:
implementation 'com.github.i2hammad.AdManageKit:ad-manage-kit:v2.8.0'
implementation 'com.github.i2hammad.AdManageKit:ad-manage-kit-billing:v2.8.0'
implementation 'com.github.i2hammad.AdManageKit:ad-manage-kit-core:v2.8.0'
// For Jetpack Compose support
implementation 'com.github.i2hammad.AdManageKit:ad-manage-kit-compose:v2.8.0'Step 3: Sync your project with Gradle.
Configure AdManageKit in your Application class:
class MyApp : Application() {
private lateinit var appOpenManager: AppOpenManager
override fun onCreate() {
super.onCreate()
// Configure AdManageKit
AdManageKitConfig.apply {
debugMode = BuildConfig.DEBUG
enableSmartPreloading = true
autoRetryFailedAds = true
// Ad Loading Strategies
interstitialLoadingStrategy = AdLoadingStrategy.HYBRID
appOpenLoadingStrategy = AdLoadingStrategy.HYBRID
nativeLoadingStrategy = AdLoadingStrategy.HYBRID
// Auto-reload interstitial after showing
interstitialAutoReload = true // default: true
}
// Set up billing
BillingConfig.setPurchaseProvider(BillingPurchaseProvider())
// Initialize app open ads
appOpenManager = AppOpenManager(this, "your-app-open-ad-unit-id")
}
}- Interstitial Ads - Complete guide to interstitial ad integration
- Rewarded Ads - Rewarded video ads with callbacks and analytics
- App Open Ads - App open ad implementation
- Native Ads - Native ad caching and NativeTemplateView
- Banner Ads - Banner ad integration
- Ad Loading Strategies - ON_DEMAND, ONLY_CACHE, HYBRID strategies
- Configuration - Complete AdManageKitConfig reference
- Jetpack Compose - Compose integration and helpers
The app module demonstrates all features. To run:
- Clone:
git clone https://github.com/i2hammad/AdManageKit.git - Open in Android Studio
- Replace placeholder AdMob IDs
- Run on device or emulator
For issues: GitHub Issues or hammadmughal0001@gmail.com
Licensed under the MIT License. See LICENSE.
AdManageKit v3.3.4 | GitHub | API Docs | Report Issue | Buy me a coffee