Skip to content

Commit

Permalink
Syncing changes from private repository
Browse files Browse the repository at this point in the history
  • Loading branch information
helium-service committed Aug 8, 2024
1 parent 1cfdbb7 commit 6e391b9
Show file tree
Hide file tree
Showing 44 changed files with 1,121 additions and 907 deletions.
Binary file added Android~/src/.DS_Store
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,47 +1,37 @@
package com.chartboost.mediation.unity.aps

import android.content.Context
import com.chartboost.mediation.amazonpublisherservicesadapter.AmazonPublisherServicesAdapter
import kotlin.coroutines.resume
import kotlin.coroutines.suspendCoroutine

class APSBridge {

companion object {

private var preBiddingListener: AmazonPublisherServicesAdapter.PreBiddingListener? = null

@JvmStatic
fun setupPreBiddingListener(consumer: APSPreBidConsumer){
preBiddingListener = object : AmazonPublisherServicesAdapter.PreBiddingListener {
override suspend fun onPreBid(context: Context, request: AmazonPublisherServicesAdapter.AmazonPublisherServicesAdapterPreBidRequest): Result<AmazonPublisherServicesAdapter.AmazonPublisherServicesAdapterPreBidAdInfo> {
return suspendCoroutine { continuation ->
consumer.onPreBid(request, object: APSPreBidCompletion {
override fun completion(preBidAdInfo: AmazonPublisherServicesAdapter.AmazonPublisherServicesAdapterPreBidAdInfo) {
continuation.resume(Result.success(preBidAdInfo))
}
})
}
}
}
AmazonPublisherServicesAdapter.preBiddingListener = preBiddingListener;
}

@JvmStatic
fun removePreBiddingListener()
{
preBiddingListener = null;
AmazonPublisherServicesAdapter.preBiddingListener = null;
}

@JvmStatic
fun setTestMode(testMode: Boolean){
AmazonPublisherServicesAdapter.testMode = testMode;
}

@JvmStatic
fun getTestMode(): Boolean {
return AmazonPublisherServicesAdapter.testMode;
}
}
}
package com.chartboost.mediation.unity.adapter.aps

import android.content.Context
import com.chartboost.mediation.amazonpublisherservicesadapter.AmazonPublisherServicesAdapter
import kotlin.coroutines.resume
import kotlin.coroutines.suspendCoroutine

