private void PrivateInitialize(int applicationId, string secret, GrowthPush.Environment environment, bool debug, string senderId) { #if UNITY_ANDROID && !UNITY_EDITOR if (growthPush == null) { return; } AndroidJavaClass environmentClass = new AndroidJavaClass("com.growthpush.model.Environment"); AndroidJavaObject environmentObject = environmentClass.GetStatic <AndroidJavaObject>(environment == GrowthPush.Environment.Production ? "production" : "development"); AndroidJavaClass unityPlayer = new AndroidJavaClass("com.unity3d.player.UnityPlayer"); AndroidJavaObject activity = unityPlayer.GetStatic <AndroidJavaObject>("currentActivity"); growthPush.Call <AndroidJavaObject>("initialize", activity, applicationId, secret, environmentObject, debug); growthPush.Call <AndroidJavaObject>("register", senderId); #endif }
public static void Initialize(int applicationID, string secrect, GrowthPush.Environment environment, bool debug) { #if UNITY_IPHONE && !UNITY_EDITOR growthPushSetApplicationId(applicationID, secrect, (int)environment, debug); #endif }
public static void Initialize(int applicationId, string secret, GrowthPush.Environment environment, bool debug, string senderId) { instance.PrivateInitialize(applicationId, secret, environment, debug, senderId); }