changeNotificationQuietHours method
Future<int>
changeNotificationQuietHours(
- String startTime,
- int spanMinutes,
- RCIMIWPushNotificationQuietHoursLevel level, {
- IRCIMIWChangeNotificationQuietHoursCallback? callback,
ZH
屏蔽某个时间段的消息提醒
startTime开始消息免打扰时间,格式为 HH:MM:SSspanMinutes需要消息免打扰分钟数,0 < spanMinutes < 1440( 比如,您设置的起始时间是 00:00, 结束时间为 01:00,则 spanMinutes 为 60 分钟。设置为 1439 代表全天免打扰 (23 60 + 59 = 1439 ))level消息通知级别callback事件回调。SDK 从 5.3.1 版本开始支持 callback 方式回调。从 5.4.0 版本废弃该接口的其他回调方式,预计将在 6.x 版本删除此其他回调方式。如果传入了 callback 参数,仅触发 callback 回调。返回值当次接口操作的状态码。0 代表调用成功 具体结果需要实现接口回调,非 0 代表当前接口调用操作失败,不会触发接口回调,详细错误参考错误码接口回调onNotificationQuietHoursChanged
EN
Mute Message Notifications for a Specific Time Period
startTimeSpecifies the start time for muting message notifications, in the formatHH:MM:SS.spanMinutesThe duration in minutes for muting message notifications, where0 < spanMinutes < 1440. For example, if the start time is00:00and the end time is01:00, thenspanMinuteswould be60. Setting it to1439represents a full day of muting (23 60 + 59 = 1439).levelThe notification level for messages.callbackThe event callback. Starting from SDK version 5.3.1, the callback method is supported. Other callback methods for this interface were deprecated in version 5.4.0 and are expected to be removed in version 6.x. If thecallbackparameter is provided, only the callback method will be triggered. The status code for the current operation.0indicates a successful call, and the specific result requires implementing the callback interface. Non-zero values indicate that the current operation failed, and the callback will not be triggered. Refer to the error codes for detailed error information.
此接口不支持 Flutter For Web 端
Implementation
Future<int> changeNotificationQuietHours(
String startTime,
int spanMinutes,
RCIMIWPushNotificationQuietHoursLevel level, {
IRCIMIWChangeNotificationQuietHoursCallback? callback,
}) async {
return RCIMWrapperPlatform.instance.changeNotificationQuietHours(startTime, spanMinutes, level, callback: callback);
}