class APSBridge {

companion object {

private var preBiddingListener: AmazonPublisherServicesAdapter.PreBiddingListener? = null

@JvmStatic
fun setupPreBiddingListener(consumer: APSPreBidConsumer){
preBiddingListener = object : AmazonPublisherServicesAdapter.PreBiddingListener {
override suspend fun onPreBid(context: Context, request: AmazonPublisherServicesAdapter.AmazonPublisherServicesAdapterPreBidRequest): Result<AmazonPublisherServicesAdapter.AmazonPublisherServicesAdapterPreBidAdInfo> {
return suspendCoroutine { continuation ->
consumer.onPreBid(request, object: APSPreBidCompletion {
override fun completion(preBidAdInfo: AmazonPublisherServicesAdapter.AmazonPublisherServicesAdapterPreBidAdInfo) {
continuation.resume(Result.success(preBidAdInfo))
}
})
}
}
}
AmazonPublisherServicesAdapter.preBiddingListener = preBiddingListener;
}

@JvmStatic
fun removePreBiddingListener()
{
preBiddingListener = null;
AmazonPublisherServicesAdapter.preBiddingListener = null;
}
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.chartboost.mediation.unity.aps
package com.chartboost.mediation.unity.adapter.aps

import com.chartboost.mediation.amazonpublisherservicesadapter.AmazonPublisherServicesAdapter

interface APSPreBidCompletion {
fun completion(preBidAdInfo: AmazonPublisherServicesAdapter.AmazonPublisherServicesAdapterPreBidAdInfo)
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package com.chartboost.mediation.unity.aps
package com.chartboost.mediation.unity.adapter.aps

import com.chartboost.mediation.amazonpublisherservicesadapter.AmazonPublisherServicesAdapter
import com.chartboost.mediation.unity.aps.APSPreBidCompletion

interface APSPreBidConsumer {
fun onPreBid(request: AmazonPublisherServicesAdapter.AmazonPublisherServicesAdapterPreBidRequest, completion: APSPreBidCompletion)
}
3 changes: 0 additions & 3 deletions Android~/src/main/AndroidManifest.xml

This file was deleted.

66 changes: 41 additions & 25 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,41 @@
# Changelog
All notable changes to this project will be documented in this file using the standards as defined at [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0).

### Version 4.0.1 *(20204-03-27)*
Bug Fixes:

- Added `<androidPackage spec="com.iabtcf:iabtcf-decoder:2.0.10"/>` to `AmazonPublisherServicesAdapterDependencies.xml`

### Version 4.0.0 *(2024-03-21)*
First version of the Chartboost Mediation Unity SDK - Amazon Publisher Services Adapter.

This package requires the APS Unity Plugin to be integrated in the project in order to be used.

New:

- Added `AmazonPublisherServicesAdapter` class.
- Added `TestMode` mode to setup APS test mode.
- Added `VerboseLogging` to modify adapter logging leve.
- Added `PreBiddingListener` class and property to handle publisher based pre-bidding.
- Added `AmazonSettings` struct to pass required data to the Chartboost Mediation SDK.

Compatible with the following native Android and iOS SDK Versions:

* Android: Amazon Publisher Services `com.amazon.android:aps-sdk:9.9.+`
* iOS: `AmazonPublisherServicesSDK ~> 4.8.0`
# Changelog
All notable changes to this project will be documented in this file using the standards as defined at [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0).

### Version 5.0.0 *(2024-08-08)*

#Added
- Support for the following 'Amazon Publisher Services' dependencies. Notice adapter dependencies are optimistic and any patches and hot-fixes will be automatically picked up.:
* Android: `com.chartboost:chartboost-mediation-adapter-amazon-publisher-services:5.9.10.+`
* iOS: `ChartboostMediationAdapterAmazonPublisherServices ~> ~> 5.4.9.0`

- The following properties have been added in `AmazonPublisherServicesAdapter.cs`
* `string AdapterUnityVersion`
* `string AdapterNativeVersion`
* `string PartnerSDKVersion`
* `string PartnerIdentifier`
* `string PartnerDisplayName`
* `bool TestMode`
* `bool VerboseLogging`

### Version 4.0.1 *(2024-03-27)*
Bug Fixes:

- Added `<androidPackage spec="com.iabtcf:iabtcf-decoder:2.0.10"/>` to `AmazonPublisherServicesAdapterDependencies.xml`

### Version 4.0.0 *(2024-03-21)*
First version of the Chartboost Mediation Unity SDK - Amazon Publisher Services Adapter.

This package requires the APS Unity Plugin to be integrated in the project in order to be used.

New:

- Added `AmazonPublisherServicesAdapter` class.
- Added `TestMode` mode to setup APS test mode.
- Added `VerboseLogging` to modify adapter logging leve.
- Added `PreBiddingListener` class and property to handle publisher based pre-bidding.
- Added `AmazonSettings` struct to pass required data to the Chartboost Mediation SDK.

Compatible with the following native Android and iOS SDK Versions:

* Android: Amazon Publisher Services `com.amazon.android:aps-sdk:9.9.+`
* iOS: `AmazonPublisherServicesSDK ~> 4.8.0`
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<package>
<metadata>
<id>Chartboost.CSharp.Mediation.Unity.Adapter.AmazonPublisherServices</id>
<version>4.0.1</version>
<title>Chartboost Mediation - Amazon Publisher Services Adapter</title>
<description>The Chartboost Mediation Unity SDK Amazon Publisher Services Ad Adapter.</description>
<authors>Chartboost</authors>
<owners>Chartboost</owners>
<license type="file">LICENSE.md</license>
<readme>README.md</readme>
<projectUrl>https://www.chartboost.com/mediate</projectUrl>
<copyright>Copyright 2024</copyright>
<tags>Chartboost, Ads, Mediation, Unity, AmazonPublisherServices, Adapter,cs</tags>
<repository type="git" url="https://github.com/ChartBoost/chartboost-mediation-unity-adapter-amazon-publisher-services"/>
<dependencies>
<dependency id="Chartboost.CSharp.Mediation.Unity" version="4.9.0" />
<dependency id="Chartboost.CSharp.Threading.Unity" version="1.0.0" />
<dependency id="Chartboost.CSharp.Utilities.Unity" version="1.0.0" />
</dependencies>
</metadata>
</package>
<?xml version="1.0" encoding="utf-8"?>
<package>
<metadata>
<id>Chartboost.CSharp.Mediation.Unity.Adapter.AmazonPublisherServices</id>
<version>5.0.0</version>
<title>Chartboost Mediation Adapter - Amazon Publisher Services Adapter</title>
<description>The Chartboost Mediation Unity SDK Ad Adapter for Amazon Publisher Services.</description>
<authors>Chartboost</authors>
<owners>Chartboost</owners>
<license type="file">LICENSE.md</license>
<readme>README.md</readme>
<projectUrl>https://www.chartboost.com/mediate</projectUrl>
<copyright>Copyright 2024</copyright>
<tags>Chartboost, Ads, Mediation, Unity, Adapter, AmazonPublisherServices, cs</tags>
<repository type="git" url="https://github.com/ChartBoost/chartboost-mediation-unity-adapter-amazon-publisher-services"/>
<dependencies>
<dependency id="Chartboost.CSharp.Mediation.Unity" version="5.0.0" />
<dependency id="Chartboost.CSharp.Threading.Unity" version="1.0.1" />
<dependency id="Chartboost.CSharp.Utilities.Unity" version="1.0.1" />
<dependency id="Chartboost.CSharp.Logging.Unity" version="1.0.0" />
</dependencies>
</metadata>
</package>
8 changes: 3 additions & 5 deletions Editor/AmazonPublisherServicesAdapterDependencies.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@
<dependencies>
<androidPackages>
<!-- Android Adapter -->
<androidPackage spec="com.chartboost:chartboost-mediation-adapter-amazon-publisher-services:4.9.9.+"/>
<androidPackage spec="com.chartboost:chartboost-mediation-adapter-amazon-publisher-services:5.9.10.+"/>

<!-- Partner Android SDK Dependencies-->
<androidPackage spec="com.amazon.android:aps-sdk:9.9.+"/>
<androidPackage spec="com.iabtcf:iabtcf-decoder:2.0.10"/>

<repositories>
Expand All @@ -14,13 +13,12 @@
</androidPackages>
<iosPods>
<!-- iOS Adapter -->
<iosPod name="ChartboostMediationAdapterAmazonPublisherServices" version="~> 4.4.8.0"/>
<iosPod name="ChartboostMediationAdapterAmazonPublisherServices" version="~> 5.4.9.0"/>

<!-- Partner iOS SDK-->
<iosPod name="AmazonPublisherServicesSDK" version="~> 4.8.0" addToAllTargets="true"/>
<iosPod name="AmazonPublisherServicesSDK" version="~> 4.9.0" addToAllTargets="true"/>

<!-- Amazon Plugin for iOS-->
<iosPod name="Amazon-SDK-Plugin" minTargetSdk="12.5" path="Assets/Amazon/Plugins/iOS"/>
</iosPods>
</dependencies>

Loading

0 comments on commit 6e391b9

Please sign in to comment.