コード例 #1
0
        public override void DefineAction(string name, Constants.ActionKind kind, ActionArgs args, IDictionary <string, object> options, ActionContext.ActionResponder responder)
        {
            if (name == null)
            {
                return;
            }
            if (responder != null)
            {
                ActionRespondersDictionary.Add(name, responder);
            }

            string argString    = args == null ? null : args.ToJSON();
            string optionString = options == null ? null : Json.Serialize(options);

            lp_defineAction(name, (int)kind, argString, optionString);
        }
コード例 #2
0
        public override void DefineAction(string name, Constants.ActionKind kind, ActionArgs args, IDictionary <string, object> options, Action responder)
        {
            if (name == null)
            {
                return;
            }
            if (responder != null)
            {
                ActionRespondersDictionary.Add("ActionResponder:" + name, responder);
            }

            string argString    = args == null ? null : args.ToJSON();
            string optionString = options == null ? null : Json.Serialize(options);
            int    kindInt      = (int)kind;

            NativeSDK.CallStatic("defineAction", name, kindInt, argString, optionString);
        }
コード例 #3
0
        public static void DefineOpenURL()
        {
            ActionArgs actionArgs = new ActionArgs();

            actionArgs.With <string>(Constants.Args.URL, "https://www.example.com");

            ActionContext.ActionResponder responder = new ActionContext.ActionResponder((context) =>
            {
                string url = context.GetStringNamed(Constants.Args.URL);
                if (!string.IsNullOrEmpty(url))
                {
                    Application.OpenURL(url);
                }
            });

            Leanplum.DefineAction(Constants.Args.OPEN_URL, Constants.ActionKind.ACTION, actionArgs, null, responder);
        }
コード例 #4
0
 public static void DefineAction(string name, Constants.ActionKind kind, ActionArgs args, IDictionary <string, object> options, ActionContext.ActionResponder responder)
 {
     LeanplumFactory.SDK.DefineAction(name, kind, args, options, responder);
 }
コード例 #5
0
 public static void DefineAction(string name, Constants.ActionKind kind, ActionArgs args, IDictionary <string, object> options)
 {
     LeanplumFactory.SDK.DefineAction(name, kind, args, options, null);
 }
コード例 #6
0
 public static void DefineAction(string name, Constants.ActionKind kind, ActionArgs args)
 {
     LeanplumFactory.SDK.DefineAction(name, kind, args, null, null);
 }
コード例 #7
0
 public override void DefineAction(string name, Constants.ActionKind kind, ActionArgs args, IDictionary <string, object> options, Action responder)
 {
 }
コード例 #8
0
 public abstract void DefineAction(string name, Constants.ActionKind kind, ActionArgs args,
                                   IDictionary <string, object> options, ActionContext.ActionResponder responder);