/* * Copyright (c) 2022-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"), * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** * @file * @kit NotificationKit */ import { AsyncCallback } from './@ohos.base'; import { BundleOption as _BundleOption } from './notification/NotificationCommonDef'; import { NotificationActionButton as _NotificationActionButton } from './notification/notificationActionButton'; import { NotificationBasicContent as _NotificationBasicContent } from './notification/notificationContent'; import { NotificationContent as _NotificationContent } from './notification/notificationContent'; import { NotificationLongTextContent as _NotificationLongTextContent } from './notification/notificationContent'; import type { NotificationLiveViewContent as _NotificationLiveViewContent } from './notification/notificationContent'; import { NotificationMultiLineContent as _NotificationMultiLineContent } from './notification/notificationContent'; import { NotificationPictureContent as _NotificationPictureContent } from './notification/notificationContent'; import type { LiveViewStatus as _LiveViewStatus } from './notification/notificationContent'; import { NotificationSystemLiveViewContent as _NotificationSystemLiveViewContent } from './notification/notificationContent'; import { NotificationCapsule as _NotificationCapsule } from './notification/notificationContent'; import { NotificationButton as _NotificationButton } from './notification/notificationContent'; import { NotificationTime as _NotificationTime } from './notification/notificationContent'; import { NotificationProgress as _NotificationProgress } from './notification/notificationContent'; import { NotificationFlags as _NotificationFlags } from './notification/notificationFlags'; import { NotificationFlagStatus as _NotificationFlagStatus } from './notification/notificationFlags'; import { NotificationRequest as _NotificationRequest } from './notification/notificationRequest'; import { UnifiedGroupInfo as _UnifiedGroupInfo } from './notification/notificationRequest'; import { DistributedOptions as _DistributedOptions } from './notification/notificationRequest'; import type { NotificationFilter as _NotificationFilter } from './notification/notificationRequest'; import type { NotificationCheckRequest as _NotificationCheckRequest } from './notification/notificationRequest'; import { NotificationSlot as _NotificationSlot } from './notification/notificationSlot'; import { NotificationSorting as _NotificationSorting } from './notification/notificationSorting'; import { NotificationTemplate as _NotificationTemplate } from './notification/notificationTemplate'; import { NotificationUserInput as _NotificationUserInput } from './notification/notificationUserInput'; import type UIAbilityContext from './application/UIAbilityContext'; /** * Manages notifications. *
Generally, only system applications have permissions on notification subscription and unsubscribe. * You can specify the content of a notification to be published and the content is carried by * {@link NotificationRequest}. A notification ID is unique in an application and must be specified * when using {@link NotificationRequest} to carry the notification content. If a notification * with this ID has been published and you need to use this ID to publish another notification, * the original notification will be updated. In addition, the notification ID can be used to cancel * a notification by calling the {@link #cancel(int)} method. * * @namespace notificationManager * @syscap SystemCapability.Notification.Notification * @since 9 */ declare namespace notificationManager { /** * Publishes a notification. *
If a notification with the same ID has been published by the current application and has not been deleted,
* this method will update the notification.
*
* @param { NotificationRequest } request - notification request
* @param { AsyncCallback If a notification with the same ID has been published by the current application and has not been deleted,
* this method will update the notification.
*
* @param { NotificationRequest } request - notification request
* @param { AsyncCallback If a notification with the same ID has been published by the current application and has not been deleted,
* this method will update the notification.
*
* @param { NotificationRequest } request - notification request
* @param { AsyncCallback If a notification with the same ID has been published by the current application and has not been deleted,
* this method will update the notification.
*
* @param { NotificationRequest } request - notification request
* @returns { Promise If a notification with the same ID has been published by the current application and has not been deleted,
* this method will update the notification.
*
* @param { NotificationRequest } request - notification request
* @returns { Promise If a notification with the same ID has been published by the current application and has not been deleted,
* this method will update the notification.
*
* @param { NotificationRequest } request - notification request
* @returns { Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 1600004 - Notification disabled.
* @throws { BusinessError } 1600005 - Notification slot disabled.
* @throws { BusinessError } 1600009 - The notification sending frequency reaches the upper limit.
* @throws { BusinessError } 1600012 - No memory space.
* @syscap SystemCapability.Notification.Notification
* @since 9
*/
/**
* Publishes a notification.
*
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 1600004 - Notification disabled.
* @throws { BusinessError } 1600005 - Notification slot disabled.
* @throws { BusinessError } 1600007 - The notification does not exist.
* @throws { BusinessError } 1600009 - The notification sending frequency reaches the upper limit.
* @throws { BusinessError } 1600012 - No memory space.
* @throws { BusinessError } 1600014 - No permission.
* @throws { BusinessError } 1600015 - The current notification status does not support duplicate configurations.
* @throws { BusinessError } 1600016 - The notification version for this update is too low.
* @throws { BusinessError } 2300007 - Network unreachable.
* @syscap SystemCapability.Notification.Notification
* @since 11
*/
/**
* Publishes a notification.
*
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 1600004 - Notification disabled.
* @throws { BusinessError } 1600005 - Notification slot disabled.
* @throws { BusinessError } 1600007 - The notification does not exist.
* @throws { BusinessError } 1600009 - The notification sending frequency reaches the upper limit.
* @throws { BusinessError } 1600012 - No memory space.
* @throws { BusinessError } 1600014 - No permission.
* @throws { BusinessError } 1600015 - The current notification status does not support duplicate configurations.
* @throws { BusinessError } 1600016 - The notification version for this update is too low.
* @throws { BusinessError } 2300007 - Network unreachable.
* @syscap SystemCapability.Notification.Notification
* @crossplatform
* @since 12
*/
function publish(request: NotificationRequest, callback: AsyncCallback
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 1600004 - Notification disabled.
* @throws { BusinessError } 1600005 - Notification slot disabled.
* @throws { BusinessError } 1600009 - The notification sending frequency reaches the upper limit.
* @throws { BusinessError } 1600012 - No memory space.
* @syscap SystemCapability.Notification.Notification
* @since 9
*/
/**
* Publishes a notification.
*
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 1600004 - Notification disabled.
* @throws { BusinessError } 1600005 - Notification slot disabled.
* @throws { BusinessError } 1600007 - The notification does not exist.
* @throws { BusinessError } 1600009 - The notification sending frequency reaches the upper limit.
* @throws { BusinessError } 1600012 - No memory space.
* @throws { BusinessError } 1600014 - No permission.
* @throws { BusinessError } 1600015 - The current notification status does not support duplicate configurations.
* @throws { BusinessError } 1600016 - The notification version for this update is too low.
* @throws { BusinessError } 2300007 - Network unreachable.
* @syscap SystemCapability.Notification.Notification
* @since 11
*/
/**
* Publishes a notification.
*
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 1600004 - Notification disabled.
* @throws { BusinessError } 1600005 - Notification slot disabled.
* @throws { BusinessError } 1600007 - The notification does not exist.
* @throws { BusinessError } 1600009 - The notification sending frequency reaches the upper limit.
* @throws { BusinessError } 1600012 - No memory space.
* @throws { BusinessError } 1600014 - No permission.
* @throws { BusinessError } 1600015 - The current notification status does not support duplicate configurations.
* @throws { BusinessError } 1600016 - The notification version for this update is too low.
* @throws { BusinessError } 2300007 - Network unreachable.
* @syscap SystemCapability.Notification.Notification
* @crossplatform
* @since 12
*/
function publish(request: NotificationRequest): Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 1600004 - Notification disabled.
* @throws { BusinessError } 1600005 - Notification slot disabled.
* @throws { BusinessError } 1600008 - The user does not exist.
* @throws { BusinessError } 1600009 - The notification sending frequency reaches the upper limit.
* @throws { BusinessError } 1600012 - No memory space.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
*/
/**
* Publishes a notification to the specified user.
*
* @permission ohos.permission.NOTIFICATION_CONTROLLER
* @param { NotificationRequest } request - a notification.
* @param { number } userId - of subscriber receiving the notification.
* @param { AsyncCallback
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 1600004 - Notification disabled.
* @throws { BusinessError } 1600005 - Notification slot disabled.
* @throws { BusinessError } 1600007 - The notification does not exist.
* @throws { BusinessError } 1600008 - The user does not exist.
* @throws { BusinessError } 1600009 - The notification sending frequency reaches the upper limit.
* @throws { BusinessError } 1600012 - No memory space.
* @throws { BusinessError } 1600014 - No permission.
* @throws { BusinessError } 1600015 - The current notification status does not support duplicate configurations.
* @throws { BusinessError } 1600016 - The notification version for this update is too low.
* @throws { BusinessError } 2300007 - Network unreachable.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 11
*/
function publish(request: NotificationRequest, userId: number, callback: AsyncCallback
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 1600004 - Notification disabled.
* @throws { BusinessError } 1600005 - Notification slot disabled.
* @throws { BusinessError } 1600008 - The user does not exist.
* @throws { BusinessError } 1600009 - The notification sending frequency reaches the upper limit.
* @throws { BusinessError } 1600012 - No memory space.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
*/
/**
* Publishes a notification to the specified user.
*
* @permission ohos.permission.NOTIFICATION_CONTROLLER
* @param { NotificationRequest } request - a notification.
* @param { number } userId - of subscriber receiving the notification.
* @returns { Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 1600004 - Notification disabled.
* @throws { BusinessError } 1600005 - Notification slot disabled.
* @throws { BusinessError } 1600007 - The notification does not exist.
* @throws { BusinessError } 1600008 - The user does not exist.
* @throws { BusinessError } 1600009 - The notification sending frequency reaches the upper limit.
* @throws { BusinessError } 1600012 - No memory space.
* @throws { BusinessError } 1600014 - No permission.
* @throws { BusinessError } 1600015 - The current notification status does not support duplicate configurations.
* @throws { BusinessError } 1600016 - The notification version for this update is too low.
* @throws { BusinessError } 2300007 - Network unreachable.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 11
*/
function publish(request: NotificationRequest, userId: number): Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 1600004 - Notification disabled.
* @throws { BusinessError } 1600005 - Notification slot disabled.
* @throws { BusinessError } 1600008 - The user does not exist.
* @throws { BusinessError } 1600009 - The notification sending frequency reaches the upper limit.
* @throws { BusinessError } 1600012 - No memory space.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
*/
function publishAsBundle(
request: NotificationRequest,
representativeBundle: string,
userId: number,
callback: AsyncCallback
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 1600004 - Notification disabled.
* @throws { BusinessError } 1600005 - Notification slot disabled.
* @throws { BusinessError } 1600008 - The user does not exist.
* @throws { BusinessError } 1600009 - The notification sending frequency reaches the upper limit.
* @throws { BusinessError } 1600012 - No memory space.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
*/
function publishAsBundle(request: NotificationRequest, representativeBundle: string, userId: number): Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 1600004 - Notification disabled.
* @throws { BusinessError } 1600005 - Notification slot disabled.
* @throws { BusinessError } 1600008 - The user does not exist.
* @throws { BusinessError } 1600009 - The notification sending frequency reaches the upper limit.
* @throws { BusinessError } 1600012 - No memory space.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 12
*/
function publishAsBundle(representativeBundle: BundleOption, request: NotificationRequest): Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 1600007 - The notification does not exist.
* @syscap SystemCapability.Notification.Notification
* @since 9
*/
/**
* Cancel a notification with the specified ID.
*
* @param { number } id - ID of the notification to cancel, which must be unique in the application.
* @param { AsyncCallback
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 1600007 - The notification does not exist.
* @syscap SystemCapability.Notification.Notification
* @crossplatform
* @since 12
*/
function cancel(id: number, callback: AsyncCallback
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 1600007 - The notification does not exist.
* @syscap SystemCapability.Notification.Notification
* @since 9
*/
function cancel(id: number, label: string, callback: AsyncCallback
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 1600007 - The notification does not exist.
* @syscap SystemCapability.Notification.Notification
* @since 9
*/
function cancel(id: number, label?: string): Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 1600007 - The notification does not exist.
* @throws { BusinessError } 1600012 - No memory space.
* @throws { BusinessError } 1600017 - There is no corresponding agent relationship configuration.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 12
*/
function cancel(representativeBundle: BundleOption, id: number): Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 1600007 - The notification does not exist.
* @throws { BusinessError } 1600008 - The user does not exist.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
*/
function cancelAsBundle(
id: number,
representativeBundle: string,
userId: number,
callback: AsyncCallback
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 1600007 - The notification does not exist.
* @throws { BusinessError } 1600008 - The user does not exist.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
*/
function cancelAsBundle(id: number, representativeBundle: string, userId: number): Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 1600007 - The notification does not exist.
* @throws { BusinessError } 1600008 - The user does not exist.
* @throws { BusinessError } 1600012 - No memory space.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 12
*/
function cancelAsBundle(representativeBundle: BundleOption, id: number): Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @syscap SystemCapability.Notification.Notification
* @since 9
*/
/**
* Cancel all notifications of the current application.
*
* @param { AsyncCallback
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @syscap SystemCapability.Notification.Notification
* @crossplatform
* @since 12
*/
function cancelAll(callback: AsyncCallback
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @syscap SystemCapability.Notification.Notification
* @since 9
*/
/**
* Cancel all notifications of the current application.
*
* @returns { Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @syscap SystemCapability.Notification.Notification
* @crossplatform
* @since 12
*/
function cancelAll(): Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 1600012 - No memory space.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
*/
function addSlot(slot: NotificationSlot, callback: AsyncCallback
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 1600012 - No memory space.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
*/
function addSlot(slot: NotificationSlot): Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 1600012 - No memory space.
* @syscap SystemCapability.Notification.Notification
* @since 9
*/
function addSlot(type: SlotType, callback: AsyncCallback
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 1600012 - No memory space.
* @syscap SystemCapability.Notification.Notification
* @since 9
*/
function addSlot(type: SlotType): Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 1600012 - No memory space.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
*/
function addSlots(slots: Array
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 1600012 - No memory space.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
*/
function addSlots(slots: Array
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @syscap SystemCapability.Notification.Notification
* @since 9
*/
function getSlot(slotType: SlotType, callback: AsyncCallback
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @syscap SystemCapability.Notification.Notification
* @since 9
*/
function getSlot(slotType: SlotType): Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @syscap SystemCapability.Notification.Notification
* @since 9
*/
function getSlots(callback: AsyncCallback
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @syscap SystemCapability.Notification.Notification
* @since 9
*/
function getSlots(): Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @syscap SystemCapability.Notification.Notification
* @since 9
*/
function removeSlot(slotType: SlotType, callback: AsyncCallback
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @syscap SystemCapability.Notification.Notification
* @since 9
*/
function removeSlot(slotType: SlotType): Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @syscap SystemCapability.Notification.Notification
* @since 9
*/
function removeAllSlots(callback: AsyncCallback
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @syscap SystemCapability.Notification.Notification
* @since 9
*/
function removeAllSlots(): Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 17700001 - The specified bundle name was not found.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
*/
function setNotificationEnable(bundle: BundleOption, enable: boolean, callback: AsyncCallback
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 17700001 - The specified bundle name was not found.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
*/
function setNotificationEnable(bundle: BundleOption, enable: boolean): Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 17700001 - The specified bundle name was not found.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
*/
function isNotificationEnabled(bundle: BundleOption, callback: AsyncCallback
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 17700001 - The specified bundle name was not found.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
*/
function isNotificationEnabled(bundle: BundleOption): Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
*/
/**
* Checks whether this application allows to publish notifications.
*
* @param { AsyncCallback
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 1600008 - The user does not exist.
* @throws { BusinessError } 17700001 - The specified bundle name was not found.
* @syscap SystemCapability.Notification.Notification
* @since 11
*/
/**
* Checks whether this application allows to publish notifications.
*
* @param { AsyncCallback
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 1600008 - The user does not exist.
* @throws { BusinessError } 17700001 - The specified bundle name was not found.
* @syscap SystemCapability.Notification.Notification
* @crossplatform
* @since 12
*/
function isNotificationEnabled(callback: AsyncCallback
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
*/
/**
* Checks whether this application allows to publish notifications.
*
* @returns { Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 1600008 - The user does not exist.
* @throws { BusinessError } 17700001 - The specified bundle name was not found.
* @syscap SystemCapability.Notification.Notification
* @since 11
*/
/**
* Checks whether this application allows to publish notifications.
*
* @returns { Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 1600008 - The user does not exist.
* @throws { BusinessError } 17700001 - The specified bundle name was not found.
* @syscap SystemCapability.Notification.Notification
* @crossplatform
* @since 12
*/
function isNotificationEnabled(): Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 1600008 - The user does not exist.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
*/
function isNotificationEnabled(userId: number, callback: AsyncCallback
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 1600008 - The user does not exist.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
*/
function isNotificationEnabled(userId: number): Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 17700001 - The specified bundle name was not found.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
*/
function displayBadge(bundle: BundleOption, enable: boolean, callback: AsyncCallback
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 17700001 - The specified bundle name was not found.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
*/
function displayBadge(bundle: BundleOption, enable: boolean): Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 17700001 - The specified bundle name was not found.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
*/
function isBadgeDisplayed(bundle: BundleOption, callback: AsyncCallback
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 17700001 - The specified bundle name was not found.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
*/
function isBadgeDisplayed(bundle: BundleOption): Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 17700001 - The specified bundle name was not found.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
*/
function setSlotByBundle(bundle: BundleOption, slot: NotificationSlot, callback: AsyncCallback
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 17700001 - The specified bundle name was not found.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
*/
function setSlotByBundle(bundle: BundleOption, slot: NotificationSlot): Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 17700001 - The specified bundle name was not found.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
*/
function getSlotsByBundle(bundle: BundleOption, callback: AsyncCallback
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 1600012 - No memory space.
* @throws { BusinessError } 17700001 - The specified bundle name was not found.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 12
*/
function getSlotByBundle(bundle: BundleOption, slotType: SlotType): Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 17700001 - The specified bundle name was not found.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
*/
function getSlotsByBundle(bundle: BundleOption): Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 17700001 - The specified bundle name was not found.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
*/
function getSlotNumByBundle(bundle: BundleOption, callback: AsyncCallback
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 17700001 - The specified bundle name was not found.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
*/
function getSlotNumByBundle(bundle: BundleOption): Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
*/
function getAllActiveNotifications(callback: AsyncCallback
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
*/
function getAllActiveNotifications(): Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @syscap SystemCapability.Notification.Notification
* @since 9
*/
function getActiveNotificationCount(callback: AsyncCallback
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @syscap SystemCapability.Notification.Notification
* @since 9
*/
function getActiveNotificationCount(): Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @syscap SystemCapability.Notification.Notification
* @since 9
*/
function getActiveNotifications(callback: AsyncCallback
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @syscap SystemCapability.Notification.Notification
* @since 9
*/
function getActiveNotifications(): Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600007 - The notification does not exist.
* @throws { BusinessError } 17700001 - The specified bundle name was not found.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 11
*/
function getActiveNotificationByFilter(filter: NotificationFilter, callback: AsyncCallback
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600007 - The notification does not exist.
* @throws { BusinessError } 17700001 - The specified bundle name was not found.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 11
*/
function getActiveNotificationByFilter(filter: NotificationFilter): Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @syscap SystemCapability.Notification.Notification
* @since 9
*/
function cancelGroup(groupName: string, callback: AsyncCallback
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @syscap SystemCapability.Notification.Notification
* @since 9
*/
function cancelGroup(groupName: string): Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 17700001 - The specified bundle name was not found.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
*/
function removeGroupByBundle(bundle: BundleOption, groupName: string, callback: AsyncCallback
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 17700001 - The specified bundle name was not found.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
*/
function removeGroupByBundle(bundle: BundleOption, groupName: string): Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 1600012 - No memory space.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
*/
function setDoNotDisturbDate(date: DoNotDisturbDate, callback: AsyncCallback
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 1600012 - No memory space.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
*/
function setDoNotDisturbDate(date: DoNotDisturbDate): Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 1600008 - The user does not exist.
* @throws { BusinessError } 1600012 - No memory space.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
*/
function setDoNotDisturbDate(date: DoNotDisturbDate, userId: number, callback: AsyncCallback
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 1600008 - The user does not exist.
* @throws { BusinessError } 1600012 - No memory space.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
*/
function setDoNotDisturbDate(date: DoNotDisturbDate, userId: number): Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 1600012 - No memory space.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
*/
function getDoNotDisturbDate(callback: AsyncCallback
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 1600012 - No memory space.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
*/
function getDoNotDisturbDate(): Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 1600008 - The user does not exist.
* @throws { BusinessError } 1600012 - No memory space.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
*/
function getDoNotDisturbDate(userId: number, callback: AsyncCallback
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 1600008 - The user does not exist.
* @throws { BusinessError } 1600012 - No memory space.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
*/
function getDoNotDisturbDate(userId: number): Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
*/
function isSupportDoNotDisturbMode(callback: AsyncCallback
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
*/
function isSupportDoNotDisturbMode(): Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @syscap SystemCapability.Notification.Notification
* @since 9
*/
function isSupportTemplate(templateName: string, callback: AsyncCallback
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @syscap SystemCapability.Notification.Notification
* @since 9
*/
function isSupportTemplate(templateName: string): Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @syscap SystemCapability.Notification.Notification
* @since 9
*/
/**
* Request permission to send notification.
*
* @param { AsyncCallback
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 1600004 - Notification disabled.
* @throws { BusinessError } 1600013 - A notification dialog box is already displayed.
* @syscap SystemCapability.Notification.Notification
* @since 11
*/
/**
* Request permission to send notification.
*
* @param { AsyncCallback
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 1600004 - Notification disabled.
* @throws { BusinessError } 1600013 - A notification dialog box is already displayed.
* @syscap SystemCapability.Notification.Notification
* @crossplatform
* @since 12
*/
function requestEnableNotification(callback: AsyncCallback
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @syscap SystemCapability.Notification.Notification
* @StageModelOnly
* @since 10
*/
/**
* Request permission to send notification.
*
* @param { UIAbilityContext } context - The context indicates the ability context you want to bind;
* @param { AsyncCallback
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 1600004 - Notification disabled.
* @throws { BusinessError } 1600013 - A notification dialog box is already displayed.
* @syscap SystemCapability.Notification.Notification
* @StageModelOnly
* @since 11
*/
function requestEnableNotification(context: UIAbilityContext, callback: AsyncCallback
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @syscap SystemCapability.Notification.Notification
* @since 9
*/
/**
* Request permission to send notification.
*
* @returns { Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 1600004 - Notification disabled.
* @throws { BusinessError } 1600013 - A notification dialog box is already displayed.
* @syscap SystemCapability.Notification.Notification
* @since 11
*/
/**
* Request permission to send notification.
*
* @returns { Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 1600004 - Notification disabled.
* @throws { BusinessError } 1600013 - A notification dialog box is already displayed.
* @syscap SystemCapability.Notification.Notification
* @crossplatform
* @since 12
*/
function requestEnableNotification(): Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @syscap SystemCapability.Notification.Notification
* @StageModelOnly
* @since 10
*/
/**
* Request permission to send notification.
*
* @param { UIAbilityContext } context - The context indicates the ability context you want to bind;
* @returns { Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 1600004 - Notification disabled.
* @throws { BusinessError } 1600013 - A notification dialog box is already displayed.
* @syscap SystemCapability.Notification.Notification
* @StageModelOnly
* @since 11
*/
function requestEnableNotification(context: UIAbilityContext): Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 1600010 - Distributed operation failed.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
*/
function setDistributedEnable(enable: boolean, callback: AsyncCallback
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 1600010 - Distributed operation failed.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
*/
function setDistributedEnable(enable: boolean): Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 1600010 - Distributed operation failed.
* @syscap SystemCapability.Notification.Notification
* @since 9
*/
function isDistributedEnabled(callback: AsyncCallback
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 1600010 - Distributed operation failed.
* @syscap SystemCapability.Notification.Notification
* @since 9
*/
function isDistributedEnabled(): Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 1600010 - Distributed operation failed.
* @throws { BusinessError } 17700001 - The specified bundle name was not found.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
*/
function setDistributedEnableByBundle(bundle: BundleOption, enable: boolean, callback: AsyncCallback
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 1600010 - Distributed operation failed.
* @throws { BusinessError } 17700001 - The specified bundle name was not found.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
*/
function setDistributedEnableByBundle(bundle: BundleOption, enable: boolean): Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 1600010 - Distributed operation failed.
* @throws { BusinessError } 1600012 - No memory space.
* @throws { BusinessError } 17700001 - The specified bundle name was not found.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 12
*/
function setDistributedEnabledByBundle(bundle: BundleOption, deviceType: string, enable: boolean): Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 1600010 - Distributed operation failed.
* @throws { BusinessError } 17700001 - The specified bundle name was not found.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
*/
function isDistributedEnabledByBundle(bundle: BundleOption, callback: AsyncCallback
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 1600010 - Distributed operation failed.
* @throws { BusinessError } 17700001 - The specified bundle name was not found.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
*/
function isDistributedEnabledByBundle(bundle: BundleOption): Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 1600010 - Distributed operation failed.
* @throws { BusinessError } 1600012 - No memory space.
* @throws { BusinessError } 17700001 - The specified bundle name was not found.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 12
*/
function isDistributedEnabledByBundle(bundle: BundleOption, deviceType: string): Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 1600010 - Distributed operation failed.
* @throws { BusinessError } 1600012 - No memory space.
* @throws { BusinessError } 17700001 - The specified bundle name was not found.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 12
*/
function setSmartReminderEnabled(deviceType: string, enable: boolean): Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 1600010 - Distributed operation failed.
* @throws { BusinessError } 1600012 - No memory space.
* @throws { BusinessError } 17700001 - The specified bundle name was not found.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 12
*/
function isSmartReminderEnabled(deviceType: string): Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
*/
function getDeviceRemindType(callback: AsyncCallback
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
*/
function getDeviceRemindType(): Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 17700001 - The specified bundle name was not found.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
*/
/**
* Set whether the application slot is enabled.
*
* @permission ohos.permission.NOTIFICATION_CONTROLLER
* @param { BundleOption } bundle - The bundle option.
* @param { SlotType } type - Type of the notification slot.
* @param { boolean } enable - Set enable or not.
* @param { AsyncCallback
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 1600012 - No memory space.
* @throws { BusinessError } 17700001 - The specified bundle name was not found.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 11
*/
function setNotificationEnableSlot(
bundle: BundleOption,
type: SlotType,
enable: boolean,
callback: AsyncCallback
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 1600012 - No memory space.
* @throws { BusinessError } 17700001 - The specified bundle name was not found.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 11
*/
function setNotificationEnableSlot(
bundle: BundleOption,
type: SlotType,
enable: boolean,
isForceControl: boolean,
callback: AsyncCallback
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 17700001 - The specified bundle name was not found.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
*/
/**
* Set whether the application slot is enabled.
*
* @permission ohos.permission.NOTIFICATION_CONTROLLER
* @param { BundleOption } bundle - The bundle option.
* @param { SlotType } type - Type of the notification slot.
* @param { boolean } enable - Set enable or not.
* @param { boolean } isForceControl - Is the notification slot enable affected by the application
* notification enable, false means affected.
* @returns { Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 1600012 - No memory space.
* @throws { BusinessError } 17700001 - The specified bundle name was not found.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 11
*/
function setNotificationEnableSlot(bundle: BundleOption, type: SlotType, enable: boolean, isForceControl?: boolean): Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 17700001 - The specified bundle name was not found.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
*/
function isNotificationSlotEnabled(bundle: BundleOption, type: SlotType, callback: AsyncCallback
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 17700001 - The specified bundle name was not found.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
*/
function isNotificationSlotEnabled(bundle: BundleOption, type: SlotType): Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 1600008 - The user does not exist.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
*/
function setSyncNotificationEnabledWithoutApp(userId: number, enable: boolean, callback: AsyncCallback
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 1600008 - The user does not exist.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
*/
function setSyncNotificationEnabledWithoutApp(userId: number, enable: boolean): Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 1600008 - The user does not exist.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
*/
function getSyncNotificationEnabledWithoutApp(userId: number, callback: AsyncCallback
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 1600008 - The user does not exist.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
*/
function getSyncNotificationEnabledWithoutApp(userId: number): Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 1600012 - No memory space.
* @syscap SystemCapability.Notification.Notification
* @since 10
*/
/**
* Set badge number.
*
* @param { number } badgeNumber - Badge number.
* @param { AsyncCallback
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 1600012 - No memory space.
* @syscap SystemCapability.Notification.Notification
* @crossplatform
* @since 12
*/
function setBadgeNumber(badgeNumber: number, callback: AsyncCallback
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 1600012 - No memory space.
* @syscap SystemCapability.Notification.Notification
* @since 10
*/
/**
* Set badge number.
*
* @param { number } badgeNumber - Badge number.
* @returns { Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 1600012 - No memory space.
* @syscap SystemCapability.Notification.Notification
* @crossplatform
* @since 12
*/
function setBadgeNumber(badgeNumber: number): Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 1600012 - No memory space.
* @throws { BusinessError } 1600017 - There is no corresponding agent relationship configuration.
* @throws { BusinessError } 17700001 - The specified bundle name was not found.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 12
*/
function setBadgeNumberByBundle(bundle: BundleOption, badgeNumber: number): Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 10
*/
function on(type: 'checkNotification', callback: (checkInfo: NotificationCheckInfo) => NotificationCheckResult): void;
/**
* Subscribe the callback for check notifications.
*
* @permission ohos.permission.NOTIFICATION_CONTROLLER and ohos.permission.NOTIFICATION_AGENT_CONTROLLER
* @param { 'checkNotification' } type - Type of the callback to listen for.
* @param { NotificationCheckRequest } checkRequest - Check Request for filter notification request.
* @param { function } callback - callback - The callback of check notifications.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
*
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 11
*/
function on(type: 'checkNotification', checkRequest: NotificationCheckRequest,
callback: (checkInfo: NotificationCheckInfo) => Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 10
*/
function off(
type: 'checkNotification',
callback?: (checkInfo: NotificationCheckInfo) => NotificationCheckResult
): void;
/**
* Trigger system live view notification.
*
* @permission ohos.permission.NOTIFICATION_CONTROLLER
* @param { BundleOption } bundle - The bundle option.
* @param { number } notificationId - The notification id.
* @param { ButtonOptions } buttonOptions - The button option.
* @returns { Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 1600007 - The notification does not exist.
* @throws { BusinessError } 17700001 - The specified bundle name was not found.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 11
*/
function triggerSystemLiveView(bundle: BundleOption, notificationId: number, buttonOptions: ButtonOptions): Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 1600012 - No memory space.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 11
*/
function subscribeSystemLiveView(subscriber: SystemLiveViewSubscriber): Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 17700001 - The specified bundle name was not found.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 11
*/
function setSlotFlagsByBundle(bundle: BundleOption, slotFlags: number): Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 17700001 - The specified bundle name was not found.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 11
*/
function getSlotFlagsByBundle(bundle: BundleOption): Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect to the service.
* @throws { BusinessError } 1600012 - No memory space.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 12
*/
function addDoNotDisturbProfile(templates: Array