/// <summary> /// A method to create and save an Action with Text Input for a specific Category Id. /// See UNTextInputNotificationAction.FromIdentifier. /// </summary> /// <remarks> /// Should be called before AddCategory for this Category Id in order to have action attached to the category. /// </remarks> /// <param name="categoryId">Identifier for the Category connected with this Action.</param> /// <param name="actionId"> /// The string that you use internally to identify the Action. /// This string must be unique among all of your app's supported Actions. /// </param> /// <param name="title">Localized string that will be displayed on Action button.</param> /// <param name="options">Additional options describing how the Action behaves.</param> /// <param name="textInputButtonTitle"> /// The localized title of the text input button that is displayed to the user. /// </param> /// <param name="textInputPlaceholder">The localized placeholder text to display in the text input field.</param> protected void AddTextInputAction( string categoryId, string actionId, string title, UNNotificationActionOptions options, string textInputButtonTitle, string textInputPlaceholder) { var action = UNTextInputNotificationAction.FromIdentifier( actionId, title, options, textInputButtonTitle ?? string.Empty, textInputPlaceholder ?? string.Empty); SaveAction(categoryId, action); }
/// <summary> /// A method to create and save an Action for a specific Category Id. See UNNotificationAction.FromIdentifier. /// </summary> /// <remarks> /// Should be called before AddCategory for this Category Id in order to have action attached to the category. /// </remarks> /// <param name="categoryId">Identifier for the Category connected with this Action.</param> /// <param name="actionId"> /// The string that you use internally to identify the Action. /// This string must be unique among all of your app's supported Actions. /// </param> /// <param name="title">Localized string that will be displayed on Action button (probably localized).</param> /// <param name="options">Additional options describing how the Action behaves.</param> protected void AddAction(string categoryId, string actionId, string title, UNNotificationActionOptions options) { var action = UNNotificationAction.FromIdentifier(actionId, title, options); SaveAction(categoryId, action); }