public InteractionMode(string name, stringOrID prompt, Activity activity, stringOrID directive = default(stringOrID), ActivityFlags flags = ActivityFlags.SingleTop) { Name = name; PromptText = prompt; Launches = activity; Flags = flags; Directive = directive; }
/// <summary> /// This method is used to declare a new tag type and register it with our dictionary so it can be located by name later. /// </summary> /// <param name="name">The name you'll refer to this tag type by. Used mostly as a dictionary key.</param> /// <param name="promptString">A string, or resource ID, for a "what to do with this" prompt. May become obsolete.</param> /// <param name="activity">An activity, usually a new instance of (the specific Activity-derived class) you want such tags to launch.</param> /// <param name="directive">Any additional information you wish to bundle up and include when the Activity is being launched (like "calibration" rather than the real thing) should be stringified into this.</param> /// <param name="flags">Android ActivityFlag(s) describing how the launched activity behaves - does it claim the foreground (the default), does it move straight to background, etc.</param> /// <returns></returns> public static InteractionMode DefineInteractionMode(string name, stringOrID promptString, Activity activity, stringOrID directive = default(stringOrID), ActivityFlags flags = ActivityFlags.SingleTop) { var direc = (stringOrID)directive; InteractionMode newMode = new InteractionMode { Name = name, PromptText = promptString, Launches = activity, Directive = direc, Flags = flags }; if (InteractionModes.ContainsKey(name)) { InteractionModes[name] = newMode; } else { InteractionModes.Add(name, newMode); } return(newMode); }