com.chartboost.mediation.unity.adapter.vungle 5.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/CHANGELOG.md +26 -0
- package/CHANGELOG.md.meta +7 -0
- package/Chartboost.CSharp.Mediation.Unity.Adapter.Vungle.nuspec +23 -0
- package/Chartboost.CSharp.Mediation.Unity.Adapter.Vungle.nuspec.meta +7 -0
- package/Editor/VungleAdapterDependencies.xml +14 -0
- package/Editor/VungleAdapterDependencies.xml.meta +7 -0
- package/Editor.meta +8 -0
- package/LICENSE.md +9 -0
- package/LICENSE.md.meta +7 -0
- package/README.md +115 -0
- package/README.md.meta +7 -0
- package/Runtime/Android/AssemblyInfo.cs +3 -0
- package/Runtime/Android/AssemblyInfo.cs.meta +3 -0
- package/Runtime/Android/Chartboost.Mediation.Vungle.Android.asmdef +26 -0
- package/Runtime/Android/Chartboost.Mediation.Vungle.Android.asmdef.meta +7 -0
- package/Runtime/Android/VungleAdapter.cs +131 -0
- package/Runtime/Android/VungleAdapter.cs.meta +11 -0
- package/Runtime/Android.meta +8 -0
- package/Runtime/Vungle/AssemblyInfo.cs +16 -0
- package/Runtime/Vungle/AssemblyInfo.cs.meta +3 -0
- package/Runtime/Vungle/Chartboost.Mediation.Vungle.asmdef +21 -0
- package/Runtime/Vungle/Chartboost.Mediation.Vungle.asmdef.meta +7 -0
- package/Runtime/Vungle/Common/IVungleAdapter.cs +35 -0
- package/Runtime/Vungle/Common/IVungleAdapter.cs.meta +11 -0
- package/Runtime/Vungle/Common/VungleAdOrientation.cs +9 -0
- package/Runtime/Vungle/Common/VungleAdOrientation.cs.meta +3 -0
- package/Runtime/Vungle/Common.meta +8 -0
- package/Runtime/Vungle/Default/VungleDefault.cs +34 -0
- package/Runtime/Vungle/Default/VungleDefault.cs.meta +11 -0
- package/Runtime/Vungle/Default.meta +8 -0
- package/Runtime/Vungle/VungleAdapter.cs +51 -0
- package/Runtime/Vungle/VungleAdapter.cs.meta +11 -0
- package/Runtime/Vungle.meta +8 -0
- package/Runtime/iOS/AssemblyInfo.cs +3 -0
- package/Runtime/iOS/AssemblyInfo.cs.meta +3 -0
- package/Runtime/iOS/Chartboost.Mediation.Vungle.IOS.asmdef +25 -0
- package/Runtime/iOS/Chartboost.Mediation.Vungle.IOS.asmdef.meta +7 -0
- package/Runtime/iOS/Plugins/iOS/CBMVungleUnityBridge.mm +30 -0
- package/Runtime/iOS/Plugins/iOS/CBMVungleUnityBridge.mm.meta +37 -0
- package/Runtime/iOS/Plugins/iOS.meta +8 -0
- package/Runtime/iOS/Plugins.meta +8 -0
- package/Runtime/iOS/VungleAdapter.cs +51 -0
- package/Runtime/iOS/VungleAdapter.cs.meta +11 -0
- package/Runtime/iOS.meta +8 -0
- package/Runtime.meta +8 -0
- package/Tests/Editor/Chartboost.Mediation.Vungle.Tests.Editor.asmdef +26 -0
- package/Tests/Editor/Chartboost.Mediation.Vungle.Tests.Editor.asmdef.meta +7 -0
- package/Tests/Editor/VersionValidator.cs +21 -0
- package/Tests/Editor/VersionValidator.cs.meta +3 -0
- package/Tests/Editor.meta +8 -0
- package/Tests/Runtime/Chartboost.Mediation.Vungle.Tests.Runtime.asmdef +29 -0
- package/Tests/Runtime/Chartboost.Mediation.Vungle.Tests.Runtime.asmdef.meta +7 -0
- package/Tests/Runtime/VungleAdapterTests.cs +82 -0
- package/Tests/Runtime/VungleAdapterTests.cs.meta +11 -0
- package/Tests/Runtime.meta +8 -0
- package/Tests.meta +8 -0
- package/package.json +31 -0
- package/package.json.meta +7 -0
- package/rsync.sh +17 -0
- package/rsync.sh.meta +7 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
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).
|
|
3
|
+
|
|
4
|
+
### Version 5.0.0 *(2024-08-08)*
|
|
5
|
+
|
|
6
|
+
First version of the Chartboost Mediation Unity SDK - Vungle Adapter.
|
|
7
|
+
|
|
8
|
+
#Added
|
|
9
|
+
- Support for the following `Vungle` dependencies. Notice adapter dependencies are optimistic and any patches and hot-fixes will be automatically picked up.:
|
|
10
|
+
* Android: `com.chartboost:chartboost-mediation-adapter-vungle:5.7.4.+`
|
|
11
|
+
* iOS: `ChartboostMediationAdapterVungle ~> 5.7.3.0`
|
|
12
|
+
|
|
13
|
+
- `VungleAdapter.cs` with Configuration Properties for `Vungle`.
|
|
14
|
+
- The following properties have been added in `VungleAdapter.cs`
|
|
15
|
+
* `string AdapterUnityVersion`
|
|
16
|
+
* `string AdapterNativeVersion`
|
|
17
|
+
* `string PartnerSDKVersion`
|
|
18
|
+
* `string PartnerIdentifier`
|
|
19
|
+
* `string PartnerDisplayName`
|
|
20
|
+
* `bool BackButtonImmediatelyEnabled`
|
|
21
|
+
* `VungleAdOrientation? AdOrientation`
|
|
22
|
+
* `bool VerboseLogging`
|
|
23
|
+
|
|
24
|
+
- The following methods have been added in `VungleAdapter.cs`
|
|
25
|
+
* `void SetGDPRStatusOverride(bool gdprStatus)`
|
|
26
|
+
* `void SetCCPAStatusOverride(bool ccpaStatus)`
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<package>
|
|
3
|
+
<metadata>
|
|
4
|
+
<id>Chartboost.CSharp.Mediation.Unity.Adapter.Vungle</id>
|
|
5
|
+
<version>5.0.0</version>
|
|
6
|
+
<title>Chartboost Mediation Adapter - Vungle</title>
|
|
7
|
+
<description>The Chartboost Mediation Unity SDK Adapter for Vungle.</description>
|
|
8
|
+
<authors>Chartboost</authors>
|
|
9
|
+
<owners>Chartboost</owners>
|
|
10
|
+
<license type="file">LICENSE.md</license>
|
|
11
|
+
<readme>README.md</readme>
|
|
12
|
+
<projectUrl>https://www.chartboost.com/products/mediation/</projectUrl>
|
|
13
|
+
<copyright>Copyright 2024</copyright>
|
|
14
|
+
<tags>Chartboost, Ads, Mediation, Unity, Adapter, Vungle, cs</tags>
|
|
15
|
+
<repository type="git" url="https://github.com/ChartBoost/chartboost-mediation-unity-adapter-vungle.git"/>
|
|
16
|
+
<dependencies>
|
|
17
|
+
<dependency id="Chartboost.CSharp.Mediation.Unity" version="5.0.0" />
|
|
18
|
+
<dependency id="Chartboost.CSharp.Threading.Unity" version="1.0.1" />
|
|
19
|
+
<dependency id="Chartboost.CSharp.Utilities.Unity" version="1.0.1" />
|
|
20
|
+
<dependency id="Chartboost.CSharp.Logging.Unity" version="1.0.0" />
|
|
21
|
+
</dependencies>
|
|
22
|
+
</metadata>
|
|
23
|
+
</package>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<dependencies>
|
|
3
|
+
<androidPackages>
|
|
4
|
+
<!-- Android Adapter -->
|
|
5
|
+
<androidPackage spec="com.chartboost:chartboost-mediation-adapter-vungle:5.7.4.+"/>
|
|
6
|
+
</androidPackages>
|
|
7
|
+
<iosPods>
|
|
8
|
+
<!-- iOS Adapter -->
|
|
9
|
+
<iosPod name="ChartboostMediationAdapterVungle" version="~> 5.7.3.0"/>
|
|
10
|
+
|
|
11
|
+
<!-- Partner iOS SDK-->
|
|
12
|
+
<iosPod name="VungleAds" version="~> 7.3.0" addToAllTargets="true"/>
|
|
13
|
+
</iosPods>
|
|
14
|
+
</dependencies>
|
package/Editor.meta
ADDED
package/LICENSE.md
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright 2024 Chartboost Inc.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/LICENSE.md.meta
ADDED
package/README.md
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
# Chartboost Mediation Unity SDK - Vungle Adapter
|
|
2
|
+
|
|
3
|
+
Provides a list of externally configurable properties pertaining to the partner SDK that can be retrieved and set by publishers.
|
|
4
|
+
|
|
5
|
+
Dependencies for the adapter are now embedded in the package, and can be found at `com.chartboost.mediation.unity.adapter.vungle/Editor/VungleAdapterDependencies.xml`.
|
|
6
|
+
|
|
7
|
+
# Installation
|
|
8
|
+
|
|
9
|
+
## Using the public [npm registry](https://www.npmjs.com/search?q=com.chartboost.mediation.unity.adapter.vungle)
|
|
10
|
+
|
|
11
|
+
In order to add the Chartboost Mediation Unity SDK - Vungle Adapter to your project using the npm package, add the following to your Unity Project's ***manifest.json*** file. The scoped registry section is required in order to fetch packages from the NpmJS registry.
|
|
12
|
+
|
|
13
|
+
```json
|
|
14
|
+
"dependencies": {
|
|
15
|
+
"com.chartboost.mediation.unity.adapter.vungle": "5.0.0",
|
|
16
|
+
...
|
|
17
|
+
},
|
|
18
|
+
"scopedRegistries": [
|
|
19
|
+
{
|
|
20
|
+
"name": "NpmJS",
|
|
21
|
+
"url": "https://registry.npmjs.org",
|
|
22
|
+
"scopes": [
|
|
23
|
+
"com.chartboost"
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
]
|
|
27
|
+
```
|
|
28
|
+
## Using the public [NuGet package](https://www.nuget.org/packages/Chartboost.CSharp.Mediation.Unity.Adapter.Vungle)
|
|
29
|
+
|
|
30
|
+
To add the Chartboost Mediation Unity SDK - Vungle Adapter to your project using the NuGet package, you will first need to add the [NugetForUnity](https://github.com/GlitchEnzo/NuGetForUnity) package into your Unity Project.
|
|
31
|
+
|
|
32
|
+
This can be done by adding the following to your Unity Project's ***manifest.json***
|
|
33
|
+
|
|
34
|
+
```json
|
|
35
|
+
"dependencies": {
|
|
36
|
+
"com.github-glitchenzo.nugetforunity": "https://github.com/GlitchEnzo/NuGetForUnity.git?path=/src/NuGetForUnity",
|
|
37
|
+
...
|
|
38
|
+
},
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Once <code>NugetForUnity</code> is installed, search for `Chartboost.CSharp.Mediation.Unity.Adapter.Vungle` in the search bar of Nuget Explorer window(Nuget -> Manage Nuget Packages).
|
|
42
|
+
You should be able to see the `Chartboost.CSharp.Mediation.Unity.Adapter.Vungle` package. Choose the appropriate version and install.
|
|
43
|
+
|
|
44
|
+
# Usage
|
|
45
|
+
The following code block exemplifies usage of the `VungleAdapter.cs` configuration class.
|
|
46
|
+
|
|
47
|
+
## IPartnerAdapterConfiguration Properties
|
|
48
|
+
|
|
49
|
+
```csharp
|
|
50
|
+
|
|
51
|
+
// AdapterUnityVersion - The partner adapter Unity version, e.g: 5.0.0
|
|
52
|
+
Debug.Log($"Adapter Unity Version: {VungleAdapter.AdapterUnityVersion}");
|
|
53
|
+
|
|
54
|
+
// AdapterNativeVersion - The partner adapter version, e.g: 5.12.5.0.0
|
|
55
|
+
Debug.Log($"Adapter Native Version: {VungleAdapter.AdapterNativeVersion}");
|
|
56
|
+
|
|
57
|
+
// PartnerSDKVersion - The partner SDK version, e.g: 12.5.0
|
|
58
|
+
Debug.Log($"Partner SDK Version: {VungleAdapter.PartnerSDKVersion}");
|
|
59
|
+
|
|
60
|
+
// PartnerIdentifier - The partner ID for internal uses, e.g: Vungle
|
|
61
|
+
Debug.Log($"Partner Identifier: {VungleAdapter.PartnerIdentifier}");
|
|
62
|
+
|
|
63
|
+
// PartnerDisplayName - The partner name for external uses, e.g: Vungle
|
|
64
|
+
Debug.Log($"Partner Display Name: {VungleAdapter.PartnerDisplayName}");
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Back Button Inmediately Enabled
|
|
68
|
+
|
|
69
|
+
If the platform supports it, Vungle will check if it has an ad that can be rendered in the specified orientation. This flag can be set at any time and will take effect on the next ad request.
|
|
70
|
+
|
|
71
|
+
```csharp
|
|
72
|
+
// Enabled
|
|
73
|
+
VungleAdapter.BackButtonImmediatelyEnabled = true;
|
|
74
|
+
|
|
75
|
+
// Disabled
|
|
76
|
+
VungleAdapter.BackButtonImmediatelyEnabled = false;
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Ad Orientation
|
|
80
|
+
If the platform supports it, Vungle will check if it has an ad that can be rendered in the specified orientation. This flag can be set at any time and will take effect on the next ad request.
|
|
81
|
+
|
|
82
|
+
```csharp
|
|
83
|
+
// Portrait
|
|
84
|
+
VungleAdapter.AdOrientation = VungleAdOrientation.PORTRAIT;
|
|
85
|
+
|
|
86
|
+
// Landscape
|
|
87
|
+
VungleAdapter.AdOrientation = VungleAdOrientation.LANDSCAPE;
|
|
88
|
+
|
|
89
|
+
// Auto-Rotate
|
|
90
|
+
VungleAdapter.AdOrientation = VungleAdOrientation.AUTO_ROTATE;
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## Set GDPR Status Override
|
|
94
|
+
Use to manually set the GDPR consent status on the Vungle SDK. This is generally unnecessary as the Mediation SDK will set the consent status automatically based on the latest consent info.
|
|
95
|
+
|
|
96
|
+
```csharp
|
|
97
|
+
// Consent
|
|
98
|
+
VungleAdapter.SetGDPRStatusOverride(true);
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
// No Consent
|
|
102
|
+
VungleAdapter.SetGDPRStatusOverride(false);
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## Set CCPA Status Override
|
|
106
|
+
|
|
107
|
+
Use to manually set the CCPA consent status on the Vungle SDK. This is generally unnecessary as the Mediation SDK will set the consent status automatically based on the latest consent info.
|
|
108
|
+
|
|
109
|
+
```csharp
|
|
110
|
+
// Consent
|
|
111
|
+
VungleAdapter.SetCCPAStatusOverride(true);
|
|
112
|
+
|
|
113
|
+
// No Consent
|
|
114
|
+
VungleAdapter.SetCCPAStatusOverride(false);
|
|
115
|
+
```
|
package/README.md.meta
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Chartboost.Mediation.Vungle.Android",
|
|
3
|
+
"rootNamespace": "Chartboost.Mediation.Vungle.Android",
|
|
4
|
+
"references": [
|
|
5
|
+
"Chartboost.Threading",
|
|
6
|
+
"Chartboost.Logging",
|
|
7
|
+
"Chartboost.Mediation.Vungle",
|
|
8
|
+
"Chartboost.Mediation",
|
|
9
|
+
"Chartboost.Mediation.Android",
|
|
10
|
+
"Chartboost.Utilities.Android"
|
|
11
|
+
],
|
|
12
|
+
"includePlatforms": [
|
|
13
|
+
"Android",
|
|
14
|
+
"Editor"
|
|
15
|
+
],
|
|
16
|
+
"excludePlatforms": [],
|
|
17
|
+
"allowUnsafeCode": false,
|
|
18
|
+
"overrideReferences": false,
|
|
19
|
+
"precompiledReferences": [
|
|
20
|
+
""
|
|
21
|
+
],
|
|
22
|
+
"autoReferenced": true,
|
|
23
|
+
"defineConstraints": [],
|
|
24
|
+
"versionDefines": [],
|
|
25
|
+
"noEngineReferences": false
|
|
26
|
+
}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
|
|
2
|
+
using Chartboost.Constants;
|
|
3
|
+
using Chartboost.Mediation.Vungle.Common;
|
|
4
|
+
using UnityEngine;
|
|
5
|
+
|
|
6
|
+
namespace Chartboost.Mediation.Vungle.Android
|
|
7
|
+
{
|
|
8
|
+
internal sealed class VungleAdapter : IVungleAdapter
|
|
9
|
+
{
|
|
10
|
+
private const string VungleAdapterConfiguration = "com.chartboost.mediation.vungleadapter.VungleAdapterConfiguration";
|
|
11
|
+
|
|
12
|
+
private const string FunctionGetBackButtonImmediatelyEnabled = "getBackBtnImmediatelyEnabled";
|
|
13
|
+
private const string FunctionSetBackButtonImmediatelyEnabled = "setBackBtnImmediatelyEnabled";
|
|
14
|
+
private const string FunctionIntValue = "intValue";
|
|
15
|
+
private const string FunctionGetAdOrientation = "getAdOrientation";
|
|
16
|
+
private const string FunctionSetAdOrientation = "setAdOrientation";
|
|
17
|
+
private const string FunctionSetGdprStatusOverride = "setGdprStatusOverride";
|
|
18
|
+
private const string FunctionSetCcpaStatusOverride = "setCcpaStatusOverride";
|
|
19
|
+
|
|
20
|
+
[RuntimeInitializeOnLoadMethod]
|
|
21
|
+
private static void RegisterInstance()
|
|
22
|
+
{
|
|
23
|
+
if (Application.isEditor)
|
|
24
|
+
return;
|
|
25
|
+
Vungle.VungleAdapter.Instance = new VungleAdapter();
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/// <inheritdoc/>
|
|
29
|
+
public string AdapterNativeVersion
|
|
30
|
+
{
|
|
31
|
+
get
|
|
32
|
+
{
|
|
33
|
+
using var adapterConfiguration = new AndroidJavaObject(VungleAdapterConfiguration);
|
|
34
|
+
return adapterConfiguration.Call<string>(SharedAndroidConstants.FunctionGetAdapterVersion);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/// <inheritdoc/>
|
|
39
|
+
public string PartnerSDKVersion
|
|
40
|
+
{
|
|
41
|
+
get
|
|
42
|
+
{
|
|
43
|
+
using var adapterConfiguration = new AndroidJavaObject(VungleAdapterConfiguration);
|
|
44
|
+
return adapterConfiguration.Call<string>(SharedAndroidConstants.FunctionGetPartnerSdkVersion);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/// <inheritdoc/>
|
|
49
|
+
public string PartnerIdentifier
|
|
50
|
+
{
|
|
51
|
+
get
|
|
52
|
+
{
|
|
53
|
+
using var adapterConfiguration = new AndroidJavaObject(VungleAdapterConfiguration);
|
|
54
|
+
return adapterConfiguration.Call<string>(SharedAndroidConstants.FunctionGetPartnerId);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/// <inheritdoc/>
|
|
59
|
+
public string PartnerDisplayName
|
|
60
|
+
{
|
|
61
|
+
get
|
|
62
|
+
{
|
|
63
|
+
using var adapterConfiguration = new AndroidJavaObject(VungleAdapterConfiguration);
|
|
64
|
+
return adapterConfiguration.Call<string>(SharedAndroidConstants.FunctionGetPartnerDisplayName);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/// <inheritdoc/>
|
|
69
|
+
public bool BackButtonImmediatelyEnabled
|
|
70
|
+
{
|
|
71
|
+
get
|
|
72
|
+
{
|
|
73
|
+
using var adapterConfiguration = new AndroidJavaObject(VungleAdapterConfiguration);
|
|
74
|
+
return adapterConfiguration.Call<bool>(FunctionGetBackButtonImmediatelyEnabled);
|
|
75
|
+
}
|
|
76
|
+
set
|
|
77
|
+
{
|
|
78
|
+
using var adapterConfiguration = new AndroidJavaObject(VungleAdapterConfiguration);
|
|
79
|
+
adapterConfiguration.Call(FunctionSetBackButtonImmediatelyEnabled, value);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/// <inheritdoc/>
|
|
84
|
+
public VungleAdOrientation? AdOrientation {
|
|
85
|
+
get
|
|
86
|
+
{
|
|
87
|
+
using var adapterConfiguration = new AndroidJavaObject(VungleAdapterConfiguration);
|
|
88
|
+
using var nativeOrientationValue = adapterConfiguration.Call<AndroidJavaObject>(FunctionGetAdOrientation);
|
|
89
|
+
|
|
90
|
+
if (nativeOrientationValue == null)
|
|
91
|
+
return null;
|
|
92
|
+
|
|
93
|
+
var nativeIntValue = nativeOrientationValue.Call<int>(FunctionIntValue);
|
|
94
|
+
|
|
95
|
+
if (nativeIntValue == -1)
|
|
96
|
+
return null;
|
|
97
|
+
|
|
98
|
+
return (VungleAdOrientation)nativeIntValue;
|
|
99
|
+
}
|
|
100
|
+
set
|
|
101
|
+
{
|
|
102
|
+
using var adapterConfiguration = new AndroidJavaObject(VungleAdapterConfiguration);
|
|
103
|
+
|
|
104
|
+
if (value.HasValue)
|
|
105
|
+
{
|
|
106
|
+
var valueAsInt = (int)value;
|
|
107
|
+
adapterConfiguration.Call(FunctionSetAdOrientation, valueAsInt.GetNativeInt());
|
|
108
|
+
}
|
|
109
|
+
else
|
|
110
|
+
{
|
|
111
|
+
const int valueAsInt = -1;
|
|
112
|
+
adapterConfiguration.Call(FunctionSetAdOrientation, valueAsInt.GetNativeInt());
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/// <inheritdoc/>
|
|
118
|
+
public void SetGDPRStatusOverride(bool gdprStatus)
|
|
119
|
+
{
|
|
120
|
+
using var adapterConfiguration = new AndroidJavaObject(VungleAdapterConfiguration);
|
|
121
|
+
adapterConfiguration.Call(FunctionSetGdprStatusOverride, gdprStatus);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/// <inheritdoc/>
|
|
125
|
+
public void SetCCPAStatusOverride(bool ccpaStatus)
|
|
126
|
+
{
|
|
127
|
+
using var adapterConfiguration = new AndroidJavaObject(VungleAdapterConfiguration);
|
|
128
|
+
adapterConfiguration.Call(FunctionSetCcpaStatusOverride, ccpaStatus);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
using System.Runtime.CompilerServices;
|
|
2
|
+
using Chartboost.Mediation.Vungle;
|
|
3
|
+
using UnityEngine.Scripting;
|
|
4
|
+
|
|
5
|
+
[assembly: AlwaysLinkAssembly]
|
|
6
|
+
[assembly: InternalsVisibleTo(AssemblyInfo.VungleAssemblyInfoAndroid)]
|
|
7
|
+
[assembly: InternalsVisibleTo(AssemblyInfo.VungleAssemblyInfoIOS)]
|
|
8
|
+
|
|
9
|
+
namespace Chartboost.Mediation.Vungle
|
|
10
|
+
{
|
|
11
|
+
internal class AssemblyInfo
|
|
12
|
+
{
|
|
13
|
+
public const string VungleAssemblyInfoAndroid = "Chartboost.Mediation.Vungle.Android";
|
|
14
|
+
public const string VungleAssemblyInfoIOS = "Chartboost.Mediation.Vungle.IOS";
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Chartboost.Mediation.Vungle",
|
|
3
|
+
"rootNamespace": "Chartboost.Mediation.Vungle",
|
|
4
|
+
"references": [
|
|
5
|
+
"Chartboost.Threading",
|
|
6
|
+
"Chartboost.Logging",
|
|
7
|
+
"Chartboost.Utilities",
|
|
8
|
+
"Chartboost.Mediation"
|
|
9
|
+
],
|
|
10
|
+
"includePlatforms": [],
|
|
11
|
+
"excludePlatforms": [],
|
|
12
|
+
"allowUnsafeCode": false,
|
|
13
|
+
"overrideReferences": false,
|
|
14
|
+
"precompiledReferences": [
|
|
15
|
+
""
|
|
16
|
+
],
|
|
17
|
+
"autoReferenced": true,
|
|
18
|
+
"defineConstraints": [],
|
|
19
|
+
"versionDefines": [],
|
|
20
|
+
"noEngineReferences": false
|
|
21
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
using Chartboost.Mediation.Adapters;
|
|
2
|
+
|
|
3
|
+
namespace Chartboost.Mediation.Vungle.Common
|
|
4
|
+
{
|
|
5
|
+
#nullable enable
|
|
6
|
+
/// <summary>
|
|
7
|
+
/// The Chartboost Mediation Vungle adapter.
|
|
8
|
+
/// </summary>
|
|
9
|
+
internal interface IVungleAdapter : IPartnerAdapterConfiguration
|
|
10
|
+
{
|
|
11
|
+
/// <summary>
|
|
12
|
+
/// Flag to optionally set to specify whether the back button will be immediately enabled during the video ad, or it will be inactive until the on screen close button appears (the default behavior). It can be set at any time and will take effect on the next ad request.
|
|
13
|
+
/// <br/>
|
|
14
|
+
/// If the platform supports it, the back button allows the user to skip the video ad and proceed to the post-roll if one exists. If the ad does not have a post-roll, it simply ends.
|
|
15
|
+
/// </summary>
|
|
16
|
+
public bool BackButtonImmediatelyEnabled { get; set; }
|
|
17
|
+
|
|
18
|
+
/// <summary>
|
|
19
|
+
/// If the platform supports it, Vungle will check if it has an ad that can be rendered in the specified orientation. This flag can be set at any time and will take effect on the next ad request.
|
|
20
|
+
/// </summary>
|
|
21
|
+
public VungleAdOrientation? AdOrientation { get; set; }
|
|
22
|
+
|
|
23
|
+
/// <summary>
|
|
24
|
+
/// Use to manually set the GDPR consent status on the Vungle SDK.
|
|
25
|
+
/// This is generally unnecessary as the Mediation SDK will set the consent status automatically based on the latest consent info.
|
|
26
|
+
/// </summary>
|
|
27
|
+
public void SetGDPRStatusOverride(bool gdprStatus);
|
|
28
|
+
|
|
29
|
+
/// <summary>
|
|
30
|
+
/// Use to manually set the CCPA consent status on the Vungle SDK.
|
|
31
|
+
/// This is generally unnecessary as the Mediation SDK will set the consent status automatically based on the latest consent info.
|
|
32
|
+
/// </summary>
|
|
33
|
+
public void SetCCPAStatusOverride(bool ccpaStatus);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
using Chartboost.Logging;
|
|
2
|
+
using Chartboost.Mediation.Vungle.Common;
|
|
3
|
+
|
|
4
|
+
namespace Chartboost.Mediation.Vungle.Default
|
|
5
|
+
{
|
|
6
|
+
internal class VungleDefault : IVungleAdapter
|
|
7
|
+
{
|
|
8
|
+
/// <inheritdoc/>
|
|
9
|
+
public string AdapterNativeVersion => VungleAdapter.AdapterUnityVersion;
|
|
10
|
+
|
|
11
|
+
/// <inheritdoc/>
|
|
12
|
+
public string PartnerSDKVersion => VungleAdapter.AdapterUnityVersion;
|
|
13
|
+
|
|
14
|
+
/// <inheritdoc/>
|
|
15
|
+
public string PartnerIdentifier => "vungle";
|
|
16
|
+
|
|
17
|
+
/// <inheritdoc/>
|
|
18
|
+
public string PartnerDisplayName => "Vungle";
|
|
19
|
+
|
|
20
|
+
/// <inheritdoc/>
|
|
21
|
+
public bool BackButtonImmediatelyEnabled { get; set; }
|
|
22
|
+
|
|
23
|
+
/// <inheritdoc/>
|
|
24
|
+
public VungleAdOrientation? AdOrientation { get; set; }
|
|
25
|
+
|
|
26
|
+
/// <inheritdoc/>
|
|
27
|
+
public void SetGDPRStatusOverride(bool gdprStatus)
|
|
28
|
+
=> LogController.Log($"{nameof(SetGDPRStatusOverride)} does nothing on {nameof(VungleDefault)}", LogLevel.Info);
|
|
29
|
+
|
|
30
|
+
/// <inheritdoc/>
|
|
31
|
+
public void SetCCPAStatusOverride(bool ccpaStatus)
|
|
32
|
+
=> LogController.Log($"{nameof(SetGDPRStatusOverride)} does nothing on {nameof(VungleDefault)}", LogLevel.Info);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
using Chartboost.Mediation.Adapters;
|
|
2
|
+
using Chartboost.Mediation.Vungle.Common;
|
|
3
|
+
using Chartboost.Mediation.Vungle.Default;
|
|
4
|
+
|
|
5
|
+
namespace Chartboost.Mediation.Vungle
|
|
6
|
+
{
|
|
7
|
+
/// <inheritdoc cref="IVungleAdapter"/>
|
|
8
|
+
public static class VungleAdapter
|
|
9
|
+
{
|
|
10
|
+
internal static IVungleAdapter Instance = new VungleDefault();
|
|
11
|
+
|
|
12
|
+
/// <summary>
|
|
13
|
+
/// The partner adapter Unity version.
|
|
14
|
+
/// </summary>
|
|
15
|
+
public const string AdapterUnityVersion = "5.0.0";
|
|
16
|
+
|
|
17
|
+
/// <inheritdoc cref="IPartnerAdapterConfiguration.AdapterNativeVersion"/>
|
|
18
|
+
public static string AdapterNativeVersion => Instance.AdapterNativeVersion;
|
|
19
|
+
|
|
20
|
+
/// <inheritdoc cref="IPartnerAdapterConfiguration.PartnerSDKVersion"/>
|
|
21
|
+
public static string PartnerSDKVersion => Instance.PartnerSDKVersion;
|
|
22
|
+
|
|
23
|
+
/// <inheritdoc cref="IPartnerAdapterConfiguration.PartnerIdentifier"/>
|
|
24
|
+
public static string PartnerIdentifier => Instance.PartnerIdentifier;
|
|
25
|
+
|
|
26
|
+
/// <inheritdoc cref="IPartnerAdapterConfiguration.PartnerDisplayName"/>
|
|
27
|
+
public static string PartnerDisplayName => Instance.PartnerDisplayName;
|
|
28
|
+
|
|
29
|
+
/// <inheritdoc cref="IVungleAdapter.BackButtonImmediatelyEnabled"/>
|
|
30
|
+
public static bool BackButtonImmediatelyEnabled
|
|
31
|
+
{
|
|
32
|
+
get => Instance.BackButtonImmediatelyEnabled;
|
|
33
|
+
set => Instance.BackButtonImmediatelyEnabled = value;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/// <inheritdoc cref="IVungleAdapter.AdOrientation"/>
|
|
37
|
+
public static VungleAdOrientation? AdOrientation
|
|
38
|
+
{
|
|
39
|
+
get => Instance.AdOrientation;
|
|
40
|
+
set => Instance.AdOrientation = value;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/// <inheritdoc cref="IVungleAdapter.SetGDPRStatusOverride"/>
|
|
44
|
+
public static void SetGDPRStatusOverride(bool gdprStatus)
|
|
45
|
+
=> Instance.SetGDPRStatusOverride(gdprStatus);
|
|
46
|
+
|
|
47
|
+
/// <inheritdoc cref="IVungleAdapter.SetCCPAStatusOverride"/>
|
|
48
|
+
public static void SetCCPAStatusOverride(bool ccpaStatus)
|
|
49
|
+
=> Instance.SetCCPAStatusOverride(ccpaStatus);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Chartboost.Mediation.Vungle.IOS",
|
|
3
|
+
"rootNamespace": "Chartboost.Mediation.Vungle.IOS",
|
|
4
|
+
"references": [
|
|
5
|
+
"Chartboost.Threading",
|
|
6
|
+
"Chartboost.Logging",
|
|
7
|
+
"Chartboost.Mediation.Vungle",
|
|
8
|
+
"Chartboost.Mediation",
|
|
9
|
+
"Chartboost.Utilities.IOS"
|
|
10
|
+
],
|
|
11
|
+
"includePlatforms": [
|
|
12
|
+
"Editor",
|
|
13
|
+
"iOS"
|
|
14
|
+
],
|
|
15
|
+
"excludePlatforms": [],
|
|
16
|
+
"allowUnsafeCode": false,
|
|
17
|
+
"overrideReferences": false,
|
|
18
|
+
"precompiledReferences": [
|
|
19
|
+
""
|
|
20
|
+
],
|
|
21
|
+
"autoReferenced": true,
|
|
22
|
+
"defineConstraints": [],
|
|
23
|
+
"versionDefines": [],
|
|
24
|
+
"noEngineReferences": false
|
|
25
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
#import "CBMDelegates.h"
|
|
2
|
+
#import "ChartboostUnityUtilities.h"
|
|
3
|
+
#import <ChartboostMediationAdapterVungle/ChartboostMediationAdapterVungle-Swift.h>
|
|
4
|
+
|
|
5
|
+
extern "C" {
|
|
6
|
+
|
|
7
|
+
const char * _CBMVungleAdapterAdapterVersion(){
|
|
8
|
+
return toCStringOrNull([VungleAdapterConfiguration adapterVersion]);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const char * _CBMVungleAdapterPartnerSDKVersion(){
|
|
12
|
+
return toCStringOrNull([VungleAdapterConfiguration partnerSDKVersion]);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const char * _CBMVungleAdapterPartnerId(){
|
|
16
|
+
return toCStringOrNull([VungleAdapterConfiguration partnerID]);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const char * _CBMVungleAdapterPartnerDisplayName(){
|
|
20
|
+
return toCStringOrNull([VungleAdapterConfiguration partnerDisplayName]);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
void _CBMVungleAdapterSetGDPRStatusOverride(BOOL gdprStatus){
|
|
24
|
+
[VungleAdapterConfiguration setGDPRStatusOverride:gdprStatus];
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
void _CBMVungleAdapterSetCCPAStatusOverride(BOOL ccpaStatus){
|
|
28
|
+
[VungleAdapterConfiguration setCCPAStatusOverride:ccpaStatus];
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
fileFormatVersion: 2
|
|
2
|
+
guid: d3c46b6bdd0d44d61a62a6c69ec09810
|
|
3
|
+
PluginImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
serializedVersion: 2
|
|
6
|
+
iconMap: {}
|
|
7
|
+
executionOrder: {}
|
|
8
|
+
defineConstraints: []
|
|
9
|
+
isPreloaded: 0
|
|
10
|
+
isOverridable: 1
|
|
11
|
+
isExplicitlyReferenced: 0
|
|
12
|
+
validateReferences: 1
|
|
13
|
+
platformData:
|
|
14
|
+
- first:
|
|
15
|
+
Any:
|
|
16
|
+
second:
|
|
17
|
+
enabled: 0
|
|
18
|
+
settings: {}
|
|
19
|
+
- first:
|
|
20
|
+
Editor: Editor
|
|
21
|
+
second:
|
|
22
|
+
enabled: 0
|
|
23
|
+
settings:
|
|
24
|
+
DefaultValueInitialized: true
|
|
25
|
+
- first:
|
|
26
|
+
iPhone: iOS
|
|
27
|
+
second:
|
|
28
|
+
enabled: 1
|
|
29
|
+
settings: {}
|
|
30
|
+
- first:
|
|
31
|
+
tvOS: tvOS
|
|
32
|
+
second:
|
|
33
|
+
enabled: 1
|
|
34
|
+
settings: {}
|
|
35
|
+
userData:
|
|
36
|
+
assetBundleName:
|
|
37
|
+
assetBundleVariant:
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
using System.Runtime.InteropServices;
|
|
2
|
+
using Chartboost.Constants;
|
|
3
|
+
using Chartboost.Mediation.Vungle.Common;
|
|
4
|
+
using UnityEngine;
|
|
5
|
+
|
|
6
|
+
namespace Chartboost.Mediation.Vungle.IOS
|
|
7
|
+
{
|
|
8
|
+
internal sealed class VungleAdapter : IVungleAdapter
|
|
9
|
+
{
|
|
10
|
+
[RuntimeInitializeOnLoadMethod]
|
|
11
|
+
private static void RegisterInstance()
|
|
12
|
+
{
|
|
13
|
+
if (Application.isEditor)
|
|
14
|
+
return;
|
|
15
|
+
Vungle.VungleAdapter.Instance = new VungleAdapter();
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/// <inheritdoc/>
|
|
19
|
+
public string AdapterNativeVersion => _CBMVungleAdapterAdapterVersion();
|
|
20
|
+
|
|
21
|
+
/// <inheritdoc/>
|
|
22
|
+
public string PartnerSDKVersion => _CBMVungleAdapterPartnerSDKVersion();
|
|
23
|
+
|
|
24
|
+
/// <inheritdoc/>
|
|
25
|
+
public string PartnerIdentifier => _CBMVungleAdapterPartnerId();
|
|
26
|
+
|
|
27
|
+
/// <inheritdoc/>
|
|
28
|
+
public string PartnerDisplayName => _CBMVungleAdapterPartnerDisplayName();
|
|
29
|
+
|
|
30
|
+
/// <inheritdoc/>
|
|
31
|
+
public bool BackButtonImmediatelyEnabled { get; set; }
|
|
32
|
+
|
|
33
|
+
/// <inheritdoc/>
|
|
34
|
+
public VungleAdOrientation? AdOrientation { get; set; }
|
|
35
|
+
|
|
36
|
+
/// <inheritdoc/>
|
|
37
|
+
public void SetGDPRStatusOverride(bool gdprStatus)
|
|
38
|
+
=> _CBMVungleAdapterSetGDPRStatusOverride(gdprStatus);
|
|
39
|
+
|
|
40
|
+
/// <inheritdoc/>
|
|
41
|
+
public void SetCCPAStatusOverride(bool ccpaStatus)
|
|
42
|
+
=> _CBMVungleAdapterSetCCPAStatusOverride(ccpaStatus);
|
|
43
|
+
|
|
44
|
+
[DllImport(SharedIOSConstants.DLLImport)] private static extern string _CBMVungleAdapterAdapterVersion();
|
|
45
|
+
[DllImport(SharedIOSConstants.DLLImport)] private static extern string _CBMVungleAdapterPartnerSDKVersion();
|
|
46
|
+
[DllImport(SharedIOSConstants.DLLImport)] private static extern string _CBMVungleAdapterPartnerId();
|
|
47
|
+
[DllImport(SharedIOSConstants.DLLImport)] private static extern string _CBMVungleAdapterPartnerDisplayName();
|
|
48
|
+
[DllImport(SharedIOSConstants.DLLImport)] private static extern void _CBMVungleAdapterSetGDPRStatusOverride(bool gdprStatus);
|
|
49
|
+
[DllImport(SharedIOSConstants.DLLImport)] private static extern void _CBMVungleAdapterSetCCPAStatusOverride(bool ccpaStatus);
|
|
50
|
+
}
|
|
51
|
+
}
|
package/Runtime/iOS.meta
ADDED
package/Runtime.meta
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Chartboost.Mediation.Vungle.Tests.Editor",
|
|
3
|
+
"rootNamespace": "Chartboost.Tests.Editor",
|
|
4
|
+
"references": [
|
|
5
|
+
"UnityEngine.TestRunner",
|
|
6
|
+
"UnityEditor.TestRunner",
|
|
7
|
+
"Chartboost.Utilities.Editor",
|
|
8
|
+
"Chartboost.Logging",
|
|
9
|
+
"Chartboost.Mediation.Vungle"
|
|
10
|
+
],
|
|
11
|
+
"includePlatforms": [
|
|
12
|
+
"Editor"
|
|
13
|
+
],
|
|
14
|
+
"excludePlatforms": [],
|
|
15
|
+
"allowUnsafeCode": false,
|
|
16
|
+
"overrideReferences": true,
|
|
17
|
+
"precompiledReferences": [
|
|
18
|
+
"nunit.framework.dll"
|
|
19
|
+
],
|
|
20
|
+
"autoReferenced": false,
|
|
21
|
+
"defineConstraints": [
|
|
22
|
+
"UNITY_INCLUDE_TESTS"
|
|
23
|
+
],
|
|
24
|
+
"versionDefines": [],
|
|
25
|
+
"noEngineReferences": false
|
|
26
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
using Chartboost.Editor;
|
|
2
|
+
using Chartboost.Logging;
|
|
3
|
+
using Chartboost.Mediation.Vungle;
|
|
4
|
+
using NUnit.Framework;
|
|
5
|
+
|
|
6
|
+
namespace Chartboost.Tests.Editor
|
|
7
|
+
{
|
|
8
|
+
internal class VersionValidator
|
|
9
|
+
{
|
|
10
|
+
private const string UnityPackageManagerPackageName = "com.chartboost.mediation.unity.adapter.vungle";
|
|
11
|
+
private const string NuGetPackageName = "Chartboost.CSharp.Mediation.Unity.Adapter.Vungle";
|
|
12
|
+
|
|
13
|
+
[SetUp]
|
|
14
|
+
public void SetUp()
|
|
15
|
+
=> LogController.LoggingLevel = LogLevel.Debug;
|
|
16
|
+
|
|
17
|
+
[Test]
|
|
18
|
+
public void ValidateVersion()
|
|
19
|
+
=> VersionCheck.ValidateVersions(UnityPackageManagerPackageName, NuGetPackageName, VungleAdapter.AdapterUnityVersion);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Chartboost.Mediation.Vungle.Tests.Runtime",
|
|
3
|
+
"rootNamespace": "Chartboost.Tests",
|
|
4
|
+
"references": [
|
|
5
|
+
"UnityEngine.TestRunner",
|
|
6
|
+
"UnityEditor.TestRunner",
|
|
7
|
+
"Chartboost.Utilities",
|
|
8
|
+
"Chartboost.Mediation.Vungle",
|
|
9
|
+
"Chartboost.Logging",
|
|
10
|
+
"Chartboost.Utilities.Tests.Runtime"
|
|
11
|
+
],
|
|
12
|
+
"includePlatforms": [
|
|
13
|
+
"Android",
|
|
14
|
+
"Editor",
|
|
15
|
+
"iOS"
|
|
16
|
+
],
|
|
17
|
+
"excludePlatforms": [],
|
|
18
|
+
"allowUnsafeCode": false,
|
|
19
|
+
"overrideReferences": true,
|
|
20
|
+
"precompiledReferences": [
|
|
21
|
+
"nunit.framework.dll"
|
|
22
|
+
],
|
|
23
|
+
"autoReferenced": false,
|
|
24
|
+
"defineConstraints": [
|
|
25
|
+
"UNITY_INCLUDE_TESTS"
|
|
26
|
+
],
|
|
27
|
+
"versionDefines": [],
|
|
28
|
+
"noEngineReferences": false
|
|
29
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
using Chartboost.Logging;
|
|
2
|
+
using Chartboost.Mediation.Vungle;
|
|
3
|
+
using Chartboost.Mediation.Vungle.Common;
|
|
4
|
+
using Chartboost.Tests.Runtime;
|
|
5
|
+
using NUnit.Framework;
|
|
6
|
+
|
|
7
|
+
namespace Chartboost.Tests
|
|
8
|
+
{
|
|
9
|
+
internal class VungleAdapterTests
|
|
10
|
+
{
|
|
11
|
+
[SetUp]
|
|
12
|
+
public void SetUp()
|
|
13
|
+
{
|
|
14
|
+
LogController.LoggingLevel = LogLevel.Debug;
|
|
15
|
+
Assert.AreEqual(null, VungleAdapter.AdOrientation);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
[TearDown]
|
|
19
|
+
public void TearDown()
|
|
20
|
+
{
|
|
21
|
+
VungleAdapter.AdOrientation = null;
|
|
22
|
+
Assert.AreEqual(null, VungleAdapter.AdOrientation);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
[Test]
|
|
26
|
+
public void AdapterNativeVersion()
|
|
27
|
+
=> TestUtilities.TestStringGetter(() => VungleAdapter.AdapterNativeVersion);
|
|
28
|
+
|
|
29
|
+
[Test]
|
|
30
|
+
public void PartnerSDKVersion()
|
|
31
|
+
=> TestUtilities.TestStringGetter(() => VungleAdapter.PartnerSDKVersion);
|
|
32
|
+
|
|
33
|
+
[Test]
|
|
34
|
+
public void PartnerIdentifier()
|
|
35
|
+
=> TestUtilities.TestStringGetter(() => VungleAdapter.PartnerIdentifier);
|
|
36
|
+
|
|
37
|
+
[Test]
|
|
38
|
+
public void PartnerDisplayName()
|
|
39
|
+
=> TestUtilities.TestStringGetter(() => VungleAdapter.PartnerDisplayName);
|
|
40
|
+
|
|
41
|
+
[Test]
|
|
42
|
+
public void BackButtonImmediatelyEnabled()
|
|
43
|
+
=> TestUtilities.TestBooleanAccessor(() => VungleAdapter.BackButtonImmediatelyEnabled, value => VungleAdapter.BackButtonImmediatelyEnabled = value);
|
|
44
|
+
|
|
45
|
+
[Test]
|
|
46
|
+
public void AdOrientationPortrait()
|
|
47
|
+
{
|
|
48
|
+
VungleAdapter.AdOrientation = VungleAdOrientation.PORTRAIT;
|
|
49
|
+
Assert.AreEqual(VungleAdOrientation.PORTRAIT, VungleAdapter.AdOrientation);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
[Test]
|
|
53
|
+
public void AdOrientationLandscape()
|
|
54
|
+
{
|
|
55
|
+
VungleAdapter.AdOrientation = VungleAdOrientation.LANDSCAPE;
|
|
56
|
+
Assert.AreEqual(VungleAdOrientation.LANDSCAPE, VungleAdapter.AdOrientation);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
[Test]
|
|
60
|
+
public void AdOrientationAutoRotate()
|
|
61
|
+
{
|
|
62
|
+
VungleAdapter.AdOrientation = VungleAdOrientation.AUTO_ROTATE;
|
|
63
|
+
Assert.AreEqual(VungleAdOrientation.AUTO_ROTATE, VungleAdapter.AdOrientation);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
[Test, Order(0)]
|
|
67
|
+
public void SetGDPRStatusTrue()
|
|
68
|
+
=> VungleAdapter.SetGDPRStatusOverride(true);
|
|
69
|
+
|
|
70
|
+
[Test, Order(1)]
|
|
71
|
+
public void SetGDPRStatusFalse()
|
|
72
|
+
=> VungleAdapter.SetGDPRStatusOverride(false);
|
|
73
|
+
|
|
74
|
+
[Test, Order(0)]
|
|
75
|
+
public void SetCCPAStatusTrue()
|
|
76
|
+
=> VungleAdapter.SetCCPAStatusOverride(true);
|
|
77
|
+
|
|
78
|
+
[Test, Order(1)]
|
|
79
|
+
public void SetCCPAStatusFalse()
|
|
80
|
+
=> VungleAdapter.SetCCPAStatusOverride(false);
|
|
81
|
+
}
|
|
82
|
+
}
|
package/Tests.meta
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "com.chartboost.mediation.unity.adapter.vungle",
|
|
3
|
+
"version": "5.0.0",
|
|
4
|
+
"displayName": "Chartboost Mediation Adapter - Vungle",
|
|
5
|
+
"description": "The Chartboost Mediation Unity SDK Adapter for Vungle.",
|
|
6
|
+
"unity": "2022.3",
|
|
7
|
+
"documentationUrl": "https://docs.chartboost.com/en/mediation/integrate/unity/get-started/",
|
|
8
|
+
"changelogUrl": "https://docs.chartboost.com/en/mediation/integrate/unity/changelog/",
|
|
9
|
+
"licensesUrl": "https://docs.chartboost.com/en/legal/",
|
|
10
|
+
"dependencies": {
|
|
11
|
+
"com.chartboost.mediation" : "5.0.0",
|
|
12
|
+
"com.chartboost.unity.threading": "1.0.1",
|
|
13
|
+
"com.chartboost.unity.utilities": "1.0.1",
|
|
14
|
+
"com.chartboost.unity.logging": "1.0.0"
|
|
15
|
+
},
|
|
16
|
+
"keywords": ["Chartboost", "Mediation", "Adapter", "Unity", "Vungle"],
|
|
17
|
+
"author": {
|
|
18
|
+
"name": "Chartboost",
|
|
19
|
+
"email": "sales@chartboost.com",
|
|
20
|
+
"url": "https://www.chartboost.com/products/mediation/"
|
|
21
|
+
},
|
|
22
|
+
"repository": {
|
|
23
|
+
"type": "git",
|
|
24
|
+
"url": "https://github.com/ChartBoost/chartboost-mediation-unity-adapter-vungle.git"
|
|
25
|
+
},
|
|
26
|
+
"bugs": {
|
|
27
|
+
"url": "https://github.com/ChartBoost/chartboost-mediation-unity-adapter-vungle/issues",
|
|
28
|
+
"email": "helium-service@chartboost.com"
|
|
29
|
+
},
|
|
30
|
+
"hideInEditor": false
|
|
31
|
+
}
|
package/rsync.sh
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
# Check if PUBLIC_REPOSITORY_PATH is not set or is empty
|
|
4
|
+
if [ -z "${PUBLIC_REPOSITORY_PATH}" ]; then
|
|
5
|
+
echo "The \$PUBLIC_REPOSITORY_PATH variable is unset or empty. Assigning default value 'Public'."
|
|
6
|
+
PUBLIC_REPOSITORY_PATH=Public
|
|
7
|
+
fi
|
|
8
|
+
|
|
9
|
+
# Ensure the directory exists
|
|
10
|
+
mkdir -p "${PUBLIC_REPOSITORY_PATH}"
|
|
11
|
+
|
|
12
|
+
# com.chartboost.core
|
|
13
|
+
rsync -av --progress --verbose --delete \
|
|
14
|
+
--exclude='.git' \
|
|
15
|
+
--exclude='rsync*' \
|
|
16
|
+
com.chartboost.mediation.adapters/com.chartboost.mediation.unity.adapter.vungle/ "${PUBLIC_REPOSITORY_PATH}/"
|
|
17
|
+
|