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); }
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); }
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); }
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); }
public static void DefineAction(string name, Constants.ActionKind kind, ActionArgs args, IDictionary <string, object> options) { LeanplumFactory.SDK.DefineAction(name, kind, args, options, null); }
public static void DefineAction(string name, Constants.ActionKind kind, ActionArgs args) { LeanplumFactory.SDK.DefineAction(name, kind, args, null, null); }
public override void DefineAction(string name, Constants.ActionKind kind, ActionArgs args, IDictionary <string, object> options, Action responder) { }
public abstract void DefineAction(string name, Constants.ActionKind kind, ActionArgs args, IDictionary <string, object> options, ActionContext.ActionResponder responder);