admanagekit-mcp-server 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/content/README.md +851 -0
- package/content/docs/AD_FREQUENCY_CONTROL.md +450 -0
- package/content/docs/AD_LOADING_STRATEGIES.md +369 -0
- package/content/docs/API_REFERENCE.md +734 -0
- package/content/docs/APP_PURCHASE_GUIDE.md +704 -0
- package/content/docs/BANNER_AD_IMPROVEMENTS.md +325 -0
- package/content/docs/COMPOSE_INTEGRATION.md +477 -0
- package/content/docs/CONFIGURATION_USAGE.md +168 -0
- package/content/docs/INTERSTITIAL_BUILDER_GUIDE.md +518 -0
- package/content/docs/JAVA_USAGE_GUIDE.md +785 -0
- package/content/docs/LOADING_STRATEGY_EXAMPLES.md +463 -0
- package/content/docs/NATIVE_AD_MANAGER_ENHANCEMENTS.md +347 -0
- package/content/docs/NATIVE_AD_PRELOADING.md +467 -0
- package/content/docs/NATIVE_TEMPLATE_VIEW.md +413 -0
- package/content/docs/app-open-ads.md +412 -0
- package/content/docs/interstitial-ads.md +269 -0
- package/content/docs/native-ads-caching.md +182 -0
- package/content/docs/release-notes/RELEASE_NOTES_v2.1.0.md +156 -0
- package/content/docs/release-notes/RELEASE_NOTES_v2.2.0.md +248 -0
- package/content/docs/release-notes/RELEASE_NOTES_v2.3.0.md +280 -0
- package/content/docs/release-notes/RELEASE_NOTES_v2.5.0.md +73 -0
- package/content/docs/release-notes/RELEASE_NOTES_v2.6.0.md +265 -0
- package/content/docs/release-notes/RELEASE_NOTES_v2.7.0.md +168 -0
- package/content/docs/release-notes/RELEASE_NOTES_v2.8.0.md +153 -0
- package/content/docs/release-notes/RELEASE_NOTES_v2.9.0.md +479 -0
- package/content/docs/release-notes/RELEASE_NOTES_v3.0.0.md +343 -0
- package/content/docs/release-notes/RELEASE_NOTES_v3.1.0.md +131 -0
- package/content/docs/release-notes/RELEASE_NOTES_v3.3.0.md +252 -0
- package/content/docs/release-notes/RELEASE_NOTES_v3.3.2.md +215 -0
- package/content/docs/release-notes/RELEASE_NOTES_v3.3.3.md +116 -0
- package/content/docs/release-notes/RELEASE_NOTES_v3.3.4.md +142 -0
- package/content/docs/release-notes/RELEASE_NOTES_v3.3.5.md +94 -0
- package/content/docs/rewarded-ads.md +623 -0
- package/content/wiki/Ad-Loading-Strategies.md +209 -0
- package/content/wiki/App-Open-Ads.md +189 -0
- package/content/wiki/Banner-Ads.md +133 -0
- package/content/wiki/Billing-Integration.md +69 -0
- package/content/wiki/Configuration.md +252 -0
- package/content/wiki/Consumable-Products.md +166 -0
- package/content/wiki/Home.md +144 -0
- package/content/wiki/Interstitial-Ads.md +313 -0
- package/content/wiki/Jetpack-Compose.md +270 -0
- package/content/wiki/NativeAdManager.md +220 -0
- package/content/wiki/Purchase-Categories.md +94 -0
- package/content/wiki/Rewarded-Ads.md +420 -0
- package/content/wiki/Subscription-Upgrades.md +278 -0
- package/content/wiki/Subscriptions.md +368 -0
- package/content/wiki/_Footer.md +3 -0
- package/content/wiki/_Sidebar.md +18 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -0
- package/dist/server.d.ts +1 -0
- package/dist/server.js +18 -0
- package/dist/server.js.map +1 -0
- package/dist/tools/code-generation.d.ts +2 -0
- package/dist/tools/code-generation.js +264 -0
- package/dist/tools/code-generation.js.map +1 -0
- package/dist/tools/documentation.d.ts +2 -0
- package/dist/tools/documentation.js +202 -0
- package/dist/tools/documentation.js.map +1 -0
- package/dist/types.d.ts +18 -0
- package/dist/types.js +83 -0
- package/dist/types.js.map +1 -0
- package/dist/utils/doc-loader.d.ts +17 -0
- package/dist/utils/doc-loader.js +245 -0
- package/dist/utils/doc-loader.js.map +1 -0
- package/dist/utils/search.d.ts +2 -0
- package/dist/utils/search.js +62 -0
- package/dist/utils/search.js.map +1 -0
- package/dist/utils/templates.d.ts +60 -0
- package/dist/utils/templates.js +793 -0
- package/dist/utils/templates.js.map +1 -0
- package/package.json +51 -0
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
# Release Notes - v3.3.4
|
|
2
|
+
|
|
3
|
+
## Highlights
|
|
4
|
+
|
|
5
|
+
- **Subscription Expiry Verification**: Server-side verification API to get accurate subscription expiry dates
|
|
6
|
+
- **Expiry Time Methods**: New methods to check remaining days, formatted expiry dates, and expiration status
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## New Features
|
|
11
|
+
|
|
12
|
+
### Subscription Expiry Verification
|
|
13
|
+
|
|
14
|
+
Google Play Billing Library does NOT provide subscription expiry dates client-side. This release adds a server-side verification API to get accurate expiry information.
|
|
15
|
+
|
|
16
|
+
#### Setting Up Verification Callback
|
|
17
|
+
|
|
18
|
+
```kotlin
|
|
19
|
+
// In Application.onCreate()
|
|
20
|
+
AppPurchase.getInstance().setSubscriptionVerificationCallback { packageName, subscriptionId, purchaseToken, listener ->
|
|
21
|
+
// Call your backend API
|
|
22
|
+
yourApi.verifySubscription(packageName, subscriptionId, purchaseToken,
|
|
23
|
+
onSuccess = { expiryTimeMillis ->
|
|
24
|
+
val details = SubscriptionVerificationCallback.SubscriptionDetails.Builder()
|
|
25
|
+
.setExpiryTimeMillis(expiryTimeMillis)
|
|
26
|
+
.setAutoRenewing(true)
|
|
27
|
+
.build()
|
|
28
|
+
listener.onVerified(details)
|
|
29
|
+
},
|
|
30
|
+
onError = { error ->
|
|
31
|
+
listener.onVerificationFailed(error)
|
|
32
|
+
}
|
|
33
|
+
)
|
|
34
|
+
}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
#### Verifying Subscriptions
|
|
38
|
+
|
|
39
|
+
```kotlin
|
|
40
|
+
// Verify single subscription
|
|
41
|
+
AppPurchase.getInstance().verifySubscription("premium_monthly",
|
|
42
|
+
object : AppPurchase.SubscriptionVerificationListener {
|
|
43
|
+
override fun onVerified(subscription: PurchaseResult) {
|
|
44
|
+
val expiryDate = subscription.getExpiryTimeFormatted("dd MMM yyyy")
|
|
45
|
+
val daysLeft = subscription.getRemainingDays()
|
|
46
|
+
val isExpired = subscription.isExpired()
|
|
47
|
+
}
|
|
48
|
+
override fun onVerificationFailed(errorMessage: String?) { }
|
|
49
|
+
}
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
// Verify all active subscriptions
|
|
53
|
+
AppPurchase.getInstance().verifyAllSubscriptions(listener)
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
#### Accessing Expiry Data
|
|
57
|
+
|
|
58
|
+
After verification, expiry data is cached and accessible:
|
|
59
|
+
|
|
60
|
+
```kotlin
|
|
61
|
+
// Via AppPurchase
|
|
62
|
+
val expiryMillis = AppPurchase.getInstance().getSubscriptionExpiryTime("premium_monthly")
|
|
63
|
+
val expiryFormatted = AppPurchase.getInstance().getSubscriptionExpiryTimeFormatted("premium_monthly")
|
|
64
|
+
val daysLeft = AppPurchase.getInstance().getSubscriptionRemainingDays("premium_monthly")
|
|
65
|
+
val isExpired = AppPurchase.getInstance().isSubscriptionExpired("premium_monthly")
|
|
66
|
+
|
|
67
|
+
// Via PurchaseResult
|
|
68
|
+
val subscription = AppPurchase.getInstance().getSubscription("premium_monthly")
|
|
69
|
+
if (subscription?.isExpiryVerified() == true) {
|
|
70
|
+
val expiryDate = subscription.getExpiryDate() // Date object
|
|
71
|
+
val remainingTime = subscription.getRemainingTime() // Milliseconds
|
|
72
|
+
val remainingDays = subscription.getRemainingDays() // Days
|
|
73
|
+
}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### New PurchaseResult Methods
|
|
77
|
+
|
|
78
|
+
| Method | Return Type | Description |
|
|
79
|
+
|--------|-------------|-------------|
|
|
80
|
+
| `getExpiryTime()` | `Long` | Expiry time in milliseconds |
|
|
81
|
+
| `getExpiryDate()` | `Date?` | Expiry as Date object |
|
|
82
|
+
| `getExpiryTimeFormatted()` | `String` | Formatted expiry date |
|
|
83
|
+
| `getExpiryTimeFormatted(pattern)` | `String` | Custom format pattern |
|
|
84
|
+
| `isExpiryVerified()` | `Boolean` | Whether expiry has been verified |
|
|
85
|
+
| `isExpired()` | `Boolean` | Whether subscription has expired |
|
|
86
|
+
| `getRemainingTime()` | `Long` | Milliseconds until expiry |
|
|
87
|
+
| `getRemainingDays()` | `Int` | Days until expiry |
|
|
88
|
+
|
|
89
|
+
### New AppPurchase Methods
|
|
90
|
+
|
|
91
|
+
| Method | Description |
|
|
92
|
+
|--------|-------------|
|
|
93
|
+
| `setSubscriptionVerificationCallback()` | Set callback for server verification |
|
|
94
|
+
| `verifySubscription(id, listener)` | Verify single subscription |
|
|
95
|
+
| `verifyAllSubscriptions(listener)` | Verify all active subscriptions |
|
|
96
|
+
| `getSubscriptionExpiryTime(id)` | Get expiry time in milliseconds |
|
|
97
|
+
| `getSubscriptionExpiryTimeFormatted(id)` | Get formatted expiry date |
|
|
98
|
+
| `getSubscriptionRemainingDays(id)` | Get remaining days |
|
|
99
|
+
| `isSubscriptionExpired(id)` | Check if subscription expired |
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
## Backend Implementation
|
|
104
|
+
|
|
105
|
+
Your backend should call Google Play Developer API:
|
|
106
|
+
|
|
107
|
+
```
|
|
108
|
+
GET https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/purchases/subscriptionsv2/tokens/{purchaseToken}
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Response includes:
|
|
112
|
+
- `expiryTime` - RFC 3339 timestamp
|
|
113
|
+
- `subscriptionState` - ACTIVE, CANCELED, IN_GRACE_PERIOD, ON_HOLD, PAUSED, EXPIRED
|
|
114
|
+
- `linkedPurchaseToken` - For upgrade/downgrade tracking
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
## Migration Guide
|
|
119
|
+
|
|
120
|
+
### From v3.3.3 to v3.3.4
|
|
121
|
+
|
|
122
|
+
This is a **backward-compatible** release. No code changes required.
|
|
123
|
+
|
|
124
|
+
**Optional**: To use subscription expiry verification:
|
|
125
|
+
|
|
126
|
+
1. Implement `SubscriptionVerificationCallback` with your backend API
|
|
127
|
+
2. Call `verifySubscription()` or `verifyAllSubscriptions()` after billing initialization
|
|
128
|
+
3. Access expiry data via `PurchaseResult` or `AppPurchase` helper methods
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
## Full Changelog
|
|
133
|
+
|
|
134
|
+
### New Features
|
|
135
|
+
- Added `SubscriptionVerificationCallback` interface for server-side verification
|
|
136
|
+
- Added expiry time fields and methods to `PurchaseResult`
|
|
137
|
+
- Added `verifySubscription()` and `verifyAllSubscriptions()` to `AppPurchase`
|
|
138
|
+
- Added expiry helper methods: `getSubscriptionExpiryTime()`, `getSubscriptionRemainingDays()`, etc.
|
|
139
|
+
|
|
140
|
+
### Documentation
|
|
141
|
+
- Updated wiki/Subscriptions.md with expiry verification guide
|
|
142
|
+
- Updated docs/APP_PURCHASE_GUIDE.md with verification section
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# Release Notes - v3.3.5
|
|
2
|
+
|
|
3
|
+
**Release Date**: January 2025
|
|
4
|
+
|
|
5
|
+
## App Open Loading Strategies
|
|
6
|
+
|
|
7
|
+
This release brings full loading strategy support to AppOpenManager, aligning it with the existing interstitial and native ad loading patterns.
|
|
8
|
+
|
|
9
|
+
### New Features
|
|
10
|
+
|
|
11
|
+
#### Loading Strategy Support
|
|
12
|
+
AppOpenManager now properly uses `AdManageKitConfig.appOpenLoadingStrategy`:
|
|
13
|
+
|
|
14
|
+
- **ON_DEMAND**: Fetches fresh ad with welcome dialog. Uses cached ad if still fresh (within `appOpenAdFreshnessThreshold`).
|
|
15
|
+
- **ONLY_CACHE**: Only shows cached ads instantly. Silently loads new ad in background if unavailable.
|
|
16
|
+
- **HYBRID**: Shows cached if available, fetches with welcome dialog otherwise (recommended).
|
|
17
|
+
|
|
18
|
+
```kotlin
|
|
19
|
+
AdManageKitConfig.apply {
|
|
20
|
+
appOpenLoadingStrategy = AdLoadingStrategy.HYBRID // default
|
|
21
|
+
}
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
#### Ad Freshness Tracking
|
|
25
|
+
Cached ads now track when they were loaded to prevent showing stale content:
|
|
26
|
+
|
|
27
|
+
```kotlin
|
|
28
|
+
// Configure freshness threshold (default: 4 hours per Google recommendation)
|
|
29
|
+
AdManageKitConfig.appOpenAdFreshnessThreshold = 4.hours
|
|
30
|
+
|
|
31
|
+
// Check cached ad age
|
|
32
|
+
val ageMs = appOpenManager.getCachedAdAgeMs()
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
#### Auto-Reload Configuration
|
|
36
|
+
Control whether ads automatically reload after being dismissed:
|
|
37
|
+
|
|
38
|
+
```kotlin
|
|
39
|
+
AdManageKitConfig.appOpenAutoReload = true // default: true
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Bug Fixes
|
|
43
|
+
|
|
44
|
+
- **Fixed auto-reload after ad dismissal**: Previously, `fetchAd()` was not being called after ad dismissal. Now properly reloads based on `appOpenAutoReload` setting.
|
|
45
|
+
- **Fixed wasted ads**: ON_DEMAND strategy now checks if cached ad is still fresh before discarding it and fetching a new one.
|
|
46
|
+
|
|
47
|
+
### Deprecations
|
|
48
|
+
|
|
49
|
+
- **`appOpenFetchFreshAd`**: Deprecated in favor of `appOpenLoadingStrategy`
|
|
50
|
+
- `appOpenFetchFreshAd = true` → `appOpenLoadingStrategy = AdLoadingStrategy.ON_DEMAND`
|
|
51
|
+
- `appOpenFetchFreshAd = false` → `appOpenLoadingStrategy = AdLoadingStrategy.HYBRID`
|
|
52
|
+
|
|
53
|
+
### Migration
|
|
54
|
+
|
|
55
|
+
If you were using `appOpenFetchFreshAd`:
|
|
56
|
+
|
|
57
|
+
```kotlin
|
|
58
|
+
// Before (deprecated)
|
|
59
|
+
AdManageKitConfig.appOpenFetchFreshAd = true
|
|
60
|
+
|
|
61
|
+
// After
|
|
62
|
+
AdManageKitConfig.appOpenLoadingStrategy = AdLoadingStrategy.ON_DEMAND
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### API Changes
|
|
66
|
+
|
|
67
|
+
#### New Methods in AppOpenManager
|
|
68
|
+
- `getCachedAdAgeMs(): Long` - Returns age of cached ad in milliseconds
|
|
69
|
+
|
|
70
|
+
#### New Config Options in AdManageKitConfig
|
|
71
|
+
- `appOpenAdFreshnessThreshold: Duration` - Max age for "fresh" cached ad (default: 4 hours)
|
|
72
|
+
- `appOpenAutoReload: Boolean` - Auto-reload after dismissal (default: true)
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## Installation
|
|
77
|
+
|
|
78
|
+
```groovy
|
|
79
|
+
implementation 'com.github.i2hammad.AdManageKit:ad-manage-kit:v3.3.5'
|
|
80
|
+
implementation 'com.github.i2hammad.AdManageKit:ad-manage-kit-billing:v3.3.5'
|
|
81
|
+
implementation 'com.github.i2hammad.AdManageKit:ad-manage-kit-core:v3.3.5'
|
|
82
|
+
implementation 'com.github.i2hammad.AdManageKit:ad-manage-kit-compose:v3.3.5'
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Full Changelog
|
|
86
|
+
|
|
87
|
+
- Full `AdLoadingStrategy` support for AppOpenManager
|
|
88
|
+
- Ad freshness tracking with `adLoadTime` and `appOpenAdFreshnessThreshold`
|
|
89
|
+
- Auto-reload configuration with `appOpenAutoReload`
|
|
90
|
+
- Deprecated `appOpenFetchFreshAd` in favor of `appOpenLoadingStrategy`
|
|
91
|
+
- Fixed auto-reload after ad dismissal
|
|
92
|
+
- Fixed wasted ads when using ON_DEMAND strategy
|
|
93
|
+
- Added `getCachedAdAgeMs()` method
|
|
94
|
+
- Updated documentation for app open ads
|