Skip to content

Commit

Permalink
[HB-7187] Update AppLovin adapter to perform setUp on IO instead …
Browse files Browse the repository at this point in the history
…of `Main` (#63)

* [HB-7187] Update AppLovin adapter to perform `setUp` on `IO` instead of `MAIN`

* Use IO actually on `setUp`
  • Loading branch information
bwised authored Feb 22, 2024
1 parent 813bbed commit 5201d73
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion AppLovinAdapter/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ android {
minSdk = 21
targetSdk = 33
// If you touch the following line, don't forget to update scripts/get_rc_version.zsh
android.defaultConfig.versionName = System.getenv("VERSION_OVERRIDE") ?: "4.12.1.0.0"
android.defaultConfig.versionName = System.getenv("VERSION_OVERRIDE") ?: "4.12.1.0.1"
buildConfigField("String", "CHARTBOOST_MEDIATION_APPLOVIN_ADAPTER_VERSION", "\"${android.defaultConfig.versionName}\"")

consumerProguardFiles("proguard-rules.pro")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,10 @@ class AppLovinAdapter : PartnerAdapter {
override suspend fun setUp(
context: Context,
partnerConfiguration: PartnerConfiguration,
): Result<Unit> {
): Result<Unit> = withContext(IO) {
PartnerLogController.log(SETUP_STARTED)

return suspendCancellableCoroutine { continuation ->
return@withContext suspendCancellableCoroutine { continuation ->
fun resumeOnce(result: Result<Unit>) {
if (continuation.isActive) {
continuation.resume(result)
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
Note the first digit of every adapter version corresponds to the major version of the Chartboost Mediation SDK compatible with that adapter.
Adapters are compatible with any Chartboost Mediation SDK version within that major version.

### 4.12.1.0.1
- This version of the adapter has been certified with AppLovin SDK 12.1.0 and performs initialization on `IO` to help reduce potential ANR issues.

### 4.12.1.0.0
- This version of the adapter has been certified with AppLovin SDK 12.1.0.

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The Chartboost Mediation AppLovin adapter mediates AppLovin via the Chartboost M

In your `build.gradle`, add the following entry:
```
implementation "com.chartboost:chartboost-mediation-adapter-applovin:4.12.1.0.0"
implementation "com.chartboost:chartboost-mediation-adapter-applovin:4.12.1.0.1"
```

## Contributions
Expand Down

0 comments on commit 5201d73

Please sign in to comment.