static PitayaBinding() { NativeRequestCallback = OnRequest; NativeEventCallback = OnEvent; NativePushCallback = OnPush; NativeNotifyCallback = OnNotify; NativeErrorCallback = OnError; SetLogFunction(LogFunction); NativeLibInit((int)_currentLogLevel, null, null, OnAssert, Platform(), BuildNumber(), Application.version); }
static StaticPitayaBinding() { NativeRequestCallback = OnRequest; NativeEventCallback = OnEvent; NativePushCallback = OnPush; NativeNotifyCallback = OnNotify; NativeErrorCallback = OnError; SetLogFunction(LogFunction); #if UNITY_ANDROID InitializeNativeLib(); #endif }
static PitayaBinding() { NativeRequestCallback = OnRequest; NativeEventCallback = OnEvent; NativePushCallback = OnPush; NativeNotifyCallback = OnNotify; NativeErrorCallback = OnError; string platform; switch (Application.platform) { case RuntimePlatform.Android: platform = "android"; break; case RuntimePlatform.LinuxEditor: case RuntimePlatform.LinuxPlayer: platform = "linux"; break; case RuntimePlatform.WindowsEditor: case RuntimePlatform.WindowsPlayer: platform = "windows"; break; case RuntimePlatform.IPhonePlayer: platform = "ios"; break; case RuntimePlatform.OSXEditor: case RuntimePlatform.OSXPlayer: platform = "mac"; break; default: platform = Application.platform.ToString(); break; } SetLogFunction(LogFunction); NativeLibInit((int)_currentLogLevel, null, null, OnAssert, platform, BuildNumber(), Application.version); }
private static extern int NativeAddPushHandler(IntPtr client, NativePushCallback callback);