Skip to content

Commit

Permalink
Merge pull request #1 from tapsellorg/release/1.0.1-beta07
Browse files Browse the repository at this point in the history
release: 1.0.1 beta07
  • Loading branch information
MortezaNedaei authored Jul 6, 2024
2 parents b38ef63 + 36c71d0 commit a4986d5
Show file tree
Hide file tree
Showing 63 changed files with 655 additions and 39 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added Assets/GoogleMobileAds/GoogleMobileAds.Ump.dll
Binary file not shown.
Binary file not shown.
Binary file added Assets/GoogleMobileAds/GoogleMobileAds.dll
Binary file not shown.
10 changes: 10 additions & 0 deletions Assets/GoogleMobileAds/link.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<linker>
<assembly fullname="GoogleMobileAds.Android" ignoreIfMissing="1">
<namespace fullname="GoogleMobileAds" preserve="all" />
<namespace fullname="GoogleMobileAds.Android" preserve="all" />
</assembly>
<assembly fullname="GoogleMobileAds.Ump.Android" ignoreIfMissing="1">
<namespace fullname="GoogleMobileAds" preserve="all" />
<namespace fullname="GoogleMobileAds.Ump.Android" preserve="all" />
</assembly>
</linker>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<dependencies>
<androidPackages>
<androidPackage spec="com.google.code.gson:gson:2.8.5" />
</androidPackages>
</dependencies>
Binary file not shown.
Binary file not shown.
Binary file not shown.
6 changes: 6 additions & 0 deletions Assets/GoogleMobileAdsNative/link.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<linker>
<assembly fullname="GoogleMobileAdsNative.Android" ignoreIfMissing="1">
<namespace fullname="GoogleMobileAds" preserve="all" />
<namespace fullname="GoogleMobileAds.Android" preserve="all" />
</assembly>
</linker>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="ir.tapsell.mediation.adapter.admob">
<application>
<meta-data android:name="com.google.android.gms.ads.APPLICATION_ID" android:value="ca-app-pub-6201798499291567~9611758993" />
</application>
</manifest>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="ir.tapsell.mediation.adapter.admob">
<application>
<meta-data android:name="com.google.android.gms.ads.APPLICATION_ID" android:value="ca-app-pub-6201798499291567~9611758993" />
</application>
</manifest>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="ir.tapsell.mediation.adapter.applovin">
<application>
<meta-data android:name="applovin.sdk.key" android:value="5WfZLCGTQmDr6Mf7BBEf5blVwrf8VBMJSmwUSq9-1q5bPpCH_OGAWEP2z2lRkmonLgPzG6gbL4DlvUF9frFmt6" />
</application>
</manifest>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="ir.tapsell.mediation.adapter.applovin">
<application>
<meta-data android:name="applovin.sdk.key" android:value="5WfZLCGTQmDr6Mf7BBEf5blVwrf8VBMJSmwUSq9-1q5bPpCH_OGAWEP2z2lRkmonLgPzG6gbL4DlvUF9frFmt6" />
</application>
</manifest>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="ir.tapsell.mediation">
<application>
<meta-data android:name="ir.tapsell.mediation.APPLICATION_KEY" android:value="a12e38ed-f1fc-4c76-b638-55f06c103066" />
<meta-data android:name="ir.tapsell.mediation.APPLICATION_KEY" android:value="76798342-99a7-4a5f-bf5a-60a088d5dcfb" />
</application>
</manifest>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="ir.tapsell.mediation">
<application>
<meta-data android:name="ir.tapsell.mediation.APPLICATION_KEY" android:value="a12e38ed-f1fc-4c76-b638-55f06c103066" />
</application>
</manifest>
Binary file not shown.
Binary file added Assets/Plugins/Android/googlemobileads-unity.aar
Binary file not shown.
10 changes: 8 additions & 2 deletions Assets/Plugins/Android/mainTemplate.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,14 @@ apply plugin: 'com.android.library'
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
// Android Resolver Dependencies Start
implementation 'ir.tapsell.mediation.adapter:legacy-unity:1.0.1-beta04' // Assets/Tapsell/Mediation/Adapter/Legacy/Editor/LegacyAdapterDependencies.xml:3
implementation 'ir.tapsell.mediation:tapsell-unity:1.0.1-beta04' // Assets/Tapsell/Mediation/Editor/MediationDependencies.xml:3
implementation 'com.google.code.gson:gson:2.8.5' // Assets/GoogleMobileAdsNative/Editor/GoogleMobileAdsNativeDependencies.xml:3
implementation 'ir.tapsell.mediation.adapter:admob-unity:1.0.1-beta07' // Assets/Tapsell/Mediation/Adapter/Admob/Editor/AdmobAdapterDependencies.xml:7
implementation 'ir.tapsell.mediation.adapter:applovin-unity:1.0.1-beta07' // Assets/Tapsell/Mediation/Adapter/Applovin/Editor/ApplovinAdapterDependencies.xml:7
implementation 'ir.tapsell.mediation.adapter:fyber-unity:1.0.1-beta07' // Assets/Tapsell/Mediation/Adapter/Fyber/Editor/FyberAdapterDependencies.xml:7
implementation 'ir.tapsell.mediation.adapter:ironsource-unity:1.0.1-beta07' // Assets/Tapsell/Mediation/Adapter/IronSource/Editor/IronSourceAdapterDependencies.xml:3
implementation 'ir.tapsell.mediation.adapter:legacy-unity:1.0.1-beta07' // Assets/Tapsell/Mediation/Adapter/Legacy/Editor/LegacyAdapterDependencies.xml:3
implementation 'ir.tapsell.mediation.adapter:mintegral-unity:1.0.1-beta07' // Assets/Tapsell/Mediation/Adapter/Mintegral/Editor/MintegralAdapterDependencies.xml:8
implementation 'ir.tapsell.mediation:tapsell-unity:1.0.1-beta07' // Assets/Tapsell/Mediation/Editor/MediationDependencies.xml:3
// Android Resolver Dependencies End
**DEPS**}

