You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
1001 B
C#
34 lines
1001 B
C#
#if UNITY_ANDROID
|
|
using System;
|
|
using UnityEngine;
|
|
|
|
public class IronSourceInitializationAndroid : AndroidJavaProxy,IUnityInitialization
|
|
{
|
|
public event Action OnSdkInitializationCompletedEvent = delegate { };
|
|
|
|
public IronSourceInitializationAndroid() : base(IronSourceConstants.initializeBridgeListenerClass)
|
|
{
|
|
try
|
|
{
|
|
using (var pluginClass = new AndroidJavaClass(IronSourceConstants.bridgeClass))
|
|
{
|
|
var bridgeInstance = pluginClass.CallStatic<AndroidJavaObject>("getInstance");
|
|
bridgeInstance.Call("setUnityInitializationListener", this);
|
|
}
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
Debug.LogError("setUnityInitializationListener method doesn't exist, error: " + e.Message);
|
|
}
|
|
}
|
|
|
|
void onSdkInitializationCompleted() {
|
|
if (this.OnSdkInitializationCompletedEvent != null)
|
|
{
|
|
this.OnSdkInitializationCompletedEvent();
|
|
}
|
|
}
|
|
}
|
|
|
|
#endif
|