Appodeal
This commit is contained in:
parent
133f0413f2
commit
5df6ee8ae5
9
Assets/Appodeal.meta
Normal file
9
Assets/Appodeal.meta
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 1c3413686ff4e435f9aafc02bd1bf65e
|
||||||
|
folderAsset: yes
|
||||||
|
timeCreated: 1530702704
|
||||||
|
licenseType: Free
|
||||||
|
DefaultImporter:
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
9
Assets/Appodeal/Api.meta
Normal file
9
Assets/Appodeal/Api.meta
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 1c56ccdd8b8194e30b1fd0a6b41fc1a5
|
||||||
|
folderAsset: yes
|
||||||
|
timeCreated: 1530702704
|
||||||
|
licenseType: Free
|
||||||
|
DefaultImporter:
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 28fc461b677833c4e8f53404ac6b02e5
|
guid: 28d5a1f972ada459da5a7b9b2138fa02
|
||||||
folderAsset: yes
|
folderAsset: yes
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
1305
Assets/Appodeal/Api/Appodeal/Appodeal.cs
Normal file
1305
Assets/Appodeal/Api/Appodeal/Appodeal.cs
Normal file
File diff suppressed because it is too large
Load Diff
11
Assets/Appodeal/Api/Appodeal/Appodeal.cs.meta
Normal file
11
Assets/Appodeal/Api/Appodeal/Appodeal.cs.meta
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 9526cfa6c16d240ebaeefa4ef9601b8f
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 04437662021e8c7498d3e27da2d9c69d
|
guid: f62c98cb6da0f48d1946490506072c60
|
||||||
folderAsset: yes
|
folderAsset: yes
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
318
Assets/Appodeal/Api/ConsentManager/ConsentManager.cs
Normal file
318
Assets/Appodeal/Api/ConsentManager/ConsentManager.cs
Normal file
|
|
@ -0,0 +1,318 @@
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics.CodeAnalysis;
|
||||||
|
using ConsentManager.Common;
|
||||||
|
using ConsentManager.Platforms;
|
||||||
|
|
||||||
|
namespace ConsentManager
|
||||||
|
{
|
||||||
|
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||||
|
[SuppressMessage("ReSharper", "UnusedMember.Global")]
|
||||||
|
public class ConsentManager
|
||||||
|
{
|
||||||
|
private readonly IConsentManager nativeConsentManager;
|
||||||
|
|
||||||
|
private IConsentManager GetNativeConsentManager()
|
||||||
|
{
|
||||||
|
return nativeConsentManager;
|
||||||
|
}
|
||||||
|
|
||||||
|
private ConsentManager()
|
||||||
|
{
|
||||||
|
nativeConsentManager = ConsentManagerClientFactory.GetConsentManager();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static ConsentManager getInstance()
|
||||||
|
{
|
||||||
|
return new ConsentManager();
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum Storage
|
||||||
|
{
|
||||||
|
NONE,
|
||||||
|
SHARED_PREFERENCE
|
||||||
|
}
|
||||||
|
|
||||||
|
public void requestConsentInfoUpdate(string appodealAppKey, IConsentInfoUpdateListener listener)
|
||||||
|
{
|
||||||
|
GetNativeConsentManager().requestConsentInfoUpdate(appodealAppKey, listener);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void disableAppTrackingTransparencyRequest()
|
||||||
|
{
|
||||||
|
GetNativeConsentManager().disableAppTrackingTransparencyRequest();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCustomVendor(Vendor customVendor)
|
||||||
|
{
|
||||||
|
nativeConsentManager.setCustomVendor(customVendor);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Vendor getCustomVendor(string bundle)
|
||||||
|
{
|
||||||
|
return nativeConsentManager.getCustomVendor(bundle);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Storage getStorage()
|
||||||
|
{
|
||||||
|
return nativeConsentManager.getStorage();
|
||||||
|
}
|
||||||
|
|
||||||
|
public Consent.ShouldShow shouldShowConsentDialog()
|
||||||
|
{
|
||||||
|
return nativeConsentManager.shouldShowConsentDialog();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStorage(Storage iabStorage)
|
||||||
|
{
|
||||||
|
nativeConsentManager.setStorage(iabStorage);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Consent.Zone getConsentZone()
|
||||||
|
{
|
||||||
|
return nativeConsentManager.getConsentZone();
|
||||||
|
}
|
||||||
|
|
||||||
|
public Consent.Status getConsentStatus()
|
||||||
|
{
|
||||||
|
return nativeConsentManager.getConsentStatus();
|
||||||
|
}
|
||||||
|
|
||||||
|
public Consent getConsent()
|
||||||
|
{
|
||||||
|
return nativeConsentManager.getConsent();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||||
|
[SuppressMessage("ReSharper", "UnusedMember.Global")]
|
||||||
|
public class ConsentForm
|
||||||
|
{
|
||||||
|
private readonly IConsentForm nativeConsentForm;
|
||||||
|
|
||||||
|
private ConsentForm(IConsentFormListener listener)
|
||||||
|
{
|
||||||
|
nativeConsentForm = ConsentManagerClientFactory.GetConsentForm(listener);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static ConsentForm GetInstance(IConsentFormListener listener)
|
||||||
|
{
|
||||||
|
return new ConsentForm(listener);
|
||||||
|
}
|
||||||
|
|
||||||
|
public IConsentForm GetNativeConsent()
|
||||||
|
{
|
||||||
|
return nativeConsentForm;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void load()
|
||||||
|
{
|
||||||
|
nativeConsentForm.load();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void show()
|
||||||
|
{
|
||||||
|
nativeConsentForm.show();
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool isLoaded()
|
||||||
|
{
|
||||||
|
return nativeConsentForm.isLoaded();
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool isShowing()
|
||||||
|
{
|
||||||
|
return nativeConsentForm.isShowing();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||||
|
[SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
|
||||||
|
[SuppressMessage("ReSharper", "UnusedMember.Global")]
|
||||||
|
public class Vendor : IVendor
|
||||||
|
{
|
||||||
|
private readonly IVendor nativeVendor;
|
||||||
|
|
||||||
|
public Vendor(IVendor builder)
|
||||||
|
{
|
||||||
|
nativeVendor = builder;
|
||||||
|
}
|
||||||
|
|
||||||
|
public IVendor getNativeVendor()
|
||||||
|
{
|
||||||
|
return nativeVendor;
|
||||||
|
}
|
||||||
|
|
||||||
|
public class Builder
|
||||||
|
{
|
||||||
|
private readonly IVendorBuilder nativeVendorBuilder;
|
||||||
|
|
||||||
|
public Builder(string customVen, string customVendor, string httpsCustomVendorCom)
|
||||||
|
{
|
||||||
|
nativeVendorBuilder =
|
||||||
|
ConsentManagerClientFactory.GetVendorBuilder(customVen, customVendor, httpsCustomVendorCom);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Vendor build()
|
||||||
|
{
|
||||||
|
return new Vendor(nativeVendorBuilder.build());
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder setPurposeIds(IEnumerable<int> purposeIds)
|
||||||
|
{
|
||||||
|
nativeVendorBuilder.setPurposeIds(purposeIds);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder setFeatureIds(IEnumerable<int> featureIds)
|
||||||
|
{
|
||||||
|
nativeVendorBuilder.setFeatureIds(featureIds);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder setLegitimateInterestPurposeIds(IEnumerable<int> legitimateInterestPurposeIds)
|
||||||
|
{
|
||||||
|
nativeVendorBuilder.setLegitimateInterestPurposeIds(legitimateInterestPurposeIds);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public string getName()
|
||||||
|
{
|
||||||
|
return nativeVendor.getName();
|
||||||
|
}
|
||||||
|
|
||||||
|
public string getBundle()
|
||||||
|
{
|
||||||
|
return nativeVendor.getBundle();
|
||||||
|
}
|
||||||
|
|
||||||
|
public string getPolicyUrl()
|
||||||
|
{
|
||||||
|
return nativeVendor.getPolicyUrl();
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<int> getPurposeIds()
|
||||||
|
{
|
||||||
|
return nativeVendor.getPurposeIds();
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<int> getFeatureIds()
|
||||||
|
{
|
||||||
|
return nativeVendor.getFeatureIds();
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<int> getLegitimateInterestPurposeIds()
|
||||||
|
{
|
||||||
|
return nativeVendor.getLegitimateInterestPurposeIds();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||||
|
[SuppressMessage("ReSharper", "ClassNeverInstantiated.Global")]
|
||||||
|
[SuppressMessage("ReSharper", "UnusedMember.Global")]
|
||||||
|
public class Consent : IConsent
|
||||||
|
{
|
||||||
|
private readonly IConsent consent;
|
||||||
|
|
||||||
|
public Consent(IConsent consent)
|
||||||
|
{
|
||||||
|
this.consent = consent;
|
||||||
|
}
|
||||||
|
|
||||||
|
public IConsent getConsent()
|
||||||
|
{
|
||||||
|
return consent;
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum Status
|
||||||
|
{
|
||||||
|
UNKNOWN,
|
||||||
|
NON_PERSONALIZED,
|
||||||
|
PARTLY_PERSONALIZED,
|
||||||
|
PERSONALIZED
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum Zone
|
||||||
|
{
|
||||||
|
UNKNOWN,
|
||||||
|
NONE,
|
||||||
|
GDPR,
|
||||||
|
CCPA
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum HasConsent
|
||||||
|
{
|
||||||
|
UNKNOWN,
|
||||||
|
TRUE,
|
||||||
|
FALSE
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum ShouldShow
|
||||||
|
{
|
||||||
|
UNKNOWN,
|
||||||
|
TRUE,
|
||||||
|
FALSE
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum AuthorizationStatus
|
||||||
|
{
|
||||||
|
NOT_DETERMINED,
|
||||||
|
RESTRICTED,
|
||||||
|
DENIED,
|
||||||
|
AUTHORIZED
|
||||||
|
}
|
||||||
|
|
||||||
|
public Zone getZone()
|
||||||
|
{
|
||||||
|
return consent.getZone();
|
||||||
|
}
|
||||||
|
|
||||||
|
public Status getStatus()
|
||||||
|
{
|
||||||
|
return consent.getStatus();
|
||||||
|
}
|
||||||
|
|
||||||
|
public AuthorizationStatus getAuthorizationStatus()
|
||||||
|
{
|
||||||
|
return consent.getAuthorizationStatus();
|
||||||
|
}
|
||||||
|
|
||||||
|
public HasConsent hasConsentForVendor(string bundle)
|
||||||
|
{
|
||||||
|
return consent.hasConsentForVendor(bundle);
|
||||||
|
}
|
||||||
|
|
||||||
|
public string getIabConsentString()
|
||||||
|
{
|
||||||
|
return consent.getIabConsentString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||||
|
[SuppressMessage("ReSharper", "ClassNeverInstantiated.Global")]
|
||||||
|
[SuppressMessage("ReSharper", "UnusedMember.Global")]
|
||||||
|
public class ConsentManagerException : IConsentManagerException
|
||||||
|
{
|
||||||
|
private readonly IConsentManagerException consentManagerException;
|
||||||
|
|
||||||
|
public ConsentManagerException()
|
||||||
|
{
|
||||||
|
consentManagerException = ConsentManagerClientFactory.GetConsentManagerException();
|
||||||
|
}
|
||||||
|
|
||||||
|
public ConsentManagerException(IConsentManagerException androidConsentManagerException)
|
||||||
|
{
|
||||||
|
consentManagerException = androidConsentManagerException;
|
||||||
|
}
|
||||||
|
|
||||||
|
public string getReason()
|
||||||
|
{
|
||||||
|
return consentManagerException.getReason();
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getCode()
|
||||||
|
{
|
||||||
|
return consentManagerException.getCode();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
11
Assets/Appodeal/Api/ConsentManager/ConsentManager.cs.meta
Normal file
11
Assets/Appodeal/Api/ConsentManager/ConsentManager.cs.meta
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: c22e7af053c004371a396017f8284b50
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
9
Assets/Appodeal/Common.meta
Normal file
9
Assets/Appodeal/Common.meta
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 3a076746f2cb340c0a2de3075b77daa8
|
||||||
|
folderAsset: yes
|
||||||
|
timeCreated: 1530702704
|
||||||
|
licenseType: Free
|
||||||
|
DefaultImporter:
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: bfec68e9f6f3f184f9e1f3618bc30fbe
|
guid: 1323ce415ce9540f3ab8a03b98de34df
|
||||||
folderAsset: yes
|
folderAsset: yes
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
89
Assets/Appodeal/Common/Appodeal/AppodealAdRevenue.cs
Normal file
89
Assets/Appodeal/Common/Appodeal/AppodealAdRevenue.cs
Normal file
|
|
@ -0,0 +1,89 @@
|
||||||
|
// ReSharper Disable CheckNamespace
|
||||||
|
namespace AppodealAds.Unity.Common
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// <para>
|
||||||
|
/// This class is designed to store ad revenue information.
|
||||||
|
/// </para>
|
||||||
|
/// See <see href=""/> for more details.
|
||||||
|
/// </summary>
|
||||||
|
public class AppodealAdRevenue
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// <para>
|
||||||
|
/// Appodeal Ad Type as a not-null string.
|
||||||
|
/// </para>
|
||||||
|
/// See <see href=""/> for more details.
|
||||||
|
/// </summary>
|
||||||
|
public string AdType;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// <para>
|
||||||
|
/// Ad Network Name as a not-null string.
|
||||||
|
/// </para>
|
||||||
|
/// See <see href=""/> for more details.
|
||||||
|
/// </summary>
|
||||||
|
public string NetworkName;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// <para>
|
||||||
|
/// Appodeal Ad Unit Name as a not-null string.
|
||||||
|
/// </para>
|
||||||
|
/// See <see href=""/> for more details.
|
||||||
|
/// </summary>
|
||||||
|
public string AdUnitName;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// <para>
|
||||||
|
/// Demand Source as a not-null string.
|
||||||
|
/// </para>
|
||||||
|
/// See <see href=""/> for more details.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>Bidder name in case of RTB, otherwise - the same as ad network name.</remarks>
|
||||||
|
public string DemandSource;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// <para>
|
||||||
|
/// Appodeal Placement as a not-null string.
|
||||||
|
/// </para>
|
||||||
|
/// See <see href=""/> for more details.
|
||||||
|
/// </summary>
|
||||||
|
public string Placement;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// <para>
|
||||||
|
/// The amount of revenue for an ad.
|
||||||
|
/// </para>
|
||||||
|
/// See <see href=""/> for more details.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>It can be zero in case of an invalid impression.</remarks>
|
||||||
|
public double Revenue;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// <para>
|
||||||
|
/// The Revenue Currency as a not-null string.
|
||||||
|
/// </para>
|
||||||
|
/// See <see href=""/> for more details.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>At the moment the only supported currency is USD.</remarks>
|
||||||
|
public string Currency;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// <para>
|
||||||
|
/// Ad Revenue Precision as a not-null string.
|
||||||
|
/// </para>
|
||||||
|
/// See <see href=""/> for more details.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks><para>'exact' - programmatic revenue is the resulting price of an auction.</para><para>'publisher_defined' - revenue from cross-promo campaigns.</para><para>'estimated' - revenue based on ad unit price floor or historical eCPM.</para><para>'undefined' - revenue amount is not defined.</para></remarks>
|
||||||
|
public string RevenuePrecision;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// <para>
|
||||||
|
/// Returns ad revenue information as a json-formatted string.
|
||||||
|
/// </para>
|
||||||
|
/// See <see href=""/> for more details.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="isPretty">If true, format the output for readability. If false, format the output for minimum size. Default is false.</param>
|
||||||
|
public string ToJsonString(bool isPretty = false) => UnityEngine.JsonUtility.ToJson(this, isPretty);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 771fde5441a6402694ccdaa1a8023e20
|
||||||
|
timeCreated: 1664789154
|
||||||
18
Assets/Appodeal/Common/Appodeal/IAdRevenueListener.cs
Normal file
18
Assets/Appodeal/Common/Appodeal/IAdRevenueListener.cs
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
// ReSharper Disable CheckNamespace
|
||||||
|
namespace AppodealAds.Unity.Common
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Interface containing signature of Appodeal Ad Revenue callback method.
|
||||||
|
/// </summary>
|
||||||
|
public interface IAdRevenueListener
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// <para>
|
||||||
|
/// Fires when Appodeal SDK tracks ad impression.
|
||||||
|
/// </para>
|
||||||
|
/// See <see href=""/> for more details.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="ad">contains info about the tracked impression.</param>
|
||||||
|
void onAdRevenueReceived(AppodealAdRevenue ad);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 431d8147345e4487852bf2fad7935c42
|
||||||
|
timeCreated: 1664789084
|
||||||
86
Assets/Appodeal/Common/Appodeal/IAppodealAdsClient.cs
Normal file
86
Assets/Appodeal/Common/Appodeal/IAppodealAdsClient.cs
Normal file
|
|
@ -0,0 +1,86 @@
|
||||||
|
using System.Diagnostics.CodeAnalysis;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using AppodealAds.Unity.Api;
|
||||||
|
using ConsentManager;
|
||||||
|
|
||||||
|
namespace AppodealAds.Unity.Common
|
||||||
|
{
|
||||||
|
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||||
|
[SuppressMessage("ReSharper", "UnusedParameter.Global")]
|
||||||
|
[SuppressMessage("ReSharper", "UnusedMember.Global")]
|
||||||
|
public interface IAppodealAdsClient
|
||||||
|
{
|
||||||
|
void initialize(string appKey, int adTypes, IAppodealInitializationListener listener);
|
||||||
|
bool isInitialized(int adType);
|
||||||
|
bool show(int adTypes);
|
||||||
|
bool show(int adTypes, string placement);
|
||||||
|
bool isLoaded(int adTypes);
|
||||||
|
void cache(int adTypes);
|
||||||
|
void hide(int adTypes);
|
||||||
|
void setAutoCache(int adTypes, bool autoCache);
|
||||||
|
bool isPrecache(int adTypes);
|
||||||
|
bool showBannerView(int YAxis, int XGravity, string Placement);
|
||||||
|
bool showMrecView(int YAxis, int XGravity, string Placement);
|
||||||
|
void hideBannerView();
|
||||||
|
void hideMrecView();
|
||||||
|
void setSmartBanners(bool value);
|
||||||
|
bool isSmartBannersEnabled();
|
||||||
|
void setBannerAnimation(bool value);
|
||||||
|
void setTabletBanners(bool value);
|
||||||
|
void setBannerRotation(int leftBannerRotation, int rightBannerRotation);
|
||||||
|
void setTesting(bool test);
|
||||||
|
void setLogLevel(Appodeal.LogLevel level);
|
||||||
|
void setChildDirectedTreatment(bool value);
|
||||||
|
void updateConsent(Consent consent);
|
||||||
|
void updateGdprConsent(Appodeal.GdprUserConsent consent);
|
||||||
|
void updateCcpaConsent(Appodeal.CcpaUserConsent consent);
|
||||||
|
List<string> getNetworks(int adType);
|
||||||
|
void disableNetwork(string network);
|
||||||
|
void disableNetwork(string network, int type);
|
||||||
|
void disableLocationPermissionCheck();
|
||||||
|
void muteVideosIfCallsMuted(bool value);
|
||||||
|
void showTestScreen();
|
||||||
|
string getVersion();
|
||||||
|
bool canShow(int adTypes);
|
||||||
|
bool canShow(int adTypes, string placement);
|
||||||
|
void setCustomFilter(string name, bool value);
|
||||||
|
void setCustomFilter(string name, int value);
|
||||||
|
void setCustomFilter(string name, double value);
|
||||||
|
void setCustomFilter(string name, string value);
|
||||||
|
void resetCustomFilter(string name);
|
||||||
|
void setExtraData(string key, bool value);
|
||||||
|
void setExtraData(string key, int value);
|
||||||
|
void setExtraData(string key, double value);
|
||||||
|
void setExtraData(string key, string value);
|
||||||
|
void resetExtraData(string key);
|
||||||
|
string getRewardCurrency(string placement);
|
||||||
|
double getRewardAmount(string placement);
|
||||||
|
string getRewardCurrency();
|
||||||
|
double getRewardAmount();
|
||||||
|
double getPredictedEcpm(int adTypes);
|
||||||
|
double getPredictedEcpmForPlacement(int adType, string placement);
|
||||||
|
void setTriggerOnLoadedOnPrecache(int adTypes, bool onLoadedTriggerBoth);
|
||||||
|
void setUserId(string id);
|
||||||
|
string getUserId();
|
||||||
|
long getSegmentId();
|
||||||
|
void trackInAppPurchase(double amount, string currency);
|
||||||
|
void setInterstitialCallbacks(IInterstitialAdListener listener);
|
||||||
|
void setRewardedVideoCallbacks(IRewardedVideoAdListener listener);
|
||||||
|
void setBannerCallbacks(IBannerAdListener listener);
|
||||||
|
void setMrecCallbacks(IMrecAdListener listener);
|
||||||
|
void setAdRevenueCallback(IAdRevenueListener listener);
|
||||||
|
void destroy(int adTypes);
|
||||||
|
void setUseSafeArea(bool value);
|
||||||
|
bool isAutoCacheEnabled(int adType);
|
||||||
|
void logEvent(string eventName, Dictionary<string, object> eventParams);
|
||||||
|
void validatePlayStoreInAppPurchase(IPlayStoreInAppPurchase purchase, IInAppPurchaseValidationListener listener);
|
||||||
|
void validateAppStoreInAppPurchase(IAppStoreInAppPurchase purchase, IInAppPurchaseValidationListener listener);
|
||||||
|
|
||||||
|
#region Deprecated signatures
|
||||||
|
|
||||||
|
void setSharedAdsInstanceAcrossActivities(bool value);
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
11
Assets/Appodeal/Common/Appodeal/IAppodealAdsClient.cs.meta
Normal file
11
Assets/Appodeal/Common/Appodeal/IAppodealAdsClient.cs.meta
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 0d45dae8ca00349059f33fb823bb283e
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics.CodeAnalysis;
|
||||||
|
|
||||||
|
namespace AppodealAds.Unity.Common
|
||||||
|
{
|
||||||
|
public interface IAppodealInitializationListener
|
||||||
|
{
|
||||||
|
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||||
|
[SuppressMessage("ReSharper", "UnusedMemberInSuper.Global")]
|
||||||
|
[SuppressMessage("ReSharper", "UnusedMember.Global")]
|
||||||
|
[SuppressMessage("ReSharper", "UnusedParameter.Global")]
|
||||||
|
void onInitializationFinished(List<string> errors);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 15002fc8e807d40a29672f293f73c425
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
18
Assets/Appodeal/Common/Appodeal/IBannerAdListener.cs
Normal file
18
Assets/Appodeal/Common/Appodeal/IBannerAdListener.cs
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
using System.Diagnostics.CodeAnalysis;
|
||||||
|
|
||||||
|
namespace AppodealAds.Unity.Common
|
||||||
|
{
|
||||||
|
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||||
|
[SuppressMessage("ReSharper", "UnusedMemberInSuper.Global")]
|
||||||
|
[SuppressMessage("ReSharper", "UnusedMember.Global")]
|
||||||
|
[SuppressMessage("ReSharper", "UnusedParameter.Global")]
|
||||||
|
public interface IBannerAdListener
|
||||||
|
{
|
||||||
|
void onBannerLoaded(int height, bool isPrecache);
|
||||||
|
void onBannerFailedToLoad();
|
||||||
|
void onBannerShown();
|
||||||
|
void onBannerShowFailed();
|
||||||
|
void onBannerClicked();
|
||||||
|
void onBannerExpired();
|
||||||
|
}
|
||||||
|
}
|
||||||
11
Assets/Appodeal/Common/Appodeal/IBannerAdListener.cs.meta
Normal file
11
Assets/Appodeal/Common/Appodeal/IBannerAdListener.cs.meta
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 3c523f46716394956be24ac369155edb
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
62
Assets/Appodeal/Common/Appodeal/IInAppPurchase.cs
Normal file
62
Assets/Appodeal/Common/Appodeal/IInAppPurchase.cs
Normal file
|
|
@ -0,0 +1,62 @@
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics.CodeAnalysis;
|
||||||
|
using AppodealAds.Unity.Api;
|
||||||
|
|
||||||
|
namespace AppodealAds.Unity.Common
|
||||||
|
{
|
||||||
|
public interface IInAppPurchaseBase
|
||||||
|
{
|
||||||
|
string getPrice();
|
||||||
|
string getCurrency();
|
||||||
|
string getAdditionalParameters();
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface IInAppPurchaseBaseBuilder
|
||||||
|
{
|
||||||
|
void withPrice(string price);
|
||||||
|
void withCurrency(string currency);
|
||||||
|
void withAdditionalParameters(Dictionary<string, string> additionalParameters);
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface IPlayStoreInAppPurchase : IInAppPurchaseBase
|
||||||
|
{
|
||||||
|
Appodeal.PlayStorePurchaseType getPurchaseType();
|
||||||
|
string getSku();
|
||||||
|
string getOrderId();
|
||||||
|
string getSignature();
|
||||||
|
string getPublicKey();
|
||||||
|
string getPurchaseData();
|
||||||
|
string getPurchaseToken();
|
||||||
|
string getDeveloperPayload();
|
||||||
|
long getPurchaseTimestamp();
|
||||||
|
IPlayStoreInAppPurchase NativeInAppPurchase { get; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface IPlayStoreInAppPurchaseBuilder : IInAppPurchaseBaseBuilder
|
||||||
|
{
|
||||||
|
void withSku(string sku);
|
||||||
|
void withOrderId(string orderId);
|
||||||
|
void withPublicKey(string publicKey);
|
||||||
|
void withSignature(string signature);
|
||||||
|
void withPurchaseData(string purchaseData);
|
||||||
|
void withPurchaseToken(string purchaseToken);
|
||||||
|
void withDeveloperPayload(string developerPayload);
|
||||||
|
void withPurchaseTimestamp(long purchaseTimestamp);
|
||||||
|
IPlayStoreInAppPurchase build();
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface IAppStoreInAppPurchase : IInAppPurchaseBase
|
||||||
|
{
|
||||||
|
Appodeal.AppStorePurchaseType getPurchaseType();
|
||||||
|
string getProductId();
|
||||||
|
string getTransactionId();
|
||||||
|
IAppStoreInAppPurchase NativeInAppPurchase { get; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface IAppStoreInAppPurchaseBuilder : IInAppPurchaseBaseBuilder
|
||||||
|
{
|
||||||
|
void withProductId(string productId);
|
||||||
|
void withTransactionId(string transactionId);
|
||||||
|
IAppStoreInAppPurchase build();
|
||||||
|
}
|
||||||
|
}
|
||||||
11
Assets/Appodeal/Common/Appodeal/IInAppPurchase.cs.meta
Normal file
11
Assets/Appodeal/Common/Appodeal/IInAppPurchase.cs.meta
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 72b801c20c7544e1fb74b1ba0cacf6f0
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
using System.Diagnostics.CodeAnalysis;
|
||||||
|
|
||||||
|
namespace AppodealAds.Unity.Common
|
||||||
|
{
|
||||||
|
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||||
|
[SuppressMessage("ReSharper", "UnusedMemberInSuper.Global")]
|
||||||
|
[SuppressMessage("ReSharper", "UnusedMember.Global")]
|
||||||
|
[SuppressMessage("ReSharper", "UnusedParameter.Global")]
|
||||||
|
public interface IInAppPurchaseValidationListener
|
||||||
|
{
|
||||||
|
void onInAppPurchaseValidationSucceeded(string json);
|
||||||
|
void onInAppPurchaseValidationFailed(string json);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 57ad42aab5dbf46d1a556bb9a145f682
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
19
Assets/Appodeal/Common/Appodeal/IInterstitialAdListener.cs
Normal file
19
Assets/Appodeal/Common/Appodeal/IInterstitialAdListener.cs
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
using System.Diagnostics.CodeAnalysis;
|
||||||
|
|
||||||
|
namespace AppodealAds.Unity.Common
|
||||||
|
{
|
||||||
|
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||||
|
[SuppressMessage("ReSharper", "UnusedMemberInSuper.Global")]
|
||||||
|
[SuppressMessage("ReSharper", "UnusedMember.Global")]
|
||||||
|
[SuppressMessage("ReSharper", "UnusedParameter.Global")]
|
||||||
|
public interface IInterstitialAdListener
|
||||||
|
{
|
||||||
|
void onInterstitialLoaded(bool isPrecache);
|
||||||
|
void onInterstitialFailedToLoad();
|
||||||
|
void onInterstitialShowFailed();
|
||||||
|
void onInterstitialShown();
|
||||||
|
void onInterstitialClosed();
|
||||||
|
void onInterstitialClicked();
|
||||||
|
void onInterstitialExpired();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: e84ede4c77b104546a6dc73eb1b3402c
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
18
Assets/Appodeal/Common/Appodeal/IMrecAdListener.cs
Normal file
18
Assets/Appodeal/Common/Appodeal/IMrecAdListener.cs
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
using System.Diagnostics.CodeAnalysis;
|
||||||
|
|
||||||
|
namespace AppodealAds.Unity.Common
|
||||||
|
{
|
||||||
|
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||||
|
[SuppressMessage("ReSharper", "UnusedMemberInSuper.Global")]
|
||||||
|
[SuppressMessage("ReSharper", "UnusedMember.Global")]
|
||||||
|
[SuppressMessage("ReSharper", "UnusedParameter.Global")]
|
||||||
|
public interface IMrecAdListener
|
||||||
|
{
|
||||||
|
void onMrecLoaded(bool isPrecache);
|
||||||
|
void onMrecFailedToLoad();
|
||||||
|
void onMrecShown();
|
||||||
|
void onMrecShowFailed();
|
||||||
|
void onMrecClicked();
|
||||||
|
void onMrecExpired();
|
||||||
|
}
|
||||||
|
}
|
||||||
11
Assets/Appodeal/Common/Appodeal/IMrecAdListener.cs.meta
Normal file
11
Assets/Appodeal/Common/Appodeal/IMrecAdListener.cs.meta
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: a7fedafa4546a4c6fbcd34cfb230392a
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
20
Assets/Appodeal/Common/Appodeal/IRewardedVideoAdListener.cs
Normal file
20
Assets/Appodeal/Common/Appodeal/IRewardedVideoAdListener.cs
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
using System.Diagnostics.CodeAnalysis;
|
||||||
|
|
||||||
|
namespace AppodealAds.Unity.Common
|
||||||
|
{
|
||||||
|
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||||
|
[SuppressMessage("ReSharper", "UnusedMemberInSuper.Global")]
|
||||||
|
[SuppressMessage("ReSharper", "UnusedMember.Global")]
|
||||||
|
[SuppressMessage("ReSharper", "UnusedParameter.Global")]
|
||||||
|
public interface IRewardedVideoAdListener
|
||||||
|
{
|
||||||
|
void onRewardedVideoLoaded(bool precache);
|
||||||
|
void onRewardedVideoFailedToLoad();
|
||||||
|
void onRewardedVideoShowFailed();
|
||||||
|
void onRewardedVideoShown();
|
||||||
|
void onRewardedVideoFinished(double amount, string name);
|
||||||
|
void onRewardedVideoClosed(bool finished);
|
||||||
|
void onRewardedVideoExpired();
|
||||||
|
void onRewardedVideoClicked();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: bfcaa2dbbdfb64ec3bb38107e982a867
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
8
Assets/Appodeal/Common/ConsentManager.meta
Normal file
8
Assets/Appodeal/Common/ConsentManager.meta
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: bb6a697bedaa8442c8ae8977dab40877
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
using System.Diagnostics.CodeAnalysis;
|
||||||
|
|
||||||
|
namespace ConsentManager.Common
|
||||||
|
{
|
||||||
|
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||||
|
[SuppressMessage("ReSharper", "UnusedMemberInSuper.Global")]
|
||||||
|
public interface IConsentFormListener
|
||||||
|
{
|
||||||
|
void onConsentFormLoaded();
|
||||||
|
void onConsentFormError(ConsentManagerException consentManagerException);
|
||||||
|
void onConsentFormOpened();
|
||||||
|
void onConsentFormClosed(Consent consent);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: d2a6d1e4a2dc04e4ba9bf43899ad6cea
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
using System.Diagnostics.CodeAnalysis;
|
||||||
|
|
||||||
|
namespace ConsentManager.Common
|
||||||
|
{
|
||||||
|
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||||
|
[SuppressMessage("ReSharper", "UnusedMemberInSuper.Global")]
|
||||||
|
public interface IConsentInfoUpdateListener
|
||||||
|
{
|
||||||
|
void onConsentInfoUpdated(Consent consent);
|
||||||
|
void onFailedToUpdateConsentInfo(ConsentManagerException error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 3e3b4501bed1e45b0b94b9e9bee9d78c
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
70
Assets/Appodeal/Common/ConsentManager/IConsentManager.cs
Normal file
70
Assets/Appodeal/Common/ConsentManager/IConsentManager.cs
Normal file
|
|
@ -0,0 +1,70 @@
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics.CodeAnalysis;
|
||||||
|
|
||||||
|
|
||||||
|
namespace ConsentManager.Common
|
||||||
|
{
|
||||||
|
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||||
|
[SuppressMessage("ReSharper", "UnusedParameter.Global")]
|
||||||
|
public interface IConsentManager
|
||||||
|
{
|
||||||
|
void requestConsentInfoUpdate(string appodealAppKey, IConsentInfoUpdateListener listener);
|
||||||
|
void setCustomVendor(Vendor customVendor);
|
||||||
|
Vendor getCustomVendor(string bundle);
|
||||||
|
ConsentManager.Storage getStorage();
|
||||||
|
void setStorage(ConsentManager.Storage iabStorage);
|
||||||
|
Consent.ShouldShow shouldShowConsentDialog();
|
||||||
|
Consent.Zone getConsentZone();
|
||||||
|
Consent.Status getConsentStatus();
|
||||||
|
Consent getConsent();
|
||||||
|
void disableAppTrackingTransparencyRequest();
|
||||||
|
}
|
||||||
|
|
||||||
|
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||||
|
public interface IConsentForm
|
||||||
|
{
|
||||||
|
void load();
|
||||||
|
void show();
|
||||||
|
bool isLoaded();
|
||||||
|
bool isShowing();
|
||||||
|
}
|
||||||
|
|
||||||
|
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||||
|
public interface IVendor
|
||||||
|
{
|
||||||
|
string getName();
|
||||||
|
string getBundle();
|
||||||
|
string getPolicyUrl();
|
||||||
|
List<int> getPurposeIds();
|
||||||
|
List<int> getFeatureIds();
|
||||||
|
List<int> getLegitimateInterestPurposeIds();
|
||||||
|
}
|
||||||
|
|
||||||
|
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||||
|
[SuppressMessage("ReSharper", "UnusedParameter.Global")]
|
||||||
|
public interface IVendorBuilder
|
||||||
|
{
|
||||||
|
IVendor build();
|
||||||
|
void setPurposeIds(IEnumerable<int> purposeIds);
|
||||||
|
void setFeatureIds(IEnumerable<int> featureIds);
|
||||||
|
void setLegitimateInterestPurposeIds(IEnumerable<int> legitimateInterestPurposeIds);
|
||||||
|
}
|
||||||
|
|
||||||
|
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||||
|
[SuppressMessage("ReSharper", "UnusedParameter.Global")]
|
||||||
|
public interface IConsent
|
||||||
|
{
|
||||||
|
Consent.Zone getZone();
|
||||||
|
Consent.Status getStatus();
|
||||||
|
Consent.AuthorizationStatus getAuthorizationStatus();
|
||||||
|
Consent.HasConsent hasConsentForVendor(string bundle);
|
||||||
|
string getIabConsentString();
|
||||||
|
}
|
||||||
|
|
||||||
|
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||||
|
public interface IConsentManagerException
|
||||||
|
{
|
||||||
|
string getReason();
|
||||||
|
int getCode();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: a4f071b2c746a4e96802d9d255b1a7f6
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
8
Assets/Appodeal/Demo.meta
Normal file
8
Assets/Appodeal/Demo.meta
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 2f3aec5901bed48c5b00b5001e20e083
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
8
Assets/Appodeal/Demo/Scenes.meta
Normal file
8
Assets/Appodeal/Demo/Scenes.meta
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 52489c8c8d0a043b9b10a32e18dc5b27
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
7571
Assets/Appodeal/Demo/Scenes/AppodealDemoScene.unity
Normal file
7571
Assets/Appodeal/Demo/Scenes/AppodealDemoScene.unity
Normal file
File diff suppressed because it is too large
Load Diff
7
Assets/Appodeal/Demo/Scenes/AppodealDemoScene.unity.meta
Normal file
7
Assets/Appodeal/Demo/Scenes/AppodealDemoScene.unity.meta
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 2ad88b269161f4e84aad9fcef055bf58
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -0,0 +1,66 @@
|
||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!850595691 &4890085278179872738
|
||||||
|
LightingSettings:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: AppodealDemoSceneSettings
|
||||||
|
serializedVersion: 6
|
||||||
|
m_GIWorkflowMode: 0
|
||||||
|
m_EnableBakedLightmaps: 1
|
||||||
|
m_EnableRealtimeLightmaps: 0
|
||||||
|
m_RealtimeEnvironmentLighting: 1
|
||||||
|
m_BounceScale: 1
|
||||||
|
m_AlbedoBoost: 1
|
||||||
|
m_IndirectOutputScale: 1
|
||||||
|
m_UsingShadowmask: 1
|
||||||
|
m_BakeBackend: 1
|
||||||
|
m_LightmapMaxSize: 1024
|
||||||
|
m_BakeResolution: 10
|
||||||
|
m_Padding: 2
|
||||||
|
m_LightmapCompression: 3
|
||||||
|
m_AO: 0
|
||||||
|
m_AOMaxDistance: 1
|
||||||
|
m_CompAOExponent: 1
|
||||||
|
m_CompAOExponentDirect: 0
|
||||||
|
m_ExtractAO: 0
|
||||||
|
m_MixedBakeMode: 2
|
||||||
|
m_LightmapsBakeMode: 1
|
||||||
|
m_FilterMode: 1
|
||||||
|
m_LightmapParameters: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0}
|
||||||
|
m_ExportTrainingData: 0
|
||||||
|
m_TrainingDataDestination: TrainingData
|
||||||
|
m_RealtimeResolution: 2
|
||||||
|
m_ForceWhiteAlbedo: 0
|
||||||
|
m_ForceUpdates: 0
|
||||||
|
m_FinalGather: 0
|
||||||
|
m_FinalGatherRayCount: 256
|
||||||
|
m_FinalGatherFiltering: 1
|
||||||
|
m_PVRCulling: 1
|
||||||
|
m_PVRSampling: 1
|
||||||
|
m_PVRDirectSampleCount: 32
|
||||||
|
m_PVRSampleCount: 256
|
||||||
|
m_PVREnvironmentSampleCount: 256
|
||||||
|
m_PVREnvironmentReferencePointCount: 2048
|
||||||
|
m_LightProbeSampleCountMultiplier: 4
|
||||||
|
m_PVRBounces: 2
|
||||||
|
m_PVRMinBounces: 2
|
||||||
|
m_PVREnvironmentImportanceSampling: 0
|
||||||
|
m_PVRFilteringMode: 2
|
||||||
|
m_PVRDenoiserTypeDirect: 0
|
||||||
|
m_PVRDenoiserTypeIndirect: 0
|
||||||
|
m_PVRDenoiserTypeAO: 0
|
||||||
|
m_PVRFilterTypeDirect: 0
|
||||||
|
m_PVRFilterTypeIndirect: 0
|
||||||
|
m_PVRFilterTypeAO: 0
|
||||||
|
m_PVRFilteringGaussRadiusDirect: 1
|
||||||
|
m_PVRFilteringGaussRadiusIndirect: 5
|
||||||
|
m_PVRFilteringGaussRadiusAO: 2
|
||||||
|
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
|
||||||
|
m_PVRFilteringAtrousPositionSigmaIndirect: 2
|
||||||
|
m_PVRFilteringAtrousPositionSigmaAO: 1
|
||||||
|
m_PVRTiledBaking: 0
|
||||||
|
m_NumRaysToShootPerTexel: -1
|
||||||
|
m_RespectSceneVisibilityWhenBakingGI: 0
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 70b2daef1c1b26d40ad26746d8e87f43
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 4890085278179872738
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
8
Assets/Appodeal/Demo/Scripts.meta
Normal file
8
Assets/Appodeal/Demo/Scripts.meta
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 22c314f3a6094434297695ee0a52cce8
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
625
Assets/Appodeal/Demo/Scripts/AppodealDemo.cs
Normal file
625
Assets/Appodeal/Demo/Scripts/AppodealDemo.cs
Normal file
|
|
@ -0,0 +1,625 @@
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics.CodeAnalysis;
|
||||||
|
using AppodealAds.Unity.Api;
|
||||||
|
using AppodealAds.Unity.Common;
|
||||||
|
using ConsentManager.Common;
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEngine.UI;
|
||||||
|
|
||||||
|
namespace ConsentManager.ConsentManagerDemo.Scripts
|
||||||
|
{
|
||||||
|
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||||
|
[SuppressMessage("ReSharper", "ParameterHidesMember")]
|
||||||
|
public class AppodealDemo : MonoBehaviour, IAppodealInitializationListener, IInAppPurchaseValidationListener,
|
||||||
|
IBannerAdListener, IInterstitialAdListener, IRewardedVideoAdListener, IMrecAdListener,
|
||||||
|
IConsentFormListener, IConsentInfoUpdateListener, IAdRevenueListener
|
||||||
|
{
|
||||||
|
#region Constants
|
||||||
|
|
||||||
|
private const string CACHE_INTERSTITIAL = "CACHE INTERSTITIAL";
|
||||||
|
private const string SHOW_INTERSTITIAL = "SHOW INTERSTITIAL";
|
||||||
|
private const string CACHE_REWARDED_VIDEO = "CACHE REWARDED VIDEO";
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region UI
|
||||||
|
|
||||||
|
[SerializeField] public Toggle tgTesting;
|
||||||
|
[SerializeField] public Toggle tgLogging;
|
||||||
|
[SerializeField] public Button btnShowInterstitial;
|
||||||
|
[SerializeField] public Button btnShowRewardedVideo;
|
||||||
|
[SerializeField] public GameObject consentManagerPanel;
|
||||||
|
[SerializeField] public GameObject appodealPanel;
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Application keys
|
||||||
|
|
||||||
|
#if UNITY_EDITOR && !UNITY_ANDROID && !UNITY_IPHONE
|
||||||
|
public static string appKey = "";
|
||||||
|
#elif UNITY_ANDROID
|
||||||
|
public static string appKey = "fee50c333ff3825fd6ad6d38cff78154de3025546d47a84f";
|
||||||
|
#elif UNITY_IPHONE
|
||||||
|
public static string appKey = "466de0d625e01e8811c588588a42a55970bc7c132649eede";
|
||||||
|
#else
|
||||||
|
public static string appKey = "";
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private Consent currentConsent;
|
||||||
|
private ConsentForm consentForm;
|
||||||
|
private ConsentManager consentManager;
|
||||||
|
|
||||||
|
private void Start()
|
||||||
|
{
|
||||||
|
consentManagerPanel.gameObject.SetActive(true);
|
||||||
|
appodealPanel.gameObject.SetActive(false);
|
||||||
|
|
||||||
|
btnShowInterstitial.GetComponentInChildren<Text>().text = CACHE_INTERSTITIAL;
|
||||||
|
btnShowRewardedVideo.GetComponentInChildren<Text>().text = CACHE_REWARDED_VIDEO;
|
||||||
|
|
||||||
|
consentManager = ConsentManager.getInstance();
|
||||||
|
consentManager.setStorage(ConsentManager.Storage.SHARED_PREFERENCE);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnDestroy()
|
||||||
|
{
|
||||||
|
Appodeal.destroy(Appodeal.BANNER);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void RequestConsentInfoUpdate()
|
||||||
|
{
|
||||||
|
consentManager?.requestConsentInfoUpdate(appKey, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetCustomVendor()
|
||||||
|
{
|
||||||
|
var customVendor = new Vendor.Builder(
|
||||||
|
"Appodeal Test",
|
||||||
|
"com.appodeal.test",
|
||||||
|
"https://customvendor.com")
|
||||||
|
.setPurposeIds(new List<int> {100, 200, 300})
|
||||||
|
.setFeatureIds(new List<int> {400, 500, 600})
|
||||||
|
.setLegitimateInterestPurposeIds(new List<int> {700, 800, 900})
|
||||||
|
.build();
|
||||||
|
|
||||||
|
consentManager?.setCustomVendor(customVendor);
|
||||||
|
|
||||||
|
var vendor = consentManager?.getCustomVendor("com.appodeal.test");
|
||||||
|
if (vendor == null) return;
|
||||||
|
Debug.Log("Vendor getName: " + vendor.getName());
|
||||||
|
Debug.Log("Vendor getBundle: " + vendor.getBundle());
|
||||||
|
Debug.Log("Vendor getPolicyUrl: " + vendor.getPolicyUrl());
|
||||||
|
foreach (var purposeId in vendor.getPurposeIds())
|
||||||
|
{
|
||||||
|
Debug.Log("Vendor getPurposeIds: " + purposeId);
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (var featureId in vendor.getFeatureIds())
|
||||||
|
{
|
||||||
|
Debug.Log("Vendor getFeatureIds: " + featureId);
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (var legitimateInterestPurposeId in vendor.getLegitimateInterestPurposeIds())
|
||||||
|
{
|
||||||
|
Debug.Log("Vendor getLegitimateInterestPurposeIds: " + legitimateInterestPurposeId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ShouldShowForm()
|
||||||
|
{
|
||||||
|
Debug.Log("shouldShowConsentDialog: " + consentManager.shouldShowConsentDialog());
|
||||||
|
}
|
||||||
|
|
||||||
|
public void GetConsentZone()
|
||||||
|
{
|
||||||
|
Debug.Log("getConsentZone: " + consentManager.getConsentZone());
|
||||||
|
}
|
||||||
|
|
||||||
|
public void GetConsentStatus()
|
||||||
|
{
|
||||||
|
Debug.Log("getConsentStatus: " + consentManager.getConsentStatus());
|
||||||
|
}
|
||||||
|
|
||||||
|
public void LoadConsentForm()
|
||||||
|
{
|
||||||
|
consentForm = ConsentForm.GetInstance(this);
|
||||||
|
consentForm?.load();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void IsLoadedConsentForm()
|
||||||
|
{
|
||||||
|
if (consentForm != null)
|
||||||
|
{
|
||||||
|
Debug.Log("isLoadedConsentForm: " + consentForm.isLoaded());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ShowFormAsActivity()
|
||||||
|
{
|
||||||
|
if (consentForm != null)
|
||||||
|
{
|
||||||
|
consentForm.show();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Debug.Log("showForm - false");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ShowFormAsDialog()
|
||||||
|
{
|
||||||
|
if (consentForm != null)
|
||||||
|
{
|
||||||
|
consentForm.show();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Debug.Log("showForm - false");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void PrintIABString()
|
||||||
|
{
|
||||||
|
Debug.Log("Consent IAB String is: " + consentManager.getConsent().getIabConsentString());
|
||||||
|
}
|
||||||
|
|
||||||
|
public void PrintCurrentConsent()
|
||||||
|
{
|
||||||
|
if (consentManager.getConsent() == null) return;
|
||||||
|
Debug.Log("consent.hasConsentForVendor() - " + consentManager.getConsent().hasConsentForVendor("com.appodeal.test"));
|
||||||
|
Debug.Log("consent.getStatus() - " + consentManager.getConsent().getStatus());
|
||||||
|
Debug.Log("consent.getZone() - " + consentManager.getConsent().getZone());
|
||||||
|
}
|
||||||
|
|
||||||
|
public void PrintAuthorizationStatus()
|
||||||
|
{
|
||||||
|
if (consentManager.getConsent() == null) return;
|
||||||
|
Debug.Log($"AuthorizationStatus - {consentManager.getConsent().getAuthorizationStatus()} ");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ShowAppodealLogic()
|
||||||
|
{
|
||||||
|
consentManagerPanel.SetActive(false);
|
||||||
|
appodealPanel.SetActive(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Initialize()
|
||||||
|
{
|
||||||
|
InitWithConsent(currentConsent != null);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void InitWithConsent(bool isConsent)
|
||||||
|
{
|
||||||
|
Appodeal.setLogLevel(tgLogging.isOn ? Appodeal.LogLevel.Verbose : Appodeal.LogLevel.None);
|
||||||
|
Appodeal.setTesting(tgTesting.isOn);
|
||||||
|
Appodeal.setUseSafeArea(true);
|
||||||
|
|
||||||
|
Appodeal.setUserId("1");
|
||||||
|
Appodeal.setCustomFilter(UserSettings.USER_AGE, 18);
|
||||||
|
Appodeal.setCustomFilter(UserSettings.USER_GENDER, (int) UserSettings.Gender.MALE);
|
||||||
|
|
||||||
|
Appodeal.setExtraData("testKey", "testValue");
|
||||||
|
Appodeal.resetExtraData("testKey");
|
||||||
|
|
||||||
|
Appodeal.setSmartBanners(true);
|
||||||
|
Appodeal.setBannerAnimation(false);
|
||||||
|
Appodeal.setTabletBanners(false);
|
||||||
|
Appodeal.setBannerRotation(-90, 110);
|
||||||
|
|
||||||
|
Appodeal.disableLocationPermissionCheck();
|
||||||
|
Appodeal.setChildDirectedTreatment(false);
|
||||||
|
Appodeal.muteVideosIfCallsMuted(true);
|
||||||
|
|
||||||
|
Appodeal.setTriggerOnLoadedOnPrecache(Appodeal.INTERSTITIAL, true);
|
||||||
|
|
||||||
|
Appodeal.disableNetwork(AppodealNetworks.VUNGLE);
|
||||||
|
Appodeal.disableNetwork(AppodealNetworks.YANDEX, Appodeal.MREC);
|
||||||
|
|
||||||
|
Appodeal.setAutoCache(Appodeal.INTERSTITIAL, false);
|
||||||
|
Appodeal.setAutoCache(Appodeal.REWARDED_VIDEO, false);
|
||||||
|
|
||||||
|
Appodeal.setBannerCallbacks(this);
|
||||||
|
Appodeal.setInterstitialCallbacks(this);
|
||||||
|
Appodeal.setRewardedVideoCallbacks(this);
|
||||||
|
Appodeal.setMrecCallbacks(this);
|
||||||
|
Appodeal.setAdRevenueCallback(this);
|
||||||
|
|
||||||
|
Appodeal.setCustomFilter("newBoolean", true);
|
||||||
|
Appodeal.setCustomFilter("newInt", 1234567890);
|
||||||
|
Appodeal.setCustomFilter("newDouble", 123.123456789);
|
||||||
|
Appodeal.setCustomFilter("newString", "newStringFromSDK");
|
||||||
|
|
||||||
|
if (isConsent)
|
||||||
|
{
|
||||||
|
Appodeal.updateConsent(currentConsent);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Appodeal.updateCcpaConsent(Appodeal.CcpaUserConsent.OptOut);
|
||||||
|
Appodeal.updateGdprConsent(Appodeal.GdprUserConsent.NonPersonalized);
|
||||||
|
}
|
||||||
|
|
||||||
|
int adTypes = Appodeal.INTERSTITIAL | Appodeal.BANNER | Appodeal.REWARDED_VIDEO | Appodeal.MREC;
|
||||||
|
Appodeal.initialize(appKey, adTypes, (IAppodealInitializationListener) this);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ShowInterstitial()
|
||||||
|
{
|
||||||
|
if (Appodeal.isLoaded(Appodeal.INTERSTITIAL) && Appodeal.canShow(Appodeal.INTERSTITIAL, "default") && !Appodeal.isPrecache(Appodeal.INTERSTITIAL))
|
||||||
|
{
|
||||||
|
Appodeal.show(Appodeal.INTERSTITIAL);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Appodeal.cache(Appodeal.INTERSTITIAL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ShowRewardedVideo()
|
||||||
|
{
|
||||||
|
if (Appodeal.isLoaded(Appodeal.REWARDED_VIDEO) && Appodeal.canShow(Appodeal.REWARDED_VIDEO, "default"))
|
||||||
|
{
|
||||||
|
Appodeal.show(Appodeal.REWARDED_VIDEO);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Appodeal.cache(Appodeal.REWARDED_VIDEO);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ShowBannerBottom()
|
||||||
|
{
|
||||||
|
Appodeal.show(Appodeal.BANNER_BOTTOM, "default");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ShowBannerTop()
|
||||||
|
{
|
||||||
|
Appodeal.show(Appodeal.BANNER_TOP, "default");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void HideBanner()
|
||||||
|
{
|
||||||
|
Appodeal.hide(Appodeal.BANNER);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ShowBannerView()
|
||||||
|
{
|
||||||
|
Appodeal.showBannerView(Appodeal.BANNER_BOTTOM, Appodeal.BANNER_HORIZONTAL_CENTER, "default");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void HideBannerView()
|
||||||
|
{
|
||||||
|
Appodeal.hideBannerView();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ShowMrecView()
|
||||||
|
{
|
||||||
|
Appodeal.showMrecView(Appodeal.BANNER_TOP, Appodeal.BANNER_HORIZONTAL_CENTER, "default");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void HideMrecView()
|
||||||
|
{
|
||||||
|
Appodeal.hideMrecView();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ShowBannerLeft()
|
||||||
|
{
|
||||||
|
Appodeal.show(Appodeal.BANNER_LEFT);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ShowBannerRight()
|
||||||
|
{
|
||||||
|
Appodeal.show(Appodeal.BANNER_RIGHT);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region AppodealInitializeListener
|
||||||
|
|
||||||
|
public void onInitializationFinished(List<string> errors)
|
||||||
|
{
|
||||||
|
string output = errors == null ? string.Empty : string.Join(", ", errors);
|
||||||
|
Debug.Log($"onInitializationFinished(errors:[{output}])");
|
||||||
|
|
||||||
|
Debug.Log($"isAutoCacheEnabled() for banner: {Appodeal.isAutoCacheEnabled(Appodeal.BANNER)}");
|
||||||
|
Debug.Log($"isInitialized() for banner: {Appodeal.isInitialized(Appodeal.BANNER)}");
|
||||||
|
Debug.Log($"isSmartBannersEnabled(): {Appodeal.isSmartBannersEnabled()}");
|
||||||
|
Debug.Log($"getUserId(): {Appodeal.getUserId()}");
|
||||||
|
Debug.Log($"getSegmentId(): {Appodeal.getSegmentId()}");
|
||||||
|
Debug.Log($"getRewardParameters(): {Appodeal.getRewardParameters()}");
|
||||||
|
Debug.Log($"getNativeSDKVersion(): {Appodeal.getNativeSDKVersion()}");
|
||||||
|
|
||||||
|
var networksList = Appodeal.getNetworks(Appodeal.REWARDED_VIDEO);
|
||||||
|
output = networksList == null ? string.Empty : string.Join(", ", (networksList.ToArray()));
|
||||||
|
Debug.Log($"getNetworks() for RV: {output}");
|
||||||
|
|
||||||
|
#if UNITY_ANDROID
|
||||||
|
var additionalParams = new Dictionary<string, string> { { "key1", "value1" }, { "key2", "value2" } };
|
||||||
|
|
||||||
|
var purchase = new PlayStoreInAppPurchase.Builder(Appodeal.PlayStorePurchaseType.Subs)
|
||||||
|
.withAdditionalParameters(additionalParams)
|
||||||
|
.withPurchaseTimestamp(793668600)
|
||||||
|
.withDeveloperPayload("payload")
|
||||||
|
.withPurchaseToken("token")
|
||||||
|
.withPurchaseData("data")
|
||||||
|
.withPublicKey("key")
|
||||||
|
.withSignature("signature")
|
||||||
|
.withCurrency("USD")
|
||||||
|
.withOrderId("orderId")
|
||||||
|
.withPrice("1.99")
|
||||||
|
.withSku("sku")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
Appodeal.validatePlayStoreInAppPurchase(purchase, this);
|
||||||
|
#elif UNITY_IOS
|
||||||
|
var additionalParams = new Dictionary<string, string> { { "key1", "value1" }, { "key2", "value2" } };
|
||||||
|
|
||||||
|
var purchase = new AppStoreInAppPurchase.Builder(Appodeal.AppStorePurchaseType.Consumable)
|
||||||
|
.withAdditionalParameters(additionalParams)
|
||||||
|
.withTransactionId("transactionId")
|
||||||
|
.withProductId("productId")
|
||||||
|
.withCurrency("USD")
|
||||||
|
.withPrice("2.89")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
Appodeal.validateAppStoreInAppPurchase(purchase, this);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
Appodeal.logEvent("test_event", new Dictionary<string, object> { { "test_key_1", 42 }, { "test_key_2", "test_value" } });
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region InAppPurchaseValidationListener
|
||||||
|
|
||||||
|
public void onInAppPurchaseValidationSucceeded(string json)
|
||||||
|
{
|
||||||
|
Debug.Log($"onInAppPurchaseValidationSucceeded(string json:\n{json})");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onInAppPurchaseValidationFailed(string json)
|
||||||
|
{
|
||||||
|
Debug.Log($"onInAppPurchaseValidationFailed(string json:\n{json})");
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region ConsentFormListener
|
||||||
|
|
||||||
|
public void onConsentFormLoaded()
|
||||||
|
{
|
||||||
|
Debug.Log("ConsentFormListener - onConsentFormLoaded");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onConsentFormError(ConsentManagerException exception)
|
||||||
|
{
|
||||||
|
Debug.Log($"ConsentFormListener - onConsentFormError, reason - {exception.getReason()}");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onConsentFormOpened()
|
||||||
|
{
|
||||||
|
Debug.Log("ConsentFormListener - onConsentFormOpened");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onConsentFormClosed(Consent consent)
|
||||||
|
{
|
||||||
|
currentConsent = consent;
|
||||||
|
Debug.Log($"ConsentFormListener - onConsentFormClosed, consentStatus - {consent.getStatus()}");
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region ConsentInfoUpdateListener
|
||||||
|
|
||||||
|
public void onConsentInfoUpdated(Consent consent)
|
||||||
|
{
|
||||||
|
currentConsent = consent;
|
||||||
|
Debug.Log("onConsentInfoUpdated");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onFailedToUpdateConsentInfo(ConsentManagerException error)
|
||||||
|
{
|
||||||
|
Debug.Log($"onFailedToUpdateConsentInfo");
|
||||||
|
|
||||||
|
if (error == null) return;
|
||||||
|
Debug.Log($"onFailedToUpdateConsentInfo Reason: {error.getReason()}");
|
||||||
|
|
||||||
|
switch (error.getCode())
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
Debug.Log("onFailedToUpdateConsentInfo - UNKNOWN");
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
Debug.Log(
|
||||||
|
"onFailedToUpdateConsentInfo - INTERNAL - Error on SDK side. Includes JS-bridge or encoding/decoding errors");
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
Debug.Log("onFailedToUpdateConsentInfo - NETWORKING - HTTP errors, parse request/response ");
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
Debug.Log("onFailedToUpdateConsentInfo - INCONSISTENT - Incorrect SDK API usage");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Banner callback handlers
|
||||||
|
|
||||||
|
public void onBannerLoaded(int height, bool precache)
|
||||||
|
{
|
||||||
|
Debug.Log("onBannerLoaded");
|
||||||
|
Debug.Log($"Banner height - {height}");
|
||||||
|
Debug.Log($"Banner precache - {precache}");
|
||||||
|
Debug.Log($"getPredictedEcpm(): {Appodeal.getPredictedEcpm(Appodeal.BANNER)}");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onBannerFailedToLoad()
|
||||||
|
{
|
||||||
|
Debug.Log("onBannerFailedToLoad");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onBannerShown()
|
||||||
|
{
|
||||||
|
Debug.Log("onBannerShown");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onBannerShowFailed()
|
||||||
|
{
|
||||||
|
Debug.Log("onBannerShowFailed");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onBannerClicked()
|
||||||
|
{
|
||||||
|
Debug.Log("onBannerClicked");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onBannerExpired()
|
||||||
|
{
|
||||||
|
Debug.Log("onBannerExpired");
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Interstitial callback handlers
|
||||||
|
|
||||||
|
public void onInterstitialLoaded(bool isPrecache)
|
||||||
|
{
|
||||||
|
if (!isPrecache)
|
||||||
|
{
|
||||||
|
btnShowInterstitial.GetComponentInChildren<Text>().text = SHOW_INTERSTITIAL;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Debug.Log("Appodeal. Interstitial loaded. isPrecache - true");
|
||||||
|
}
|
||||||
|
|
||||||
|
Debug.Log("onInterstitialLoaded");
|
||||||
|
Debug.Log($"getPredictedEcpm(): {Appodeal.getPredictedEcpm(Appodeal.INTERSTITIAL)}");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onInterstitialFailedToLoad()
|
||||||
|
{
|
||||||
|
Debug.Log("onInterstitialFailedToLoad");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onInterstitialShowFailed()
|
||||||
|
{
|
||||||
|
Debug.Log("onInterstitialShowFailed");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onInterstitialShown()
|
||||||
|
{
|
||||||
|
Debug.Log("onInterstitialShown");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onInterstitialClosed()
|
||||||
|
{
|
||||||
|
btnShowInterstitial.GetComponentInChildren<Text>().text = CACHE_INTERSTITIAL;
|
||||||
|
Debug.Log("onInterstitialClosed");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onInterstitialClicked()
|
||||||
|
{
|
||||||
|
Debug.Log("onInterstitialClicked");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onInterstitialExpired()
|
||||||
|
{
|
||||||
|
Debug.Log("onInterstitialExpired");
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Rewarded Video callback handlers
|
||||||
|
|
||||||
|
public void onRewardedVideoLoaded(bool isPrecache)
|
||||||
|
{
|
||||||
|
btnShowRewardedVideo.GetComponentInChildren<Text>().text = "SHOW REWARDED VIDEO";
|
||||||
|
Debug.Log("onRewardedVideoLoaded");
|
||||||
|
Debug.Log($"getPredictedEcpm(): {Appodeal.getPredictedEcpm(Appodeal.REWARDED_VIDEO)}");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onRewardedVideoFailedToLoad()
|
||||||
|
{
|
||||||
|
Debug.Log("onRewardedVideoFailedToLoad");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onRewardedVideoShowFailed()
|
||||||
|
{
|
||||||
|
Debug.Log("onRewardedVideoShowFailed");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onRewardedVideoShown()
|
||||||
|
{
|
||||||
|
Debug.Log("onRewardedVideoShown");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onRewardedVideoClosed(bool finished)
|
||||||
|
{
|
||||||
|
btnShowRewardedVideo.GetComponentInChildren<Text>().text = "CACHE REWARDED VIDEO";
|
||||||
|
Debug.Log($"onRewardedVideoClosed. Finished - {finished}");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onRewardedVideoFinished(double amount, string name)
|
||||||
|
{
|
||||||
|
Debug.Log("onRewardedVideoFinished. Reward: " + amount + " " + name);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onRewardedVideoExpired()
|
||||||
|
{
|
||||||
|
Debug.Log("onRewardedVideoExpired");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onRewardedVideoClicked()
|
||||||
|
{
|
||||||
|
Debug.Log("onRewardedVideoClicked");
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Mrec callback handlers
|
||||||
|
|
||||||
|
public void onMrecLoaded(bool precache)
|
||||||
|
{
|
||||||
|
Debug.Log($"onMrecLoaded. Precache - {precache}");
|
||||||
|
Debug.Log($"getPredictedEcpm(): {Appodeal.getPredictedEcpm(Appodeal.MREC)}");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onMrecFailedToLoad()
|
||||||
|
{
|
||||||
|
Debug.Log("onMrecFailedToLoad");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onMrecShown()
|
||||||
|
{
|
||||||
|
Debug.Log("onMrecShown");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onMrecShowFailed()
|
||||||
|
{
|
||||||
|
Debug.Log("onMrecShowFailed");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onMrecClicked()
|
||||||
|
{
|
||||||
|
Debug.Log("onMrecClicked");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onMrecExpired()
|
||||||
|
{
|
||||||
|
Debug.Log("onMrecExpired");
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region IAdRevenueListener implementation
|
||||||
|
|
||||||
|
public void onAdRevenueReceived(AppodealAdRevenue ad)
|
||||||
|
{
|
||||||
|
Debug.Log($"[APDUnity] [Callback] onAdRevenueReceived({ad.ToJsonString(true)})");
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
11
Assets/Appodeal/Demo/Scripts/AppodealDemo.cs.meta
Normal file
11
Assets/Appodeal/Demo/Scripts/AppodealDemo.cs.meta
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: ffb831a105b614dd1bd2adbfcd130c78
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
9
Assets/Appodeal/Editor.meta
Normal file
9
Assets/Appodeal/Editor.meta
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: c1038daf12b2c471fbc6c2c233f84cad
|
||||||
|
folderAsset: yes
|
||||||
|
timeCreated: 1530702704
|
||||||
|
licenseType: Free
|
||||||
|
DefaultImporter:
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
8
Assets/Appodeal/Editor/Checkers.meta
Normal file
8
Assets/Appodeal/Editor/Checkers.meta
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 9aebd6607e7d446bfb67ef2569e87b08
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
56
Assets/Appodeal/Editor/Checkers/CheckerWindow.cs
Normal file
56
Assets/Appodeal/Editor/Checkers/CheckerWindow.cs
Normal file
|
|
@ -0,0 +1,56 @@
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics.CodeAnalysis;
|
||||||
|
using UnityEditor;
|
||||||
|
|
||||||
|
namespace AppodealAds.Unity.Editor.Checkers
|
||||||
|
{
|
||||||
|
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||||
|
public class FixProblemInstruction
|
||||||
|
{
|
||||||
|
private bool _checkedForResolve;
|
||||||
|
|
||||||
|
public bool checkedForResolve
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return _checkedForResolve;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (isAutoresolvePossible) _checkedForResolve = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private readonly string desc;
|
||||||
|
private readonly bool isAutoresolvePossible;
|
||||||
|
|
||||||
|
public FixProblemInstruction(string description, bool autoresolve)
|
||||||
|
{
|
||||||
|
desc = description;
|
||||||
|
isAutoresolvePossible = autoresolve;
|
||||||
|
}
|
||||||
|
|
||||||
|
public string getDescription()
|
||||||
|
{
|
||||||
|
return desc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool canBeResolvedAutomatically()
|
||||||
|
{
|
||||||
|
return isAutoresolvePossible;
|
||||||
|
}
|
||||||
|
|
||||||
|
public virtual void fixProblem()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||||
|
public abstract class CheckingStep
|
||||||
|
{
|
||||||
|
public bool done;
|
||||||
|
public abstract string getName();
|
||||||
|
public abstract List<FixProblemInstruction> check();
|
||||||
|
public abstract bool isRequiredForPlatform(BuildTarget target);
|
||||||
|
}
|
||||||
|
}
|
||||||
11
Assets/Appodeal/Editor/Checkers/CheckerWindow.cs.meta
Normal file
11
Assets/Appodeal/Editor/Checkers/CheckerWindow.cs.meta
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: aff991977bdce4cca8d7e82c73b39460
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
533
Assets/Appodeal/Editor/Checkers/MultidexActivator.cs
Normal file
533
Assets/Appodeal/Editor/Checkers/MultidexActivator.cs
Normal file
|
|
@ -0,0 +1,533 @@
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEditor;
|
||||||
|
using System.IO;
|
||||||
|
using System;
|
||||||
|
using System.Xml;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics.CodeAnalysis;
|
||||||
|
using Debug = System.Diagnostics.Debug;
|
||||||
|
using AppodealAds.Unity.Editor.Utils;
|
||||||
|
|
||||||
|
|
||||||
|
namespace AppodealAds.Unity.Editor.Checkers
|
||||||
|
{
|
||||||
|
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||||
|
public class MultidexActivator : CheckingStep
|
||||||
|
{
|
||||||
|
#region Constants
|
||||||
|
|
||||||
|
//Templates in Unity Editor Data folder
|
||||||
|
private const string gradleDefaultTemplatePath = "PlaybackEngines/AndroidPlayer/Tools/GradleTemplates";
|
||||||
|
public const string manifestDefaultTemplatePath = "PlaybackEngines/AndroidPlayer/Apk/AndroidManifest.xml";
|
||||||
|
|
||||||
|
//Paths without leading Assets folder
|
||||||
|
public const string androidPluginsPath = "Plugins/Android";
|
||||||
|
public const string gradleTemplateName = "mainTemplate.gradle";
|
||||||
|
public const string manifestTemplateName = "AndroidManifest.xml";
|
||||||
|
public const string appodealTemplatesPath = "Appodeal/InternalResources";
|
||||||
|
private const string appodealDexesPath = "Assets/Plugins/Android/appodeal/assets/dex";
|
||||||
|
|
||||||
|
//Gradle search lines
|
||||||
|
public const string GRADLE_GOOGLE_REPOSITORY = "google()";
|
||||||
|
public const string GRADLE_GOOGLE_REPOSITORY_COMPAT = "maven { url \"https://maven.google.com\" }";
|
||||||
|
public const string GRADLE_DEPENDENCIES = "**DEPS**";
|
||||||
|
public const string GRADLE_APP_ID = "**APPLICATIONID**";
|
||||||
|
public const string GRADLE_USE_PROGUARD = "useProguard";
|
||||||
|
public const string GRADLE_MULTIDEX_DEPENDENCY_WO_VERSION = "androidx.multidex:multidex:";
|
||||||
|
public const string GRAFLE_DEFAULT_CONFIG = "defaultConfig";
|
||||||
|
public const string COMPILE_OPTIONS = "compileOptions {";
|
||||||
|
public const string GRADLE_JAVA_VERSION_1_8 = "JavaVersion.VERSION_1_8";
|
||||||
|
public const string GRADLE_SOURCE_CAPABILITY = "sourceCompatibility ";
|
||||||
|
public const string GRADLE_TARGET_CAPATILITY = "targetCompatibility ";
|
||||||
|
|
||||||
|
//Gradle add lines
|
||||||
|
public const string GRADLE_COMPILE = "compile ";
|
||||||
|
public const string GRADLE_IMPLEMENTATION = "implementation ";
|
||||||
|
public const string GRADLE_MULTIDEX_DEPENDENCY = "'androidx.multidex:multidex:2.0.1'";
|
||||||
|
public const string GRADLE_MULTIDEX_ENABLE = "multiDexEnabled true";
|
||||||
|
|
||||||
|
//Manifest add lines
|
||||||
|
public const string manifestMutlidexApp = "androidx.multidex.MultiDexApplication";
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
public override string getName()
|
||||||
|
{
|
||||||
|
return "Android Multidex Settings";
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool isRequiredForPlatform(BuildTarget target)
|
||||||
|
{
|
||||||
|
return target == BuildTarget.Android;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override List<FixProblemInstruction> check()
|
||||||
|
{
|
||||||
|
var instructions = new List<FixProblemInstruction>();
|
||||||
|
if (isNodexBuild() && EditorUserBuildSettings.activeBuildTarget == BuildTarget.Android)
|
||||||
|
{
|
||||||
|
if (!AppodealUnityUtils.isGradleEnabled())
|
||||||
|
{
|
||||||
|
if (!AppodealUnityUtils.isGradleAvailable())
|
||||||
|
{
|
||||||
|
var fix = new FixProblemInstruction(
|
||||||
|
"Gradle should be enabled if you use nodex version of Appodeal Plugin. " +
|
||||||
|
"But your version of Unity doesn't support gradle build system.Please update your Unity or use export to Eclipse or Android Studio.",
|
||||||
|
false);
|
||||||
|
instructions.Add(fix);
|
||||||
|
return instructions;
|
||||||
|
}
|
||||||
|
|
||||||
|
instructions.Add(new EnableGradle());
|
||||||
|
}
|
||||||
|
|
||||||
|
var customGradeScript = getCustomGradleScriptPath();
|
||||||
|
if (string.IsNullOrEmpty(customGradeScript) || !File.Exists(customGradeScript))
|
||||||
|
{
|
||||||
|
if (File.Exists(getDefaultGradleTemplate()))
|
||||||
|
{
|
||||||
|
instructions.Add(new CopyGradleScriptAndEnableMultidex());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var instr = new FixProblemInstruction(
|
||||||
|
"There is no build.gradle template in your Unity. " +
|
||||||
|
"Please ensure that your copy of Unity isn't crashed and contact Appodeal Support team.",
|
||||||
|
false);
|
||||||
|
instructions.Add(instr);
|
||||||
|
return instructions;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var settings = new ImportantGradleSettings(customGradeScript);
|
||||||
|
if (!settings.isMultiDexAddedCompletely())
|
||||||
|
{
|
||||||
|
instructions.Add(new EnableMultidexInGradle(customGradeScript));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!settings.isJavaVersionIncluded())
|
||||||
|
{
|
||||||
|
instructions.Add(new EnableJavaVersion(customGradeScript));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var customManifestPath = getCustomManifestPath();
|
||||||
|
if (string.IsNullOrEmpty(customManifestPath) || !File.Exists(customManifestPath))
|
||||||
|
{
|
||||||
|
instructions.Add(new CopyManifestTemplateAndAddNameAttribute());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var appNode = getApplicationNode(customManifestPath);
|
||||||
|
var ns = appNode.GetNamespaceOfPrefix("android");
|
||||||
|
if (!appNode.HasAttribute("name", ns))
|
||||||
|
{
|
||||||
|
instructions.Add(new AddNameAttrubute(appNode, ns));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (appNode.GetAttribute("name", ns) == manifestMutlidexApp) return instructions;
|
||||||
|
var fix = new FixProblemInstruction(
|
||||||
|
"We found that you use custom Application class in this project. " +
|
||||||
|
"Please ensure that your application class meets the multidex requirements (see the official android multidex documentation).",
|
||||||
|
false);
|
||||||
|
instructions.Add(fix);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (!isNodexBuild() && isMultidexEnabledSimpleCheck() &&
|
||||||
|
EditorUserBuildSettings.activeBuildTarget == BuildTarget.Android)
|
||||||
|
{
|
||||||
|
var fix = new FixProblemInstruction(
|
||||||
|
"We found that multidex is enabled in your project. To avoid possible problems please " +
|
||||||
|
"replace current version of Appodeal plugin with nodex version.", false);
|
||||||
|
instructions.Add(fix);
|
||||||
|
}
|
||||||
|
|
||||||
|
return instructions;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static XmlElement getApplicationNode(string manifestPath)
|
||||||
|
{
|
||||||
|
var doc = new XmlDocument();
|
||||||
|
doc.Load(manifestPath);
|
||||||
|
var manNode = AppodealUnityUtils.XmlFindChildNode(doc, "manifest");
|
||||||
|
var appNode = (XmlElement) AppodealUnityUtils.XmlFindChildNode(manNode, "application");
|
||||||
|
return appNode;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static string getCustomGradleScriptPath()
|
||||||
|
{
|
||||||
|
var androidDirectory = new DirectoryInfo(Path.Combine("Assets", androidPluginsPath));
|
||||||
|
var filePaths = androidDirectory.GetFiles("*.gradle");
|
||||||
|
return filePaths.Length > 0
|
||||||
|
? Path.Combine(Path.Combine(Application.dataPath, androidPluginsPath), filePaths[0].Name)
|
||||||
|
: null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string getCustomManifestPath()
|
||||||
|
{
|
||||||
|
return AppodealUnityUtils.combinePaths(Application.dataPath, androidPluginsPath, manifestTemplateName);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static bool isNodexBuild()
|
||||||
|
{
|
||||||
|
var dexesDirectory = new DirectoryInfo(appodealDexesPath);
|
||||||
|
if (!dexesDirectory.Exists)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
var dexes = dexesDirectory.GetFiles("*.dex");
|
||||||
|
return dexes.Length == 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static bool isMultidexEnabledSimpleCheck()
|
||||||
|
{
|
||||||
|
var path = getCustomGradleScriptPath();
|
||||||
|
if (string.IsNullOrEmpty(path))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
var settings = new ImportantGradleSettings(path);
|
||||||
|
return settings.isMultidexEnabled() && AppodealUnityUtils.isGradleEnabled();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string getDefaultGradleTemplate()
|
||||||
|
{
|
||||||
|
var defaultGradleTemplateFullName = AppodealUnityUtils.combinePaths(
|
||||||
|
EditorApplication.applicationContentsPath,
|
||||||
|
gradleDefaultTemplatePath,
|
||||||
|
gradleTemplateName);
|
||||||
|
if (File.Exists(defaultGradleTemplateFullName)) return defaultGradleTemplateFullName;
|
||||||
|
var unixAppContentsPath =
|
||||||
|
Path.GetDirectoryName(Path.GetDirectoryName(EditorApplication.applicationContentsPath));
|
||||||
|
defaultGradleTemplateFullName = AppodealUnityUtils.combinePaths(unixAppContentsPath,
|
||||||
|
gradleDefaultTemplatePath,
|
||||||
|
gradleTemplateName);
|
||||||
|
|
||||||
|
return defaultGradleTemplateFullName;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||||
|
[SuppressMessage("ReSharper", "NotAccessedField.Local")]
|
||||||
|
public class ImportantGradleSettings
|
||||||
|
{
|
||||||
|
public readonly bool googleRepositoryPresented;
|
||||||
|
public readonly bool multidexDependencyPresented;
|
||||||
|
public readonly bool multidexEnabled;
|
||||||
|
public readonly bool deprecatedProguardPresented;
|
||||||
|
public readonly bool compileOptions;
|
||||||
|
public readonly bool sourceCapability;
|
||||||
|
public readonly bool targetCapability;
|
||||||
|
public bool defaultConfig;
|
||||||
|
|
||||||
|
public ImportantGradleSettings(string gradlePath)
|
||||||
|
{
|
||||||
|
var gradleScriptFullText = File.ReadAllText(gradlePath);
|
||||||
|
multidexDependencyPresented =
|
||||||
|
gradleScriptFullText.Contains(MultidexActivator.GRADLE_MULTIDEX_DEPENDENCY_WO_VERSION);
|
||||||
|
multidexEnabled = gradleScriptFullText.Contains(MultidexActivator.GRADLE_MULTIDEX_ENABLE);
|
||||||
|
deprecatedProguardPresented = gradleScriptFullText.Contains(MultidexActivator.GRADLE_USE_PROGUARD);
|
||||||
|
compileOptions = gradleScriptFullText.Contains(MultidexActivator.COMPILE_OPTIONS);
|
||||||
|
sourceCapability =
|
||||||
|
gradleScriptFullText.Contains(MultidexActivator.GRADLE_SOURCE_CAPABILITY +
|
||||||
|
MultidexActivator.GRADLE_JAVA_VERSION_1_8);
|
||||||
|
targetCapability =
|
||||||
|
gradleScriptFullText.Contains(MultidexActivator.GRADLE_TARGET_CAPATILITY +
|
||||||
|
MultidexActivator.GRADLE_JAVA_VERSION_1_8);
|
||||||
|
defaultConfig = gradleScriptFullText.Contains(MultidexActivator.GRAFLE_DEFAULT_CONFIG);
|
||||||
|
|
||||||
|
var allprojects = getModule("allprojects", gradleScriptFullText);
|
||||||
|
googleRepositoryPresented = allprojects.Contains(MultidexActivator.GRADLE_GOOGLE_REPOSITORY) ||
|
||||||
|
gradleScriptFullText.Contains(MultidexActivator
|
||||||
|
.GRADLE_GOOGLE_REPOSITORY_COMPAT);
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool isJavaVersionIncluded()
|
||||||
|
{
|
||||||
|
return sourceCapability && targetCapability;
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool isMultidexEnabled()
|
||||||
|
{
|
||||||
|
return multidexDependencyPresented || multidexEnabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool isMultiDexAddedCompletely()
|
||||||
|
{
|
||||||
|
return multidexDependencyPresented && multidexEnabled && !deprecatedProguardPresented &&
|
||||||
|
googleRepositoryPresented;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static string getModule(string moduleName, string fulltext)
|
||||||
|
{
|
||||||
|
var startIndex = fulltext.IndexOf(moduleName, StringComparison.Ordinal);
|
||||||
|
startIndex = fulltext.IndexOf('{', startIndex) + 1;
|
||||||
|
var currentIndex = startIndex;
|
||||||
|
var braces = 1;
|
||||||
|
while (braces != 0)
|
||||||
|
{
|
||||||
|
var c = fulltext[currentIndex];
|
||||||
|
switch (c)
|
||||||
|
{
|
||||||
|
case '{':
|
||||||
|
braces++;
|
||||||
|
break;
|
||||||
|
case '}':
|
||||||
|
braces--;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
currentIndex++;
|
||||||
|
}
|
||||||
|
|
||||||
|
return fulltext.Substring(startIndex, currentIndex - startIndex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
internal class EnableGradle : FixProblemInstruction
|
||||||
|
{
|
||||||
|
public EnableGradle() : base(
|
||||||
|
"Gradle build system isn't enabled.\n(required for nodex version of Appodeal Plugin " +
|
||||||
|
"and if you aren't going to export your project to Android Studio or Eclipse).", true)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void fixProblem()
|
||||||
|
{
|
||||||
|
AppodealUnityUtils.enableGradleBuildSystem();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
internal class CopyGradleScriptAndEnableMultidex : FixProblemInstruction
|
||||||
|
{
|
||||||
|
public CopyGradleScriptAndEnableMultidex() : base("Assets/Plugins/Android/mainTemplate.gradle not found.\n" +
|
||||||
|
"(required if you aren't going to export your project to Android Studio or Eclipse)",
|
||||||
|
true)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void fixProblem()
|
||||||
|
{
|
||||||
|
//EditorApplication.applicationContentsPath is different for macos and win. need to fix to reach manifest and gradle templates
|
||||||
|
var defaultGradleTemplateFullName = MultidexActivator.getDefaultGradleTemplate();
|
||||||
|
|
||||||
|
var destGradleScriptFullName = AppodealUnityUtils.combinePaths(Application.dataPath,
|
||||||
|
MultidexActivator.androidPluginsPath,
|
||||||
|
MultidexActivator.gradleTemplateName);
|
||||||
|
//Prefer to use build.gradle from the box. Just in case.
|
||||||
|
if (File.Exists(defaultGradleTemplateFullName))
|
||||||
|
{
|
||||||
|
File.Copy(defaultGradleTemplateFullName, destGradleScriptFullName);
|
||||||
|
}
|
||||||
|
|
||||||
|
AssetDatabase.ImportAsset(AppodealUnityUtils.absolute2Relative(destGradleScriptFullName),
|
||||||
|
ImportAssetOptions.ForceUpdate);
|
||||||
|
|
||||||
|
//There are no multidex settings in default build.gradle but they can add that stuff.
|
||||||
|
var settings = new ImportantGradleSettings(destGradleScriptFullName);
|
||||||
|
|
||||||
|
if (!settings.isMultiDexAddedCompletely())
|
||||||
|
new EnableMultidexInGradle(destGradleScriptFullName).fixProblem();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
internal class EnableMultidexInGradle : FixProblemInstruction
|
||||||
|
{
|
||||||
|
private readonly string path;
|
||||||
|
|
||||||
|
public EnableMultidexInGradle(string gradleScriptPath) : base(
|
||||||
|
"Multidex isn't enabled. mainTemplate.gradle should be edited " +
|
||||||
|
"according to the official documentation:\nhttps://developer.android.com/studio/build/multidex", true)
|
||||||
|
{
|
||||||
|
path = gradleScriptPath;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void fixProblem()
|
||||||
|
{
|
||||||
|
var settings = new ImportantGradleSettings(path);
|
||||||
|
var leadingWhitespaces = "";
|
||||||
|
string line;
|
||||||
|
var prevLine = "";
|
||||||
|
var modifiedGradle = "";
|
||||||
|
var gradleScript = new StreamReader(path);
|
||||||
|
string multidexDependency;
|
||||||
|
var comparsionUnityVersionWith20182 =
|
||||||
|
AppodealUnityUtils.compareVersions(Application.unityVersion, "2018.2");
|
||||||
|
if (comparsionUnityVersionWith20182 < 0)
|
||||||
|
{
|
||||||
|
multidexDependency = MultidexActivator.GRADLE_COMPILE + MultidexActivator.GRADLE_MULTIDEX_DEPENDENCY;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
multidexDependency = MultidexActivator.GRADLE_IMPLEMENTATION +
|
||||||
|
MultidexActivator.GRADLE_MULTIDEX_DEPENDENCY;
|
||||||
|
}
|
||||||
|
|
||||||
|
while ((line = gradleScript.ReadLine()) != null)
|
||||||
|
{
|
||||||
|
if (!settings.multidexDependencyPresented && line.Contains(MultidexActivator.GRADLE_DEPENDENCIES))
|
||||||
|
{
|
||||||
|
modifiedGradle += leadingWhitespaces + multidexDependency + Environment.NewLine;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!settings.multidexEnabled && line.Contains(MultidexActivator.GRADLE_APP_ID))
|
||||||
|
{
|
||||||
|
modifiedGradle += leadingWhitespaces + MultidexActivator.GRADLE_MULTIDEX_ENABLE +
|
||||||
|
Environment.NewLine;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (settings.deprecatedProguardPresented && line.Contains(MultidexActivator.GRADLE_USE_PROGUARD))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
modifiedGradle += line + Environment.NewLine;
|
||||||
|
leadingWhitespaces = Regex.Match(line, "^\\s*").Value;
|
||||||
|
if (line.Contains("repositories") && prevLine.Contains("allprojects") &&
|
||||||
|
!settings.googleRepositoryPresented)
|
||||||
|
{
|
||||||
|
leadingWhitespaces += leadingWhitespaces;
|
||||||
|
modifiedGradle += leadingWhitespaces + MultidexActivator.GRADLE_GOOGLE_REPOSITORY_COMPAT +
|
||||||
|
Environment.NewLine;
|
||||||
|
}
|
||||||
|
|
||||||
|
prevLine = line;
|
||||||
|
}
|
||||||
|
|
||||||
|
gradleScript.Close();
|
||||||
|
File.WriteAllText(path, modifiedGradle);
|
||||||
|
AssetDatabase.ImportAsset(AppodealUnityUtils.absolute2Relative(path), ImportAssetOptions.ForceUpdate);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
internal class EnableJavaVersion : FixProblemInstruction
|
||||||
|
{
|
||||||
|
private readonly string path;
|
||||||
|
|
||||||
|
public EnableJavaVersion(string gradleScriptPath) : base("Java version isn't included to mainTemplate.gradle",
|
||||||
|
true)
|
||||||
|
{
|
||||||
|
path = gradleScriptPath;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void fixProblem()
|
||||||
|
{
|
||||||
|
var settings = new ImportantGradleSettings(path);
|
||||||
|
var leadingWhitespaces = " ";
|
||||||
|
const string additionalWhiteSpaces = "";
|
||||||
|
string line;
|
||||||
|
var modifiedGradle = "";
|
||||||
|
|
||||||
|
var gradleScript = new StreamReader(path);
|
||||||
|
|
||||||
|
while ((line = gradleScript.ReadLine()) != null)
|
||||||
|
{
|
||||||
|
if (line.Contains(MultidexActivator.GRAFLE_DEFAULT_CONFIG))
|
||||||
|
{
|
||||||
|
if (!settings.compileOptions)
|
||||||
|
{
|
||||||
|
modifiedGradle += additionalWhiteSpaces + leadingWhitespaces +
|
||||||
|
MultidexActivator.COMPILE_OPTIONS + Environment.NewLine;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!settings.sourceCapability)
|
||||||
|
{
|
||||||
|
modifiedGradle += leadingWhitespaces + leadingWhitespaces +
|
||||||
|
MultidexActivator.GRADLE_SOURCE_CAPABILITY
|
||||||
|
+ MultidexActivator.GRADLE_JAVA_VERSION_1_8 + Environment.NewLine;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!settings.targetCapability)
|
||||||
|
{
|
||||||
|
modifiedGradle += leadingWhitespaces + leadingWhitespaces +
|
||||||
|
MultidexActivator.GRADLE_TARGET_CAPATILITY
|
||||||
|
+ MultidexActivator.GRADLE_JAVA_VERSION_1_8 + Environment.NewLine;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!settings.targetCapability)
|
||||||
|
{
|
||||||
|
modifiedGradle += leadingWhitespaces + "}" + Environment.NewLine;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!settings.targetCapability)
|
||||||
|
{
|
||||||
|
modifiedGradle += leadingWhitespaces + Environment.NewLine;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
modifiedGradle += line + Environment.NewLine;
|
||||||
|
leadingWhitespaces = Regex.Match(line, "^\\s*").Value;
|
||||||
|
}
|
||||||
|
|
||||||
|
gradleScript.Close();
|
||||||
|
File.WriteAllText(path, modifiedGradle);
|
||||||
|
AssetDatabase.ImportAsset(AppodealUnityUtils.absolute2Relative(path), ImportAssetOptions.ForceUpdate);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
internal class CopyManifestTemplateAndAddNameAttribute : FixProblemInstruction
|
||||||
|
{
|
||||||
|
public CopyManifestTemplateAndAddNameAttribute() : base(
|
||||||
|
"Assets/Plugins/Android/AndroidManifest.xml not found.\n", true)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void fixProblem()
|
||||||
|
{
|
||||||
|
var fullManifestName = MultidexActivator.getCustomManifestPath();
|
||||||
|
var defaultTemplate = Path.Combine(EditorApplication.applicationContentsPath,
|
||||||
|
MultidexActivator.manifestDefaultTemplatePath);
|
||||||
|
if (!File.Exists(defaultTemplate))
|
||||||
|
{
|
||||||
|
var unixAppContentsPath =
|
||||||
|
Path.GetDirectoryName(Path.GetDirectoryName(EditorApplication.applicationContentsPath));
|
||||||
|
Debug.Assert(unixAppContentsPath != null, nameof(unixAppContentsPath) + " != null");
|
||||||
|
defaultTemplate = Path.Combine(unixAppContentsPath, MultidexActivator.manifestDefaultTemplatePath);
|
||||||
|
}
|
||||||
|
|
||||||
|
var appodealTemplate = AppodealUnityUtils.combinePaths(Application.dataPath,
|
||||||
|
MultidexActivator.appodealTemplatesPath,
|
||||||
|
MultidexActivator.manifestTemplateName);
|
||||||
|
File.Copy(File.Exists(defaultTemplate) ? defaultTemplate : appodealTemplate, fullManifestName);
|
||||||
|
AssetDatabase.ImportAsset(AppodealUnityUtils.absolute2Relative(fullManifestName),
|
||||||
|
ImportAssetOptions.ForceUpdate);
|
||||||
|
|
||||||
|
var appNode = MultidexActivator.getApplicationNode(fullManifestName);
|
||||||
|
var ns = appNode.GetNamespaceOfPrefix("android");
|
||||||
|
if (!appNode.HasAttribute("name", ns))
|
||||||
|
{
|
||||||
|
new AddNameAttrubute(appNode, ns).fixProblem();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
internal class AddNameAttrubute : FixProblemInstruction
|
||||||
|
{
|
||||||
|
private readonly XmlElement appNode;
|
||||||
|
private readonly string ns;
|
||||||
|
|
||||||
|
public AddNameAttrubute(XmlElement appNode, string ns) : base(
|
||||||
|
"Problem in AndroidManifest.xml found.\nApplication tag should contain android:" +
|
||||||
|
"name attribute with value: " + MultidexActivator.manifestMutlidexApp, true)
|
||||||
|
{
|
||||||
|
this.appNode = appNode;
|
||||||
|
this.ns = ns;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void fixProblem()
|
||||||
|
{
|
||||||
|
var fullManifestName = MultidexActivator.getCustomManifestPath();
|
||||||
|
appNode.SetAttribute("name", ns, MultidexActivator.manifestMutlidexApp);
|
||||||
|
Debug.Assert(appNode.OwnerDocument != null, "appNode.OwnerDocument != null");
|
||||||
|
appNode.OwnerDocument.Save(fullManifestName);
|
||||||
|
AssetDatabase.ImportAsset(AppodealUnityUtils.absolute2Relative(fullManifestName),
|
||||||
|
ImportAssetOptions.ForceUpdate);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
11
Assets/Appodeal/Editor/Checkers/MultidexActivator.cs.meta
Normal file
11
Assets/Appodeal/Editor/Checkers/MultidexActivator.cs.meta
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 7b6f78d5631104e87b80549c2de29cf1
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
8
Assets/Appodeal/Editor/InternalResources.meta
Normal file
8
Assets/Appodeal/Editor/InternalResources.meta
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 80a09398ec71b48589e89ee7a5b5d480
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
1267
Assets/Appodeal/Editor/InternalResources/AppodealSettings.asset
Normal file
1267
Assets/Appodeal/Editor/InternalResources/AppodealSettings.asset
Normal file
File diff suppressed because it is too large
Load Diff
|
|
@ -1,5 +1,5 @@
|
||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: f4211f958842e6344b36577f3a622296
|
guid: 8a48b4d6ba042004e8a2c4a1d9e47abd
|
||||||
NativeFormatImporter:
|
NativeFormatImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
mainObjectFileID: 11400000
|
mainObjectFileID: 11400000
|
||||||
155
Assets/Appodeal/Editor/InternalResources/AppodealSettings.cs
Normal file
155
Assets/Appodeal/Editor/InternalResources/AppodealSettings.cs
Normal file
|
|
@ -0,0 +1,155 @@
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics.CodeAnalysis;
|
||||||
|
using System.IO;
|
||||||
|
using UnityEditor;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace AppodealAds.Unity.Editor.InternalResources
|
||||||
|
{
|
||||||
|
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||||
|
public class AppodealSettings : ScriptableObject
|
||||||
|
{
|
||||||
|
private const string AppodealSettingsExportPath = "Appodeal/Editor/InternalResources/AppodealSettings.asset";
|
||||||
|
private static AppodealSettings instance;
|
||||||
|
|
||||||
|
[SerializeField] private string adMobAndroidAppId = string.Empty;
|
||||||
|
[SerializeField] private string adMobIosAppId = string.Empty;
|
||||||
|
|
||||||
|
[SerializeField] private bool accessCoarseLocationPermission;
|
||||||
|
[SerializeField] private bool writeExternalStoragePermission;
|
||||||
|
[SerializeField] private bool accessWifiStatePermission;
|
||||||
|
[SerializeField] private bool vibratePermission;
|
||||||
|
[SerializeField] private bool accessFineLocationPermission;
|
||||||
|
|
||||||
|
[SerializeField] private bool androidMultidex;
|
||||||
|
|
||||||
|
[SerializeField] private bool nSUserTrackingUsageDescription;
|
||||||
|
[SerializeField] private bool nSLocationWhenInUseUsageDescription;
|
||||||
|
[SerializeField] private bool nSCalendarsUsageDescription;
|
||||||
|
[SerializeField] private bool nSAppTransportSecurity;
|
||||||
|
|
||||||
|
[SerializeField] private bool iOSSKAdNetworkItems;
|
||||||
|
[SerializeField] private List<string> iOsskAdNetworkItemsList;
|
||||||
|
|
||||||
|
public static AppodealSettings Instance
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (instance != null) return instance;
|
||||||
|
var settingsFilePath = Path.Combine("Assets", AppodealSettingsExportPath);
|
||||||
|
var settingsDir = Path.GetDirectoryName(settingsFilePath);
|
||||||
|
if (!Directory.Exists(settingsDir))
|
||||||
|
{
|
||||||
|
Directory.CreateDirectory(settingsDir ?? string.Empty);
|
||||||
|
}
|
||||||
|
|
||||||
|
instance = AssetDatabase.LoadAssetAtPath<AppodealSettings>(settingsFilePath);
|
||||||
|
if (instance != null) return instance;
|
||||||
|
instance = CreateInstance<AppodealSettings>();
|
||||||
|
AssetDatabase.CreateAsset(instance, settingsFilePath);
|
||||||
|
|
||||||
|
return instance;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public string AdMobAndroidAppId
|
||||||
|
{
|
||||||
|
get { return Instance.adMobAndroidAppId; }
|
||||||
|
set { Instance.adMobAndroidAppId = value.Trim(); }
|
||||||
|
}
|
||||||
|
|
||||||
|
public string AdMobIosAppId
|
||||||
|
{
|
||||||
|
get { return Instance.adMobIosAppId; }
|
||||||
|
set { Instance.adMobIosAppId = value.Trim(); }
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool AccessCoarseLocationPermission
|
||||||
|
{
|
||||||
|
get { return accessCoarseLocationPermission; }
|
||||||
|
set { Instance.accessCoarseLocationPermission = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool WriteExternalStoragePermission
|
||||||
|
{
|
||||||
|
get { return writeExternalStoragePermission; }
|
||||||
|
set { Instance.writeExternalStoragePermission = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool AccessWifiStatePermission
|
||||||
|
{
|
||||||
|
get { return accessWifiStatePermission; }
|
||||||
|
set { Instance.accessWifiStatePermission = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool VibratePermission
|
||||||
|
{
|
||||||
|
get { return vibratePermission; }
|
||||||
|
set { Instance.vibratePermission = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool AccessFineLocationPermission
|
||||||
|
{
|
||||||
|
get { return accessFineLocationPermission; }
|
||||||
|
set { Instance.accessFineLocationPermission = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool AndroidMultidex
|
||||||
|
{
|
||||||
|
get { return androidMultidex; }
|
||||||
|
set { Instance.androidMultidex = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool NSUserTrackingUsageDescription
|
||||||
|
{
|
||||||
|
get { return nSUserTrackingUsageDescription; }
|
||||||
|
set { Instance.nSUserTrackingUsageDescription = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool NSLocationWhenInUseUsageDescription
|
||||||
|
{
|
||||||
|
get { return nSLocationWhenInUseUsageDescription; }
|
||||||
|
set { Instance.nSLocationWhenInUseUsageDescription = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool NSCalendarsUsageDescription
|
||||||
|
{
|
||||||
|
get { return nSCalendarsUsageDescription; }
|
||||||
|
set { Instance.nSCalendarsUsageDescription = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool NSAppTransportSecurity
|
||||||
|
{
|
||||||
|
get { return nSAppTransportSecurity; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
Instance.nSAppTransportSecurity = value;
|
||||||
|
#if UNITY_2018_1_OR_NEWER
|
||||||
|
if (BuildPipeline.IsBuildTargetSupported(BuildTargetGroup.iOS, BuildTarget.iOS)) PlayerSettings.iOS.allowHTTPDownload = value;
|
||||||
|
else Instance.nSAppTransportSecurity = false;
|
||||||
|
#elif UNITY_IOS
|
||||||
|
PlayerSettings.iOS.allowHTTPDownload = value;
|
||||||
|
#else
|
||||||
|
Instance.nSAppTransportSecurity = false;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool IOSSkAdNetworkItems
|
||||||
|
{
|
||||||
|
get { return iOSSKAdNetworkItems; }
|
||||||
|
set { Instance.iOSSKAdNetworkItems = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<string> IOSSkAdNetworkItemsList
|
||||||
|
{
|
||||||
|
get { return iOsskAdNetworkItemsList; }
|
||||||
|
set { Instance.iOsskAdNetworkItemsList = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SaveAsync()
|
||||||
|
{
|
||||||
|
EditorUtility.SetDirty(instance);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 9403d56c027e8442284a59449c4f1002
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
120
Assets/Appodeal/Editor/InternalResources/remove_list.xml
Normal file
120
Assets/Appodeal/Editor/InternalResources/remove_list.xml
Normal file
|
|
@ -0,0 +1,120 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<items>
|
||||||
|
<item>
|
||||||
|
<filter>^((?!InternalResources).)*$</filter>
|
||||||
|
<is_confirmation_required>false</is_confirmation_required>
|
||||||
|
<name>Appodeal unity interface</name>
|
||||||
|
<path>Appodeal</path>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<check_if_empty>true</check_if_empty>
|
||||||
|
<is_confirmation_required>false</is_confirmation_required>
|
||||||
|
<name>Appodeal unity interface</name>
|
||||||
|
<path>Appodeal</path>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<is_confirmation_required>false</is_confirmation_required>
|
||||||
|
<name>Appodeal unity interface</name>
|
||||||
|
<path>Appodeal</path>
|
||||||
|
<perform_only_if_total_remove>true</perform_only_if_total_remove>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<check_if_empty>false</check_if_empty>
|
||||||
|
<is_confirmation_required>false</is_confirmation_required>
|
||||||
|
<name>ConsentManager</name>
|
||||||
|
<path>ConsentManager</path>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<description>External Dependency Manager is used by many plugins for integrating platform specific
|
||||||
|
libraries and resolving conflicting dependencies. If some of your plugins use Jar
|
||||||
|
Resolver, removing can lead to issues.
|
||||||
|
</description>
|
||||||
|
<is_confirmation_required>true</is_confirmation_required>
|
||||||
|
<name>Jar Resolver</name>
|
||||||
|
<path>ExternalDependencyManager</path>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<filter>^Appodeal.*</filter>
|
||||||
|
<is_confirmation_required>false</is_confirmation_required>
|
||||||
|
<name>Appodeal Dependencies</name>
|
||||||
|
<path>Editor</path>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<check_if_empty>true</check_if_empty>
|
||||||
|
<is_confirmation_required>false</is_confirmation_required>
|
||||||
|
<name>Appodeal Editor</name>
|
||||||
|
<path>Editor</path>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<filter>Appodeal</filter>
|
||||||
|
<is_confirmation_required>false</is_confirmation_required>
|
||||||
|
<name>Appodeal iOS</name>
|
||||||
|
<path>Plugins/iOS</path>
|
||||||
|
</item>
|
||||||
|
|
||||||
|
<item>
|
||||||
|
<check_if_empty>false</check_if_empty>
|
||||||
|
<is_confirmation_required>false</is_confirmation_required>
|
||||||
|
<name>Plugins iOS Consent Manager</name>
|
||||||
|
<path>Plugins/iOS/ConsentManager</path>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<check_if_empty>true</check_if_empty>
|
||||||
|
<is_confirmation_required>false</is_confirmation_required>
|
||||||
|
<name>Plugins iOS folder</name>
|
||||||
|
<path>Plugins/iOS</path>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<filter>
|
||||||
|
(appodeal-)|(appodeal)|(adcolony)|(applovin)|(amazon)|(chartboost)|(facebook)|(inmobi)|(ironsource)|(mytarget)|(startapp)|(tapjoy)|(unity_ads)|(yandex)|(mintegral)|(mintegral-)|(ogury-)
|
||||||
|
</filter>
|
||||||
|
<is_confirmation_required>false</is_confirmation_required>
|
||||||
|
<name>Appodeal Android</name>
|
||||||
|
<path>Plugins/Android</path>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<filter>
|
||||||
|
|(adcolony)|(amazon_ads)|(applovin)|(chartboost)|(facebook)|(ironsource)|(my_target)|(protobuf)|(tapjoy)|(unity_ads)|(vungle)|(yandex)|
|
||||||
|
</filter>
|
||||||
|
<is_confirmation_required>false</is_confirmation_required>
|
||||||
|
<name>Appodeal Android Assets Dex</name>
|
||||||
|
<path>Plugins/Android/assets/dex</path>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<check_if_empty>false</check_if_empty>
|
||||||
|
<is_confirmation_required>false</is_confirmation_required>
|
||||||
|
<name>Plugins Android Assets Com Tapjoy</name>
|
||||||
|
<path>Plugins/Android/assets/com/tapjoy</path>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<check_if_empty>true</check_if_empty>
|
||||||
|
<is_confirmation_required>false</is_confirmation_required>
|
||||||
|
<name>Plugins Android Assets Com</name>
|
||||||
|
<path>Plugins/Android/assets/com</path>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<is_confirmation_required>false</is_confirmation_required>
|
||||||
|
<name>Plugins Android Assets Js</name>
|
||||||
|
<path>Plugins/Android/assets/js</path>
|
||||||
|
<filter>(closebutton\.html)|(mraid\.js)</filter>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<check_if_empty>true</check_if_empty>
|
||||||
|
<is_confirmation_required>false</is_confirmation_required>
|
||||||
|
<name>Plugins Android Assets</name>
|
||||||
|
<path>Plugins/Android/assets</path>
|
||||||
|
</item>
|
||||||
|
|
||||||
|
<item>
|
||||||
|
<check_if_empty>true</check_if_empty>
|
||||||
|
<is_confirmation_required>false</is_confirmation_required>
|
||||||
|
<name>Plugins Android folder</name>
|
||||||
|
<path>Plugins/Android</path>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<check_if_empty>true</check_if_empty>
|
||||||
|
<is_confirmation_required>false</is_confirmation_required>
|
||||||
|
<name>Assets Plugins</name>
|
||||||
|
<path>Plugins</path>
|
||||||
|
</item>
|
||||||
|
</items>
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 0c7bc99260f0c43e3bb182e9a9aa9bd7
|
||||||
|
TextScriptImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
8
Assets/Appodeal/Editor/NetworkConfigs.meta
Normal file
8
Assets/Appodeal/Editor/NetworkConfigs.meta
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 96b04064353f64115acbb3f904cf278d
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -0,0 +1,20 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<dependencies>
|
||||||
|
<iosPods>
|
||||||
|
<iosPod name="APDAdColonyAdapter" version="3.1.3.0" minTargetSdk="11.0" />
|
||||||
|
<iosPod name="BidMachineAdColonyAdapter" version="~> 2.3.0.0" minTargetSdk="12.0" />
|
||||||
|
</iosPods>
|
||||||
|
<androidPackages>
|
||||||
|
<androidPackage spec="com.appodeal.ads.sdk.networks:adcolony:3.1.3.0" />
|
||||||
|
<androidPackage spec="com.appodeal.ads.sdk:core:3.1.3" />
|
||||||
|
<androidPackage spec="io.bidmachine:ads.networks.adcolony:2.3.1.11" />
|
||||||
|
<androidPackage spec="com.adcolony:sdk:4.8.0" />
|
||||||
|
<androidPackage spec="com.google.android.gms:play-services-ads-identifier:18.0.1" />
|
||||||
|
<androidPackage spec="org.jetbrains.kotlin:kotlin-stdlib:1.7.10" />
|
||||||
|
<androidPackage spec="org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4" />
|
||||||
|
<androidPackage spec="org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4" />
|
||||||
|
<repositories>
|
||||||
|
<repository>https://artifactory.appodeal.com/appodeal</repository>
|
||||||
|
</repositories>
|
||||||
|
</androidPackages>
|
||||||
|
</dependencies>
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 4e45e06cf431d48e8afd52fdb18cfe70
|
||||||
|
TextScriptImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
26
Assets/Appodeal/Editor/NetworkConfigs/AdjustDependencies.xml
Normal file
26
Assets/Appodeal/Editor/NetworkConfigs/AdjustDependencies.xml
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<dependencies>
|
||||||
|
<iosPods>
|
||||||
|
<iosPod name="APDAdjustAdapter" version="3.1.3.0" minTargetSdk="11.0">
|
||||||
|
<sources>
|
||||||
|
<source>https://github.com/appodeal/CocoaPods.git</source>
|
||||||
|
</sources>
|
||||||
|
</iosPod>
|
||||||
|
</iosPods>
|
||||||
|
<androidPackages>
|
||||||
|
<androidPackage spec="com.appodeal.ads.sdk.services:adjust:3.1.3.0" />
|
||||||
|
<androidPackage spec="com.appodeal.ads.sdk.core:public:3.1.3" />
|
||||||
|
<androidPackage spec="com.appodeal.ads.sdk.core:internal:3.1.3" />
|
||||||
|
<androidPackage spec="com.appodeal.ads:extensions:3.1.3" />
|
||||||
|
<androidPackage spec="com.adjust.sdk:adjust-android:4.33.4" />
|
||||||
|
<androidPackage spec="com.explorestack.adjust:sdk-purchase:1.1.2" />
|
||||||
|
<androidPackage spec="com.android.installreferrer:installreferrer:2.2" />
|
||||||
|
<androidPackage spec="com.google.android.gms:play-services-ads-identifier:18.0.1" />
|
||||||
|
<androidPackage spec="org.jetbrains.kotlin:kotlin-stdlib:1.7.10" />
|
||||||
|
<androidPackage spec="org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4" />
|
||||||
|
<androidPackage spec="org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4" />
|
||||||
|
<repositories>
|
||||||
|
<repository>https://artifactory.appodeal.com/appodeal</repository>
|
||||||
|
</repositories>
|
||||||
|
</androidPackages>
|
||||||
|
</dependencies>
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: ba700f0a931b64e6296dc8deb1610466
|
||||||
|
TextScriptImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<dependencies>
|
||||||
|
<iosPods>
|
||||||
|
<iosPod name="APDAppLovinAdapter" version="3.1.3.0" minTargetSdk="11.0" />
|
||||||
|
</iosPods>
|
||||||
|
<androidPackages>
|
||||||
|
<androidPackage spec="com.appodeal.ads.sdk.networks:applovin:3.1.3.0" />
|
||||||
|
<androidPackage spec="com.appodeal.ads.sdk:core:3.1.3" />
|
||||||
|
<androidPackage spec="com.applovin:applovin-sdk:11.10.1" />
|
||||||
|
<androidPackage spec="com.google.android.exoplayer:exoplayer:2.17.1" />
|
||||||
|
<androidPackage spec="org.jetbrains.kotlin:kotlin-stdlib:1.7.10" />
|
||||||
|
<androidPackage spec="org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4" />
|
||||||
|
<androidPackage spec="org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4" />
|
||||||
|
<repositories>
|
||||||
|
<repository>https://artifactory.appodeal.com/appodeal</repository>
|
||||||
|
</repositories>
|
||||||
|
</androidPackages>
|
||||||
|
</dependencies>
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 7fad1169905f24b97b06cce224203af7
|
||||||
|
TextScriptImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<dependencies>
|
||||||
|
<iosPods>
|
||||||
|
<iosPod name="Appodeal" version="3.1.3" minTargetSdk="11.0" />
|
||||||
|
</iosPods>
|
||||||
|
<androidPackages>
|
||||||
|
<androidPackage spec="com.appodeal.ads.sdk:core:3.1.3" />
|
||||||
|
<androidPackage spec="com.appodeal.ads.sdk.core:public:3.1.3" />
|
||||||
|
<androidPackage spec="com.appodeal.ads.sdk.core:internal:3.1.3" />
|
||||||
|
<androidPackage spec="com.appodeal.ads:network:3.1.3" />
|
||||||
|
<androidPackage spec="com.appodeal.ads:consent:3.1.3" />
|
||||||
|
<androidPackage spec="com.appodeal.ads:extensions:3.1.3" />
|
||||||
|
<androidPackage spec="com.appodeal.ads:advertising:3.1.3" />
|
||||||
|
<androidPackage spec="com.explorestack:iab:1.5.2" />
|
||||||
|
<androidPackage spec="org.jetbrains.kotlin:kotlin-stdlib:1.7.10" />
|
||||||
|
<androidPackage spec="org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4" />
|
||||||
|
<androidPackage spec="org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4" />
|
||||||
|
<repositories>
|
||||||
|
<repository>https://artifactory.appodeal.com/appodeal</repository>
|
||||||
|
</repositories>
|
||||||
|
</androidPackages>
|
||||||
|
</dependencies>
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 95fd68066d56242daa4a6bd25eaff950
|
||||||
|
TextScriptImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<dependencies>
|
||||||
|
<iosPods>
|
||||||
|
<iosPod name="APDAppsFlyerAdapter" version="3.1.3.0" minTargetSdk="11.0" />
|
||||||
|
</iosPods>
|
||||||
|
<androidPackages>
|
||||||
|
<androidPackage spec="com.appodeal.ads.sdk.services:appsflyer:3.1.3.0" />
|
||||||
|
<androidPackage spec="com.appodeal.ads.sdk.core:public:3.1.3" />
|
||||||
|
<androidPackage spec="com.appodeal.ads.sdk.core:internal:3.1.3" />
|
||||||
|
<androidPackage spec="com.appodeal.ads:extensions:3.1.3" />
|
||||||
|
<androidPackage spec="com.appsflyer:af-android-sdk:6.12.1" />
|
||||||
|
<androidPackage spec="com.appsflyer:adrevenue:6.9.1" />
|
||||||
|
<androidPackage spec="com.android.installreferrer:installreferrer:2.2" />
|
||||||
|
<androidPackage spec="org.jetbrains.kotlin:kotlin-stdlib:1.7.10" />
|
||||||
|
<androidPackage spec="org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4" />
|
||||||
|
<androidPackage spec="org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4" />
|
||||||
|
<repositories>
|
||||||
|
<repository>https://artifactory.appodeal.com/appodeal</repository>
|
||||||
|
</repositories>
|
||||||
|
</androidPackages>
|
||||||
|
</dependencies>
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 43ec741b8409546ca99f9ed7f8d366f4
|
||||||
|
TextScriptImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<dependencies>
|
||||||
|
<iosPods>
|
||||||
|
<iosPod name="APDBidMachineAdapter" version="3.1.3.0" minTargetSdk="12.0" />
|
||||||
|
<iosPod name="BidMachineAmazonAdapter" version="~> 2.3.0.0" minTargetSdk="12.0" />
|
||||||
|
<iosPod name="BidMachineCriteoAdapter" version="~> 2.3.0.0" minTargetSdk="12.0" />
|
||||||
|
<iosPod name="BidMachineMintegralAdapter" version="~> 2.3.0.0" minTargetSdk="12.0" />
|
||||||
|
<iosPod name="BidMachinePangleAdapter" version="~> 2.3.0.0" minTargetSdk="12.0" />
|
||||||
|
<iosPod name="BidMachineSmaatoAdapter" version="~> 2.3.0.0" minTargetSdk="12.0" />
|
||||||
|
<iosPod name="BidMachineTapjoyAdapter" version="~> 2.3.0.0" minTargetSdk="12.0" />
|
||||||
|
</iosPods>
|
||||||
|
<androidPackages>
|
||||||
|
<androidPackage spec="com.appodeal.ads.sdk.networks:bidmachine:3.1.3.0" />
|
||||||
|
<androidPackage spec="com.appodeal.ads.sdk:core:3.1.3" />
|
||||||
|
<androidPackage spec="io.bidmachine:ads:2.3.1" />
|
||||||
|
<androidPackage spec="io.bidmachine:ads.networks.amazon:2.3.1.12" />
|
||||||
|
<androidPackage spec="io.bidmachine:ads.networks.criteo:2.3.1.11" />
|
||||||
|
<androidPackage spec="io.bidmachine:ads.networks.mintegral:2.3.1.3" />
|
||||||
|
<androidPackage spec="io.bidmachine:ads.networks.pangle:2.3.1.6" />
|
||||||
|
<androidPackage spec="org.jetbrains.kotlin:kotlin-stdlib:1.7.10" />
|
||||||
|
<androidPackage spec="org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4" />
|
||||||
|
<androidPackage spec="org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4" />
|
||||||
|
<repositories>
|
||||||
|
<repository>https://artifactory.appodeal.com/appodeal</repository>
|
||||||
|
</repositories>
|
||||||
|
</androidPackages>
|
||||||
|
</dependencies>
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: e62f366a4d86549ca9638abb21ac0d02
|
||||||
|
TextScriptImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -0,0 +1,20 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<dependencies>
|
||||||
|
<iosPods>
|
||||||
|
<iosPod name="APDFirebaseAdapter" version="3.1.3.0" minTargetSdk="11.0" />
|
||||||
|
</iosPods>
|
||||||
|
<androidPackages>
|
||||||
|
<androidPackage spec="com.appodeal.ads.sdk.services:firebase:3.1.3.0" />
|
||||||
|
<androidPackage spec="com.appodeal.ads.sdk.core:public:3.1.3" />
|
||||||
|
<androidPackage spec="com.appodeal.ads.sdk.core:internal:3.1.3" />
|
||||||
|
<androidPackage spec="com.appodeal.ads:extensions:3.1.3" />
|
||||||
|
<androidPackage spec="com.google.firebase:firebase-analytics-ktx:21.2.0" />
|
||||||
|
<androidPackage spec="com.google.firebase:firebase-config-ktx:21.2.1" />
|
||||||
|
<androidPackage spec="org.jetbrains.kotlin:kotlin-stdlib:1.7.10" />
|
||||||
|
<androidPackage spec="org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4" />
|
||||||
|
<androidPackage spec="org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4" />
|
||||||
|
<repositories>
|
||||||
|
<repository>https://artifactory.appodeal.com/appodeal</repository>
|
||||||
|
</repositories>
|
||||||
|
</androidPackages>
|
||||||
|
</dependencies>
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 43fe1f0f98df449cbbe92b9e3a9ed3a7
|
||||||
|
TextScriptImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<dependencies>
|
||||||
|
<iosPods>
|
||||||
|
<iosPod name="APDGoogleAdMobAdapter" version="3.1.3.0" minTargetSdk="11.0" />
|
||||||
|
</iosPods>
|
||||||
|
<androidPackages>
|
||||||
|
<androidPackage spec="com.appodeal.ads.sdk.networks:admob:3.1.3.0" />
|
||||||
|
<androidPackage spec="com.appodeal.ads.sdk:core:3.1.3" />
|
||||||
|
<androidPackage spec="com.google.android.gms:play-services-ads:22.1.0" />
|
||||||
|
<androidPackage spec="androidx.constraintlayout:constraintlayout:2.1.4" />
|
||||||
|
<androidPackage spec="org.jetbrains.kotlin:kotlin-stdlib:1.7.10" />
|
||||||
|
<androidPackage spec="org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4" />
|
||||||
|
<androidPackage spec="org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4" />
|
||||||
|
<repositories>
|
||||||
|
<repository>https://artifactory.appodeal.com/appodeal</repository>
|
||||||
|
</repositories>
|
||||||
|
</androidPackages>
|
||||||
|
</dependencies>
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 1b0b5f6b7541c4d8d8eef948344d1307
|
||||||
|
TextScriptImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
17
Assets/Appodeal/Editor/NetworkConfigs/IABDependencies.xml
Normal file
17
Assets/Appodeal/Editor/NetworkConfigs/IABDependencies.xml
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<dependencies>
|
||||||
|
<iosPods>
|
||||||
|
<iosPod name="APDIABAdapter" version="3.1.3.0" minTargetSdk="11.0" />
|
||||||
|
</iosPods>
|
||||||
|
<androidPackages>
|
||||||
|
<androidPackage spec="com.appodeal.ads.sdk.networks:iab:3.1.3.0" />
|
||||||
|
<androidPackage spec="com.appodeal.ads.sdk:core:3.1.3" />
|
||||||
|
<androidPackage spec="com.explorestack:iab:1.5.2" />
|
||||||
|
<androidPackage spec="org.jetbrains.kotlin:kotlin-stdlib:1.7.10" />
|
||||||
|
<androidPackage spec="org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4" />
|
||||||
|
<androidPackage spec="org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4" />
|
||||||
|
<repositories>
|
||||||
|
<repository>https://artifactory.appodeal.com/appodeal</repository>
|
||||||
|
</repositories>
|
||||||
|
</androidPackages>
|
||||||
|
</dependencies>
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 516bf1ee5904f412cb906b2aeaebabc6
|
||||||
|
TextScriptImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<dependencies>
|
||||||
|
<iosPods>
|
||||||
|
<iosPod name="APDIronSourceAdapter" version="3.1.3.0" minTargetSdk="11.0" />
|
||||||
|
</iosPods>
|
||||||
|
<androidPackages>
|
||||||
|
<androidPackage spec="com.appodeal.ads.sdk.networks:ironsource:3.1.3.0" />
|
||||||
|
<androidPackage spec="com.appodeal.ads.sdk:core:3.1.3" />
|
||||||
|
<androidPackage spec="com.ironsource.sdk:mediationsdk:7.3.0.1" />
|
||||||
|
<androidPackage spec="com.google.android.gms:play-services-base:18.0.1" />
|
||||||
|
<androidPackage spec="com.google.android.gms:play-services-ads-identifier:18.0.1" />
|
||||||
|
<androidPackage spec="org.jetbrains.kotlin:kotlin-stdlib:1.7.10" />
|
||||||
|
<androidPackage spec="org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4" />
|
||||||
|
<androidPackage spec="org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4" />
|
||||||
|
<repositories>
|
||||||
|
<repository>https://artifactory.appodeal.com/appodeal</repository>
|
||||||
|
</repositories>
|
||||||
|
</androidPackages>
|
||||||
|
</dependencies>
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 3f4c4c86bf9f14b6e95b588278f775fe
|
||||||
|
TextScriptImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -0,0 +1,20 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<dependencies>
|
||||||
|
<iosPods>
|
||||||
|
<iosPod name="APDMetaAudienceNetworkAdapter" version="3.1.3.0" minTargetSdk="11.0" />
|
||||||
|
<iosPod name="BidMachineMetaAudienceAdapter" version="~> 2.3.0.0" minTargetSdk="12.0" />
|
||||||
|
</iosPods>
|
||||||
|
<androidPackages>
|
||||||
|
<androidPackage spec="com.appodeal.ads.sdk.networks:meta:3.1.3.0" />
|
||||||
|
<androidPackage spec="com.appodeal.ads.sdk:core:3.1.3" />
|
||||||
|
<androidPackage spec="io.bidmachine:ads.networks.meta_audience:2.3.1.13" />
|
||||||
|
<androidPackage spec="com.facebook.android:audience-network-sdk:6.14.0" />
|
||||||
|
<androidPackage spec="com.google.android.gms:play-services-base:18.0.1" />
|
||||||
|
<androidPackage spec="org.jetbrains.kotlin:kotlin-stdlib:1.7.10" />
|
||||||
|
<androidPackage spec="org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4" />
|
||||||
|
<androidPackage spec="org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4" />
|
||||||
|
<repositories>
|
||||||
|
<repository>https://artifactory.appodeal.com/appodeal</repository>
|
||||||
|
</repositories>
|
||||||
|
</androidPackages>
|
||||||
|
</dependencies>
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 0b1ee1c3cfbd348439492e3e2af3adb3
|
||||||
|
TextScriptImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
19
Assets/Appodeal/Editor/NetworkConfigs/MetaDependencies.xml
Normal file
19
Assets/Appodeal/Editor/NetworkConfigs/MetaDependencies.xml
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<dependencies>
|
||||||
|
<iosPods>
|
||||||
|
<iosPod name="APDFacebookAdapter" version="3.1.3.0" minTargetSdk="12.0" />
|
||||||
|
</iosPods>
|
||||||
|
<androidPackages>
|
||||||
|
<androidPackage spec="com.appodeal.ads.sdk.services:facebook_analytics:3.1.3.0" />
|
||||||
|
<androidPackage spec="com.appodeal.ads.sdk.core:public:3.1.3" />
|
||||||
|
<androidPackage spec="com.appodeal.ads.sdk.core:internal:3.1.3" />
|
||||||
|
<androidPackage spec="com.appodeal.ads:extensions:3.1.3" />
|
||||||
|
<androidPackage spec="com.facebook.android:facebook-core:16.0.1" />
|
||||||
|
<androidPackage spec="org.jetbrains.kotlin:kotlin-stdlib:1.7.10" />
|
||||||
|
<androidPackage spec="org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4" />
|
||||||
|
<androidPackage spec="org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4" />
|
||||||
|
<repositories>
|
||||||
|
<repository>https://artifactory.appodeal.com/appodeal</repository>
|
||||||
|
</repositories>
|
||||||
|
</androidPackages>
|
||||||
|
</dependencies>
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 6e9e2f441126b45169884cae8b64d64a
|
||||||
|
TextScriptImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<dependencies>
|
||||||
|
<iosPods>
|
||||||
|
<iosPod name="APDMyTargetAdapter" version="3.1.3.0" minTargetSdk="11.0" />
|
||||||
|
<iosPod name="BidMachineMyTargetAdapter" version="~> 2.3.0.0" minTargetSdk="12.0" />
|
||||||
|
</iosPods>
|
||||||
|
<androidPackages>
|
||||||
|
<androidPackage spec="com.appodeal.ads.sdk.networks:my_target:3.1.3.0" />
|
||||||
|
<androidPackage spec="com.appodeal.ads.sdk:core:3.1.3" />
|
||||||
|
<androidPackage spec="io.bidmachine:ads.networks.my_target:2.3.1.10" />
|
||||||
|
<androidPackage spec="com.my.target:mytarget-sdk:5.16.5" />
|
||||||
|
<androidPackage spec="com.google.android.exoplayer:exoplayer:2.17.1" />
|
||||||
|
<androidPackage spec="com.google.android.gms:play-services-ads-identifier:18.0.1" />
|
||||||
|
<androidPackage spec="org.jetbrains.kotlin:kotlin-stdlib:1.7.10" />
|
||||||
|
<androidPackage spec="org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4" />
|
||||||
|
<androidPackage spec="org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4" />
|
||||||
|
<repositories>
|
||||||
|
<repository>https://artifactory.appodeal.com/appodeal</repository>
|
||||||
|
</repositories>
|
||||||
|
</androidPackages>
|
||||||
|
</dependencies>
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 77c70a83ec8654ec489f729418f92798
|
||||||
|
TextScriptImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<dependencies>
|
||||||
|
<androidPackages>
|
||||||
|
<androidPackage spec="com.appodeal.ads.sdk.services:sentry_analytics:3.1.3.0" />
|
||||||
|
<androidPackage spec="com.appodeal.ads:network:3.1.3" />
|
||||||
|
<androidPackage spec="com.appodeal.ads.sdk.core:public:3.1.3" />
|
||||||
|
<androidPackage spec="com.appodeal.ads.sdk.core:internal:3.1.3" />
|
||||||
|
<androidPackage spec="com.appodeal.ads:extensions:3.1.3" />
|
||||||
|
<androidPackage spec="io.sentry:sentry-android:6.26.0" />
|
||||||
|
<androidPackage spec="org.jetbrains.kotlin:kotlin-stdlib:1.7.10" />
|
||||||
|
<androidPackage spec="org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4" />
|
||||||
|
<androidPackage spec="org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4" />
|
||||||
|
<repositories>
|
||||||
|
<repository>https://artifactory.appodeal.com/appodeal</repository>
|
||||||
|
</repositories>
|
||||||
|
</androidPackages>
|
||||||
|
</dependencies>
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 2e850d7e2306444149de058b95c356ff
|
||||||
|
TextScriptImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<dependencies>
|
||||||
|
<iosPods>
|
||||||
|
<iosPod name="APDStackAnalyticsAdapter" version="3.1.3.0" minTargetSdk="11.0" />
|
||||||
|
</iosPods>
|
||||||
|
<androidPackages>
|
||||||
|
<androidPackage spec="com.appodeal.ads.sdk.services:stack_analytics:3.1.3.0" />
|
||||||
|
<androidPackage spec="com.appodeal.ads:network:3.1.3" />
|
||||||
|
<androidPackage spec="com.appodeal.ads.sdk.core:public:3.1.3" />
|
||||||
|
<androidPackage spec="com.appodeal.ads.sdk.core:internal:3.1.3" />
|
||||||
|
<androidPackage spec="com.appodeal.ads:extensions:3.1.3" />
|
||||||
|
<androidPackage spec="org.jetbrains.kotlin:kotlin-stdlib:1.7.10" />
|
||||||
|
<androidPackage spec="org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4" />
|
||||||
|
<androidPackage spec="org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4" />
|
||||||
|
<repositories>
|
||||||
|
<repository>https://artifactory.appodeal.com/appodeal</repository>
|
||||||
|
</repositories>
|
||||||
|
</androidPackages>
|
||||||
|
</dependencies>
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 99356fd3c53024770808863a56aae8ab
|
||||||
|
TextScriptImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
17
Assets/Appodeal/Editor/NetworkConfigs/UnityDependencies.xml
Normal file
17
Assets/Appodeal/Editor/NetworkConfigs/UnityDependencies.xml
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<dependencies>
|
||||||
|
<iosPods>
|
||||||
|
<iosPod name="APDUnityAdapter" version="3.1.3.0" minTargetSdk="11.0" />
|
||||||
|
</iosPods>
|
||||||
|
<androidPackages>
|
||||||
|
<androidPackage spec="com.appodeal.ads.sdk.networks:unity_ads:3.1.3.0" />
|
||||||
|
<androidPackage spec="com.appodeal.ads.sdk:core:3.1.3" />
|
||||||
|
<androidPackage spec="com.unity3d.ads:unity-ads:4.6.1" />
|
||||||
|
<androidPackage spec="org.jetbrains.kotlin:kotlin-stdlib:1.7.10" />
|
||||||
|
<androidPackage spec="org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4" />
|
||||||
|
<androidPackage spec="org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4" />
|
||||||
|
<repositories>
|
||||||
|
<repository>https://artifactory.appodeal.com/appodeal</repository>
|
||||||
|
</repositories>
|
||||||
|
</androidPackages>
|
||||||
|
</dependencies>
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: c432d629d99c34980a38a7633fd76645
|
||||||
|
TextScriptImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
22
Assets/Appodeal/Editor/NetworkConfigs/VungleDependencies.xml
Normal file
22
Assets/Appodeal/Editor/NetworkConfigs/VungleDependencies.xml
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<dependencies>
|
||||||
|
<iosPods>
|
||||||
|
<iosPod name="APDVungleAdapter" version="3.1.3.0" minTargetSdk="11.0" />
|
||||||
|
<iosPod name="BidMachineVungleAdapter" version="~> 2.3.0.0" minTargetSdk="12.0" />
|
||||||
|
</iosPods>
|
||||||
|
<androidPackages>
|
||||||
|
<androidPackage spec="com.appodeal.ads.sdk.networks:vungle:3.1.3.0" />
|
||||||
|
<androidPackage spec="com.appodeal.ads.sdk:core:3.1.3" />
|
||||||
|
<androidPackage spec="io.bidmachine:ads.networks.vungle:2.3.1.3" />
|
||||||
|
<androidPackage spec="com.vungle:publisher-sdk-android:6.12.1" />
|
||||||
|
<androidPackage spec="com.google.android.gms:play-services-basement:18.1.0" />
|
||||||
|
<androidPackage spec="com.google.android.gms:play-services-ads-identifier:18.0.1" />
|
||||||
|
<androidPackage spec="androidx.core:core:1.7.0" />
|
||||||
|
<androidPackage spec="org.jetbrains.kotlin:kotlin-stdlib:1.7.10" />
|
||||||
|
<androidPackage spec="org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4" />
|
||||||
|
<androidPackage spec="org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4" />
|
||||||
|
<repositories>
|
||||||
|
<repository>https://artifactory.appodeal.com/appodeal</repository>
|
||||||
|
</repositories>
|
||||||
|
</androidPackages>
|
||||||
|
</dependencies>
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 934a7a1941d9b459e9e8bac106b2b987
|
||||||
|
TextScriptImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
18
Assets/Appodeal/Editor/NetworkConfigs/YandexDependencies.xml
Normal file
18
Assets/Appodeal/Editor/NetworkConfigs/YandexDependencies.xml
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<dependencies>
|
||||||
|
<iosPods>
|
||||||
|
<iosPod name="APDYandexAdapter" version="3.1.3.0" minTargetSdk="11.0" />
|
||||||
|
</iosPods>
|
||||||
|
<androidPackages>
|
||||||
|
<androidPackage spec="com.appodeal.ads.sdk.networks:yandex:3.1.3.0" />
|
||||||
|
<androidPackage spec="com.appodeal.ads.sdk:core:3.1.3" />
|
||||||
|
<androidPackage spec="com.yandex.android:mobileads:5.10.0" />
|
||||||
|
<androidPackage spec="com.yandex.android:mobmetricalib:5.3.0" />
|
||||||
|
<androidPackage spec="org.jetbrains.kotlin:kotlin-stdlib:1.7.10" />
|
||||||
|
<androidPackage spec="org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4" />
|
||||||
|
<androidPackage spec="org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4" />
|
||||||
|
<repositories>
|
||||||
|
<repository>https://artifactory.appodeal.com/appodeal</repository>
|
||||||
|
</repositories>
|
||||||
|
</androidPackages>
|
||||||
|
</dependencies>
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 4a6ba9c97026a492ea15671dd614939a
|
||||||
|
TextScriptImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
8
Assets/Appodeal/Editor/NetworksManager.meta
Normal file
8
Assets/Appodeal/Editor/NetworksManager.meta
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: a30d5928ba4d3451aad806721abfdccd
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
1151
Assets/Appodeal/Editor/NetworksManager/AppodealAdapterManager.cs
Normal file
1151
Assets/Appodeal/Editor/NetworksManager/AppodealAdapterManager.cs
Normal file
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: d36084c2e5a794d83af1233007969ec6
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -0,0 +1,343 @@
|
||||||
|
using System;
|
||||||
|
using System.IO;
|
||||||
|
using System.Xml;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics.CodeAnalysis;
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEditor;
|
||||||
|
using Appodeal.Editor.AppodealManager.Data;
|
||||||
|
|
||||||
|
// ReSharper disable All
|
||||||
|
|
||||||
|
namespace Appodeal.Editor.AppodealManager.AppodealDependencies
|
||||||
|
{
|
||||||
|
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||||
|
[SuppressMessage("ReSharper", "ReturnValueOfPureMethodIsNotUsed")]
|
||||||
|
[SuppressMessage("ReSharper", "UnusedMember.Global")]
|
||||||
|
public static class AppodealDependencyUtils
|
||||||
|
{
|
||||||
|
#region Constants
|
||||||
|
|
||||||
|
public const string PluginRequest = "https://mw-backend.appodeal.com/v2.1/unity";
|
||||||
|
public const string AdaptersRequest = "https://mw-backend.appodeal.com/v2.1/unity/config/";
|
||||||
|
public const string Network_configs_path = "Assets/Appodeal/Editor/NetworkConfigs/";
|
||||||
|
public const string Replace_network_dependency_value = "com.appodeal.ads.sdk.networks:";
|
||||||
|
public const string Replace_service_dependency_value = "com.appodeal.ads.sdk.services:";
|
||||||
|
public const string Replace_dependency_core = "com.appodeal.ads.sdk:core:";
|
||||||
|
public const string ReplaceAdmobDepValue = "com.appodeal.ads.sdk.networks:admob";
|
||||||
|
public const string PackageName = "Name";
|
||||||
|
public const string CurrentVersionHeader = "Current Version";
|
||||||
|
public const string LatestVersionHeader = "Latest Version";
|
||||||
|
public const string ActionHeader = "Action";
|
||||||
|
public const string BoxStyle = "box";
|
||||||
|
public const string ActionUpdate = "Update";
|
||||||
|
public const string ActionImport = "Import";
|
||||||
|
public const string ActionRemove = "Remove";
|
||||||
|
public const string EmptyCurrentVersion = " - ";
|
||||||
|
public const string AppodealUnityPlugin = "Appodeal Unity Plugin";
|
||||||
|
public const string AppodealSdkManager = "Appodeal SDK Manager";
|
||||||
|
public const string Appodeal = "Appodeal";
|
||||||
|
public const string Loading = "Loading...";
|
||||||
|
public const string ProgressBar_cancelled = "Progress bar canceled by the user";
|
||||||
|
public const string AppodealCoreDependencies = "Appodeal Core Dependencies";
|
||||||
|
public const string iOS = "iOS";
|
||||||
|
public const string Android = "Android";
|
||||||
|
public const string AppodealNetworkDependencies = "Appodeal Network Dependencies";
|
||||||
|
public const string AppodealServiceDependencies = "Appodeal Service Dependencies";
|
||||||
|
public const string SpecOpenDependencies = "<dependencies>\n";
|
||||||
|
public const string SpecCloseDependencies = "</dependencies>";
|
||||||
|
public const string XmlFileExtension = ".xml";
|
||||||
|
public const string TwitterMoPub = "TwitterMoPub";
|
||||||
|
public const string GoogleAdMob = "GoogleAdMob";
|
||||||
|
public const string APDAppodealAdExchangeAdapter = "APDAppodealAdExchangeAdapter";
|
||||||
|
public const string Dependencies = "Dependencies";
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
public static FileInfo[] GetInternalDependencyPath()
|
||||||
|
{
|
||||||
|
var info = new DirectoryInfo(Network_configs_path);
|
||||||
|
var fileInfo = info.GetFiles();
|
||||||
|
|
||||||
|
return fileInfo.Length <= 0 ? null : fileInfo.Where(val => !val.Name.Contains("meta")).ToArray();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void ShowInternalErrorDialog(EditorWindow editorWindow, string message, string debugLog)
|
||||||
|
{
|
||||||
|
EditorUtility.ClearProgressBar();
|
||||||
|
Debug.LogError(message);
|
||||||
|
var option = EditorUtility.DisplayDialog("Internal error",
|
||||||
|
$"{message}. Please contact Appodeal support.",
|
||||||
|
"Ok");
|
||||||
|
if (option)
|
||||||
|
{
|
||||||
|
editorWindow.Close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void ShowInternalErrorDialog(EditorWindow editorWindow, string message)
|
||||||
|
{
|
||||||
|
EditorUtility.ClearProgressBar();
|
||||||
|
Debug.LogError(message);
|
||||||
|
var option = EditorUtility.DisplayDialog("Internal error",
|
||||||
|
$"{message}.",
|
||||||
|
"Ok");
|
||||||
|
if (option)
|
||||||
|
{
|
||||||
|
editorWindow.Close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void FormatXml(string inputXml)
|
||||||
|
{
|
||||||
|
var document = new XmlDocument();
|
||||||
|
document.Load(inputXml);
|
||||||
|
using (var writer = new XmlTextWriter(inputXml, Encoding.UTF8))
|
||||||
|
{
|
||||||
|
writer.Formatting = Formatting.Indented;
|
||||||
|
writer.Indentation = 4;
|
||||||
|
document.Save(writer);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string GetConfigName(string value)
|
||||||
|
{
|
||||||
|
var configName = value.Replace(Network_configs_path, string.Empty);
|
||||||
|
return configName.Replace("Dependencies.xml", string.Empty);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string GetiOSContent(string path)
|
||||||
|
{
|
||||||
|
var iOSContent = string.Empty;
|
||||||
|
var lines = File.ReadAllLines(path);
|
||||||
|
foreach (var line in lines)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(line)) continue;
|
||||||
|
|
||||||
|
if (line.Contains("<iosPods>"))
|
||||||
|
{
|
||||||
|
iOSContent += line + "\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (line.Contains("<iosPod name="))
|
||||||
|
{
|
||||||
|
iOSContent += line + "\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (line.Contains("<sources>"))
|
||||||
|
{
|
||||||
|
iOSContent += line + "\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (line.Contains("<source>"))
|
||||||
|
{
|
||||||
|
iOSContent += line + "\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (line.Contains("</sources>"))
|
||||||
|
{
|
||||||
|
iOSContent += line + "\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (line.Contains("</iosPod>"))
|
||||||
|
{
|
||||||
|
iOSContent += line + "\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (line.Contains("</iosPods>"))
|
||||||
|
{
|
||||||
|
iOSContent += line;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return iOSContent;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string GetAndroidContent(string path)
|
||||||
|
{
|
||||||
|
var iOSContent = string.Empty;
|
||||||
|
var lines = File.ReadAllLines(path);
|
||||||
|
foreach (var line in lines)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(line)) continue;
|
||||||
|
|
||||||
|
if (line.Contains("<androidPackages>"))
|
||||||
|
{
|
||||||
|
iOSContent += line + "\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (line.Contains("<androidPackage spec="))
|
||||||
|
{
|
||||||
|
iOSContent += line + "\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (line.Contains("<repositories>"))
|
||||||
|
{
|
||||||
|
iOSContent += line + "\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (line.Contains("<repository>"))
|
||||||
|
{
|
||||||
|
iOSContent += line + "\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (line.Contains("</repositories>"))
|
||||||
|
{
|
||||||
|
iOSContent += line + "\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (line.Contains("</androidPackages>"))
|
||||||
|
{
|
||||||
|
iOSContent += line;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return iOSContent;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string GetAndroidDependencyName(string value)
|
||||||
|
{
|
||||||
|
return value.Substring(value.IndexOf(':') + 1, value.LastIndexOf(':') - value.IndexOf(':') - 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string GetAndroidDependencyVersion(string value)
|
||||||
|
{
|
||||||
|
string androidDependencyVersion = value.Substring(value.LastIndexOf(':') + 1);
|
||||||
|
if (androidDependencyVersion.Contains("@aar"))
|
||||||
|
{
|
||||||
|
androidDependencyVersion = androidDependencyVersion.Substring(0,
|
||||||
|
androidDependencyVersion.IndexOf('@'));
|
||||||
|
}
|
||||||
|
|
||||||
|
return androidDependencyVersion;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string GetMajorVersion(string value)
|
||||||
|
{
|
||||||
|
return value.Substring(0, 6).Remove(0, 5).Insert(0, string.Empty);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string GetAndroidDependencyCoreVersion(string value)
|
||||||
|
{
|
||||||
|
var androidDependencyVersion =
|
||||||
|
value.Replace(Replace_dependency_core, string.Empty);
|
||||||
|
if (androidDependencyVersion.Contains("@aar"))
|
||||||
|
{
|
||||||
|
androidDependencyVersion = androidDependencyVersion.Substring(0,
|
||||||
|
androidDependencyVersion.LastIndexOf("@", StringComparison.Ordinal));
|
||||||
|
}
|
||||||
|
|
||||||
|
return androidDependencyVersion;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string ReplaceBetaVersion(string value)
|
||||||
|
{
|
||||||
|
return Regex.Replace(value, "-Beta", string.Empty);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void ReplaceInFile(
|
||||||
|
string filePath, string searchText, string replaceText)
|
||||||
|
{
|
||||||
|
string contentString;
|
||||||
|
using (var reader = new StreamReader(filePath))
|
||||||
|
{
|
||||||
|
contentString = reader.ReadToEnd();
|
||||||
|
reader.Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
contentString = Regex.Replace(contentString.Replace("\r", ""), searchText, replaceText);
|
||||||
|
|
||||||
|
using (var writer = new StreamWriter(filePath))
|
||||||
|
{
|
||||||
|
writer.Write(contentString);
|
||||||
|
writer.Close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#if UNITY_2018_1_OR_NEWER
|
||||||
|
public static int CompareVersion(string interal, string latest)
|
||||||
|
{
|
||||||
|
var xParts = interal.Split('.');
|
||||||
|
var yParts = latest.Split('.');
|
||||||
|
var partsLength = Math.Max(xParts.Length, yParts.Length);
|
||||||
|
if (partsLength <= 0) return string.Compare(interal, latest, StringComparison.Ordinal);
|
||||||
|
for (var i = 0; i < partsLength; i++)
|
||||||
|
{
|
||||||
|
if (xParts.Length <= i) return -1;
|
||||||
|
if (yParts.Length <= i) return 1;
|
||||||
|
var xPart = xParts[i];
|
||||||
|
var yPart = yParts[i];
|
||||||
|
if (string.IsNullOrEmpty(xPart)) xPart = "0";
|
||||||
|
if (string.IsNullOrEmpty(yPart)) yPart = "0";
|
||||||
|
if (!int.TryParse(xPart, out var xInt) || !int.TryParse(yPart, out var yInt))
|
||||||
|
{
|
||||||
|
var abcCompare = string.Compare(xPart, yPart, StringComparison.Ordinal);
|
||||||
|
if (abcCompare != 0)
|
||||||
|
return abcCompare;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (xInt != yInt) return xInt < yInt ? -1 : 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
public static void GuiHeaders(GUIStyle headerInfoStyle, GUILayoutOption btnFieldWidth)
|
||||||
|
{
|
||||||
|
using (new EditorGUILayout.HorizontalScope(GUILayout.ExpandWidth(false)))
|
||||||
|
{
|
||||||
|
GUILayout.Button(PackageName, headerInfoStyle, GUILayout.Width(150));
|
||||||
|
GUILayout.Space(25);
|
||||||
|
GUILayout.Button(CurrentVersionHeader, headerInfoStyle, GUILayout.Width(110));
|
||||||
|
GUILayout.Space(90);
|
||||||
|
GUILayout.Button(LatestVersionHeader, headerInfoStyle);
|
||||||
|
GUILayout.Button(ActionHeader, headerInfoStyle, btnFieldWidth);
|
||||||
|
GUILayout.Button(string.Empty, headerInfoStyle, GUILayout.Width(5));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static AppodealDependency GetAppodealDependency(SortedDictionary<string, AppodealDependency> dependencies)
|
||||||
|
{
|
||||||
|
return dependencies.First(dep => dep.Key.Contains(Appodeal) && dep.Value != null).Value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||||
|
public static class JsonHelper
|
||||||
|
{
|
||||||
|
public static T[] FromJson<T>(string json)
|
||||||
|
{
|
||||||
|
var wrapper = JsonUtility.FromJson<Wrapper<T>>(json);
|
||||||
|
return wrapper.Items;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string ToJson<T>(T[] array)
|
||||||
|
{
|
||||||
|
var wrapper = new Wrapper<T> {Items = array};
|
||||||
|
return JsonUtility.ToJson(wrapper);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string ToJson<T>(T[] array, bool prettyPrint)
|
||||||
|
{
|
||||||
|
var wrapper = new Wrapper<T>();
|
||||||
|
wrapper.Items = array;
|
||||||
|
return JsonUtility.ToJson(wrapper, prettyPrint);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string fixJson(string value)
|
||||||
|
{
|
||||||
|
value = "{\"Items\":" + value + "}";
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
[Serializable]
|
||||||
|
private class Wrapper<T>
|
||||||
|
{
|
||||||
|
public T[] Items;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user