Expand Down
6 changes: 6 additions & 0 deletions Assets/Plugins/Android/settingsTemplate.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ dependencyResolutionManagement {
mavenCentral()
// Android Resolver Repos Start
def unityProjectPath = $/file:///**DIR_UNITYPROJECT**/$.replace("\\", "/")
maven {
url "https://android-sdk.is.com" // Assets/Tapsell/Mediation/Adapter/IronSource/Editor/IronSourceAdapterDependencies.xml:6, Assets/Tapsell/Mediation/Adapter/Admob/Editor/AdmobAdapterDependencies.xml:7, Assets/Tapsell/Mediation/Adapter/Applovin/Editor/ApplovinAdapterDependencies.xml:7, Assets/Tapsell/Mediation/Adapter/Fyber/Editor/FyberAdapterDependencies.xml:7, Assets/Tapsell/Mediation/Adapter/Mintegral/Editor/MintegralAdapterDependencies.xml:8
}
maven {
url "https://dl-maven-android.mintegral.com/repository/mbridge_android_sdk_oversea" // Assets/Tapsell/Mediation/Adapter/Mintegral/Editor/MintegralAdapterDependencies.xml:8
}
mavenLocal()
// Android Resolver Repos End
flatDir {
Expand Down
Binary file added Assets/Plugins/Google.MiniJson.dll
Binary file not shown.
13 changes: 13 additions & 0 deletions Assets/Sample/Scenes/MainScene.unity
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,7 @@ GameObject:
- component: {fileID: 519420032}
- component: {fileID: 519420031}
- component: {fileID: 519420029}
- component: {fileID: 519420033}
m_Layer: 0
m_Name: Main Camera
m_TagString: MainCamera
Expand Down Expand Up @@ -413,6 +414,18 @@ Transform:
- {fileID: 444580470}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &519420033
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 519420028}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 837fb6d38bbd404d82cccfb5eee40333, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &604960663
GameObject:
m_ObjectHideFlags: 0
Expand Down
5 changes: 3 additions & 2 deletions Assets/Sample/Scripts/BannerScene.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
using Tapsell.Mediation.Request;
using Sample.Scripts;
using Tapsell.Mediation.Request;
using Tapsell.Mediation.Show.Banner;
using UnityEngine;

public class BannerScene : MonoBehaviour
{
private const string ZoneID = "bbf65b62-293b-4a34-a39d-8b3acab15771";
private const string ZoneID = TapsellMediationKeys.BANNER;
private static string _adId;
private static BannerPosition _position = BannerPosition.Top;
private static BannerSize _size = BannerSize.Banner32050;
Expand Down
5 changes: 3 additions & 2 deletions Assets/Sample/Scripts/InterstitialScene.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
using UnityEngine;
using Sample.Scripts;
using UnityEngine;

public class InterstitialScene : MonoBehaviour
{
private const string ZoneID = "313f90de-f6f0-4e37-a3b3-d9bacceba92f";
private const string ZoneID = TapsellMediationKeys.INTERSTITIAL;
private static string _adId = "";

public void Request()
Expand Down
17 changes: 17 additions & 0 deletions Assets/Sample/Scripts/MainScene.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using System;
using UnityEngine;

public class MainScene : MonoBehaviour
{
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.AfterSceneLoad)]
private static void OnRuntimeInitialize()
{
// send result of user consent dialog to Tapsell.
SetUserConsent();
}

private static void SetUserConsent()
{
Tapsell.Mediation.Tapsell.SetUserConsent(true);
}
}
6 changes: 3 additions & 3 deletions Assets/Sample/Scripts/NativeScene.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
using Tapsell.Mediation.Show.Native;
using Sample.Scripts;
using Tapsell.Mediation.Show.Native;
using UnityEngine;

public class NativeScene : MonoBehaviour
{
private const string ZoneID = "a1822306-55be-4a30-aadd-368dba61a64e";
private const string ZoneID = TapsellMediationKeys.NATIVE;
private static string _adId;

private static int _viewType = 0;

public void Request()
Expand Down
5 changes: 3 additions & 2 deletions Assets/Sample/Scripts/RewardedScene.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
using UnityEngine;
using Sample.Scripts;
using UnityEngine;

public class RewardedScene : MonoBehaviour
{
private const string ZoneID = "cce935f9-15a0-4cfa-98a6-3f3e3981bca0";
private const string ZoneID = TapsellMediationKeys.REWARDED;
private static string _adId;

public void Request()
Expand Down
5 changes: 0 additions & 5 deletions Assets/Sample/Scripts/SceneManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@

public class SceneManager : MonoBehaviour
{
private void Start()
{
// send result of user consent dialog to Tapsell.
Tapsell.Mediation.Tapsell.SetUserConsent(true);
}

public void ChangeScene(string sceneName)
{
Expand Down
70 changes: 70 additions & 0 deletions Assets/Sample/Scripts/TapsellMediationKeys.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
using System;
namespace Sample.Scripts
{

public static class TapsellMediationKeys {
public const string REWARDED = "1d710cc7-5e96-46ac-a3e9-8463300333e6";
public const string INTERSTITIAL = "b3972749-f62a-475a-9ff2-cfc9e2a40f87";
public const string NATIVE = "d217e3e6-0070-4120-925d-5d39d0298893";
public const string BANNER = "e3d5999c-5990-4e31-8ce9-642ce040a7f4";
}

public static class LegacyKeys {
public const string REWARDED = "63b92f04-3d0f-4805-84a4-abeccf4edc18";
public const string INTERSTITIAL = "0c4e2849-feea-4688-8280-0b0ae2ee0728";
public const string NATIVE = "b1b92bca-8a54-4b82-9f53-90ea2b1a912c";
public const string BANNER = "4bf4e11d-0967-41e6-91f6-a128d9462f2a";
}

public static class AdmobKeys {
public const string REWARDED = "d8f4ff72-e2e9-4e67-9eb8-f6d75787ef09";
public const string INTERSTITIAL = "48b73764-8025-4c9d-9507-ce7a2c7f32ef";
public const string NATIVE = "15cacb1b-6598-4fe9-b2da-8b26b4c1bbc5";
public const string BANNER = "f965455e-a37a-4732-a0b4-05fc39cae16e";
}

public static class ApplovinKeys {
public const string REWARDED = "1abf9ca9-4f93-4ead-a238-b2d0d3032a7a";
public const string INTERSTITIAL = "8c33dc60-5911-4145-90b0-d8cce9594fed";
public const string NATIVE = "2db08af5-54e3-458e-9399-1d365a7516c9";
public const string BANNER = "1df4bf1e-4fef-4704-b776-7881bdad5303";
}

public static class MintegralKeys {
public const string REWARDED = "b4c24eba-b715-47aa-8e6e-641d19936765";
public const string INTERSTITIAL = "b2ef073b-f9a1-4555-8450-ce30cf3cee98";
public const string NATIVE = "1a744a71-5abe-4d4a-8323-3832c89495eb";
public const string BANNER = "6c0b2878-c743-4668-b224-00b07ed66550";
}

public static class IronSourceKeys {
public const string REWARDED = "59ea106a-10c2-4711-9b50-38c73200f56a";
public const string INTERSTITIAL = "e87e094b-1e51-468c-ba0c-b2752dc04d72";
public const string BANNER = "33063aae-07c0-4571-aeac-842c0c7f6478";
}

public static class LiftoffKeys {
public const string REWARDED = "0f447ea1-6b11-4e39-b942-712e2d696d78";
public const string INTERSTITIAL = "2316460a-fbcc-4e29-8a8e-f10ef5358b3b";
public const string BANNER = "c066375e-da10-45a8-be3b-6edf5668a0e4";
}

public static class ChartBoostKeys {
public const string REWARDED = "3dde311c-daf5-4a6b-8ce7-08a4103cfb7f";
public const string INTERSTITIAL = "0d3e6f6d-8a11-4c32-a076-4415c03132a9";
public const string BANNER = "0d3e6f6d-8a11-4c32-a076-4415c03132a9";
}

public static class WortiseKeys {
public const string REWARDED = "4fcf71a4-afd1-412d-9b19-46dd85644f9d";
public const string INTERSTITIAL = "4d268df4-7e8a-43d8-a014-02b4aeff1e72";
public const string NATIVE = "88eab80b-113b-4856-8dc2-4aa571c4d7c3";
public const string BANNER = "ddd6c321-1f1f-4396-8524-a4f760063b2f";
}

public static class FyberKeys {
public const string REWARDED = "1756532";
public const string INTERSTITIAL = "1756532";
public const string BANNER = "1756531";
}
}
18 changes: 18 additions & 0 deletions Assets/Tapsell/Mediation/Adapter/Admob/AdmobAndroidCaller.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#if UNITY_ANDROID

using UnityEngine;

namespace Tapsell.Mediation.Adapter.Admob
{
internal static class AdmobAndroidCaller
{
private static readonly AndroidJavaClass AndroidClass = new AndroidJavaClass("ir.tapsell.mediation.adapter.admob.unity.Admob");

internal static void Call(string methodName, params object[] args)
{
AndroidClass.CallStatic(methodName, args);
}
}
}

#endif
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
using Tapsell.Mediation.Messaging;
using Tapsell.Mediation.Show.Native;
using UnityEngine;

namespace Tapsell.Mediation.Adapter.Admob
{
internal class AdmobAndroidMessageListener : TapsellAndroidMessageListener
{
public void OnAdmobNativeAdRequest(string response)
{
NativeAdapter.Get()
.RequestNativeAd(JsonUtility.FromJson<NativeRequestInfo>(response));
}

public void OnAdmobNativeAdShow(string requestId)
{
NativeAdapter.Get().ShowNativeAd(requestId, NativeAdViewHolder.Get().GetNativeAdView(requestId));
}

public void OnAdmobNativeAdDestroy(string requestId)
{
NativeAdapter.Get().DestroyNativeAd(requestId);
}
}
}
14 changes: 14 additions & 0 deletions Assets/Tapsell/Mediation/Adapter/Admob/AdmobInitializer.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using Tapsell.Mediation.Messaging;
using UnityEngine;

namespace Tapsell.Mediation.Adapter.Admob
{
internal static class AdmobInitializer
{
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)]
private static void OnRuntimeInitialize()
{
AndroidMessageReceiver.RegisterReceiver<AdmobAndroidMessageListener>();
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<dependencies>
<androidPackages>
<androidPackage spec="ir.tapsell.mediation.adapter:admob-unity:1.0.1-beta07">
<repositories>
<repository>https://android-sdk.is.com</repository>
</repositories>
</androidPackage>
</androidPackages>
</dependencies>
Loading

0 comments on commit a4986d5

Please sign in to comment.