示例#1
0
 public static AnySDKPush getInstance()
 {
     if( null == _instance ) {
         _instance = new AnySDKPush();
     }
     return _instance;
 }
示例#2
0
        public bool callBoolFuncWithParam(string functionName, AnySDKParam param)
        {
            List <AnySDKParam> list = new List <AnySDKParam>();

            list.Add(param);
            return(AnySDKPush.AnySDKPush_nativeCallBoolFuncWithParam(functionName, list.ToArray(), list.Count));
        }
示例#3
0
        public void callFuncWithParam(string functionName, AnySDKParam param)
        {
            List <AnySDKParam> list = new List <AnySDKParam>();

            list.Add(param);
            AnySDKPush.AnySDKPush_nativeCallFuncWithParam(functionName, list.ToArray(), list.Count);
        }
示例#4
0
 public bool callBoolFuncWithParam(string functionName, List <AnySDKParam> param = null)
 {
     if (param == null)
     {
         return(AnySDKPush.AnySDKPush_nativeCallBoolFuncWithParam(functionName, null, 0));
     }
     return(AnySDKPush.AnySDKPush_nativeCallBoolFuncWithParam(functionName, param.ToArray(), param.Count));
 }
示例#5
0
 public static AnySDKPush getInstance()
 {
     if (AnySDKPush._instance == null)
     {
         AnySDKPush._instance = new AnySDKPush();
     }
     return(AnySDKPush._instance);
 }
示例#6
0
        public string getSDKVersion()
        {
            StringBuilder stringBuilder = new StringBuilder();

            stringBuilder.Capacity = 1024;
            AnySDKPush.AnySDKPush_nativeGetSDKVersion(stringBuilder);
            return(stringBuilder.ToString());
        }
示例#7
0
 public static AnySDKPush getInstance()
 {
     if (null == _instance)
     {
         _instance = new AnySDKPush();
     }
     return(_instance);
 }
示例#8
0
        public string callStringFuncWithParam(string functionName, AnySDKParam param)
        {
            List <AnySDKParam> list = new List <AnySDKParam>();

            list.Add(param);
            StringBuilder stringBuilder = new StringBuilder();

            stringBuilder.Capacity = 1024;
            AnySDKPush.AnySDKPush_nativeCallStringFuncWithParam(functionName, list.ToArray(), list.Count, stringBuilder);
            return(stringBuilder.ToString());
        }
示例#9
0
 public void callFuncWithParam(string functionName, List <AnySDKParam> param = null)
 {
     if (param == null)
     {
         AnySDKPush.AnySDKPush_nativeCallFuncWithParam(functionName, null, 0);
     }
     else
     {
         AnySDKPush.AnySDKPush_nativeCallFuncWithParam(functionName, param.ToArray(), param.Count);
     }
 }
示例#10
0
        void OnGUI()
        {
            GUI.color = Color.white;

            GUI.skin.button.fontSize = 30;
            if (GUI.Button(new Rect(5, 5, Screen.width - 10, 70), "startPush"))
            {
                AnySDKPush.getInstance().setDebugMode(true);
                startPush();
            }

            if (GUI.Button(new Rect(5, 80, Screen.width - 10, 70), "closePush"))
            {
                closePush();
            }

            if (GUI.Button(new Rect(5, 155, Screen.width - 10, 70), "setAlias"))
            {
                setAlias("AnySDK");
            }

            if (GUI.Button(new Rect(5, 230, Screen.width - 10, 70), "delAlias"))
            {
                delAlias("AnySDK");
            }


            if (GUI.Button(new Rect(5, 305, Screen.width - 10, 70), "setTags"))
            {
                List <string> tags = new List <string>();
                tags.Add("easy");
                tags.Add("fast");
                setTags(tags);
            }


            if (GUI.Button(new Rect(5, 380, Screen.width - 10, 70), "delTags"))
            {
                List <string> tags = new List <string>();
                tags.Add("easy");
                tags.Add("fast");
                delTags(tags);
            }

            if (GUI.Button(new Rect(5, 455, Screen.width - 10, 70), "return"))
            {
                Destroy(GetComponent("TestPushPlugin"));
                this.gameObject.AddComponent("Test");
            }
        }
示例#11
0
        public string callStringFuncWithParam(string functionName, List <AnySDKParam> param = null)
        {
            StringBuilder stringBuilder = new StringBuilder();

            stringBuilder.Capacity = 1024;
            if (param == null)
            {
                AnySDKPush.AnySDKPush_nativeCallStringFuncWithParam(functionName, null, 0, stringBuilder);
            }
            else
            {
                AnySDKPush.AnySDKPush_nativeCallStringFuncWithParam(functionName, param.ToArray(), param.Count, stringBuilder);
            }
            return(stringBuilder.ToString());
        }
示例#12
0
 void delTags(List <string> tags)
 {
     AnySDKPush.getInstance().delTags(tags);
 }
示例#13
0
 void setTags(List <string> tags)
 {
     AnySDKPush.getInstance().setTags(tags);
 }
示例#14
0
 void delAlias(string alias)
 {
     AnySDKPush.getInstance().delAlias(alias);
 }
示例#15
0
 void setAlias(string alias)
 {
     AnySDKPush.getInstance().setAlias(alias);
 }
示例#16
0
 void closePush()
 {
     AnySDKPush.getInstance().closePush();
 }
示例#17
0
 void startPush()
 {
     AnySDKPush.getInstance().startPush();
 }
示例#18
0
 public void setAlias(string alia)
 {
     AnySDKPush.AnySDKPush_nativeSetAlias(alia);
 }
示例#19
0
 public void delAlias(string alia)
 {
     AnySDKPush.AnySDKPush_nativeDelAlias(alia);
 }
示例#20
0
 public void closePush()
 {
     AnySDKPush.AnySDKPush_nativeClosePush();
 }
示例#21
0
 void Start()
 {
     AnySDKPush.getInstance().setListener(this, "PushExternalCall");
 }
示例#22
0
        public void delTags(List <string> tags)
        {
            string tags2 = AnySDKUtil.ListToString(tags);

            AnySDKPush.AnySDKPush_nativeDelTags(tags2);
        }
示例#23
0
 public void setDebugMode(bool bDebug)
 {
     AnySDKPush.AnySDKPush_nativeSetDebugMode(bDebug);
 }
示例#24
0
 public bool isFunctionSupported(string functionName)
 {
     return(AnySDKPush.AnySDKPush_nativeIsFunctionSupported(functionName));
 }
 private void Start()
 {
     this._instance = AnySDKPush.getInstance();
     this._instance.setListener(this, "PushExternalCall");
 }
示例#26
0
 public void startPush()
 {
     AnySDKPush.AnySDKPush_nativeStartPush();
 }