コード例 #1
0
        static PitayaBinding()
        {
            NativeRequestCallback = OnRequest;
            NativeEventCallback   = OnEvent;
            NativePushCallback    = OnPush;
            NativeNotifyCallback  = OnNotify;
            NativeErrorCallback   = OnError;

            SetLogFunction(LogFunction);
            NativeLibInit((int)_currentLogLevel, null, null, OnAssert, Platform(), BuildNumber(), Application.version);
        }
コード例 #2
0
        static StaticPitayaBinding()
        {
            NativeRequestCallback = OnRequest;
            NativeEventCallback   = OnEvent;
            NativePushCallback    = OnPush;
            NativeNotifyCallback  = OnNotify;
            NativeErrorCallback   = OnError;

            SetLogFunction(LogFunction);
#if UNITY_ANDROID
            InitializeNativeLib();
#endif
        }
コード例 #3
0
        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);
        }
コード例 #4
0
 private static extern int NativeAddPushHandler(IntPtr client, NativePushCallback callback);