/* * 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 type { LiveViewTypes as _LiveViewTypes } 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 */ /** * 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 * @crossplatform * @atomicservice * @since 12 */ 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
*/
/**
* Publishes a notification to the specified user.
*
* @permission ohos.permission.NOTIFICATION_CONTROLLER or ohos.permission.SEND_NOTIFICATION_CROSS_USER
* @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 18
*/
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
*/
/**
* Publishes a notification to the specified user.
*
* @permission ohos.permission.NOTIFICATION_CONTROLLER or ohos.permission.SEND_NOTIFICATION_CROSS_USER
* @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 18
*/
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 } 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 } 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 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 } 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 } 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 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 } 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 } 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 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.
* @throws { BusinessError } 17700001 - The specified bundle name was not found.
* @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.
* @throws { BusinessError } 17700001 - The specified bundle name was not found.
* @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.
* @throws { BusinessError } 17700001 - The specified bundle name was not found.
* @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.
* @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 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.
* @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.
* @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
*/
/**
* Sets whether to allow the specified application to show badge.
*
* @permission ohos.permission.NOTIFICATION_CONTROLLER
* @param { BundleOption } bundle - The bundle option.
* @param { boolean } enable - Set enable or not.
* @param { AsyncCallback
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @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 18
*/
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
*/
/**
* Sets whether to allow the specified application to show badge.
*
* @permission ohos.permission.NOTIFICATION_CONTROLLER
* @param { BundleOption } bundle - The bundle option.
* @param { boolean } enable - Set enable or not.
* @returns { Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @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 18
*/
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
*/
/**
* Obtains the flag that whether to allow the application to show badge.
*
* @permission ohos.permission.NOTIFICATION_CONTROLLER
* @param { BundleOption } bundle - The bundle option.
* @param { AsyncCallback
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @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 18
*/
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
*/
/**
* Obtains the flag that whether to allow the application to show badge.
*
* @permission ohos.permission.NOTIFICATION_CONTROLLER
* @param { BundleOption } bundle - The bundle option.
* @returns { Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @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 18
*/
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
*/
/**
* Update all notification slots for the specified bundle.
*
* @permission ohos.permission.NOTIFICATION_CONTROLLER
* @param { BundleOption } bundle - The bundle option.
* @param { NotificationSlot } slot - Indicates the notification slot.
* @param { AsyncCallback
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @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 18
*/
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
*/
/**
* Update all notification slots for the specified bundle.
*
* @permission ohos.permission.NOTIFICATION_CONTROLLER
* @param { BundleOption } bundle - The bundle option.
* @param { NotificationSlot } slot - Indicates the notification slot.
* @returns { Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @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 18
*/
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
*/
/**
* Obtains all notification slots belonging to the specified bundle.
*
* @permission ohos.permission.NOTIFICATION_CONTROLLER
* @param { BundleOption } bundle - The bundle option.
* @param { AsyncCallback
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @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 18
*/
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
*/
/**
* Get notification slot for the specified bundle.
*
* @permission ohos.permission.NOTIFICATION_CONTROLLER
* @param { BundleOption } bundle - The bundle option.
* @param { SlotType } slotType - Indicates the notification slot.
* @returns { Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @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 18
*/
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
*/
/**
* Obtains all notification slots belonging to the specified bundle.
*
* @permission ohos.permission.NOTIFICATION_CONTROLLER
* @param { BundleOption } bundle - The bundle option.
* @returns { Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @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 18
*/
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
*/
/**
* Obtains number of slot.
*
* @permission ohos.permission.NOTIFICATION_CONTROLLER
* @param { BundleOption } bundle - The bundle option.
* @param { AsyncCallback
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @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 18
*/
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
*/
/**
* Obtains number of slot.
*
* @permission ohos.permission.NOTIFICATION_CONTROLLER
* @param { BundleOption } bundle - The bundle option.
* @returns { Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @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 18
*/
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
* @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 getActiveNotifications(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, 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
*/
/**
* Set the Do Not Disturb date.
*
* @permission ohos.permission.NOTIFICATION_CONTROLLER
* @param { DoNotDisturbDate } date - The Do Not Disturb date.
* @param { AsyncCallback
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @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 18
*/
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
*/
/**
* Set the Do Not Disturb date.
*
* @permission ohos.permission.NOTIFICATION_CONTROLLER
* @param { DoNotDisturbDate } date - The Do Not Disturb date.
* @returns { Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @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 18
*/
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
*/
/**
* Set the Do Not Disturb date under the specified user.
*
* @permission ohos.permission.NOTIFICATION_CONTROLLER
* @param { DoNotDisturbDate } date - The Do Not Disturb date.
* @param { number } userId - The userId.
* @param { AsyncCallback
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @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 18
*/
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
*/
/**
* Set the Do Not Disturb date under the specified user.
*
* @permission ohos.permission.NOTIFICATION_CONTROLLER
* @param { DoNotDisturbDate } date - The Do Not Disturb date.
* @param { number } userId - The userId.
* @returns { Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @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 18
*/
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
*/
/**
* Obtains the Do Not Disturb date.
*
* @permission ohos.permission.NOTIFICATION_CONTROLLER
* @param { AsyncCallback
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @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 18
*/
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 } 1600008 - The user does not exist.
* @throws { BusinessError } 1600012 - No memory space.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
*/
/**
* Obtains the Do Not Disturb date.
*
* @permission ohos.permission.NOTIFICATION_CONTROLLER
* @param { number } userId - The userId.
* @param { AsyncCallback
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @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 18
*/
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
*/
/**
* Obtains the Do Not Disturb date.
*
* @permission ohos.permission.NOTIFICATION_CONTROLLER
* @param { number } userId - The userId.
* @returns { Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @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 18
*/
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
* @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
* @deprecated since 12
* @useinstead requestEnableNotification
*/
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
*/
/**
* 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
* @crossplatform
* @since 12
*/
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
* @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
*/
/**
* 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
* @crossplatform
* @since 12
*/
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
*/
/**
* Sets whether the device supports distributed notification.
*
* @permission ohos.permission.NOTIFICATION_CONTROLLER
* @param { boolean } enable - Set enable or not.
* @param { AsyncCallback
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @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 18
*/
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
*/
/**
* Sets whether the device supports distributed notification.
*
* @permission ohos.permission.NOTIFICATION_CONTROLLER
* @param { boolean } enable - Set enable or not.
* @returns { Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @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 18
*/
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.
* @throws { BusinessError } 17700001 - The specified bundle name was not found.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
*/
/**
* Sets whether an application supports distributed notification.
*
* @permission ohos.permission.NOTIFICATION_CONTROLLER
* @param { BundleOption } bundle - The bundle option.
* @param { boolean } enable - Set enable or not.
* @param { AsyncCallback
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @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 18
*/
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
*/
/**
* Sets whether an application supports distributed notification.
*
* @permission ohos.permission.NOTIFICATION_CONTROLLER
* @param { BundleOption } bundle - The bundle option.
* @param { boolean } enable - Set enable or not.
* @returns { Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @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 18
*/
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
*/
/**
* Sets whether an application supports distributed notification.
*
* @permission ohos.permission.NOTIFICATION_CONTROLLER
* @param { BundleOption } bundle - The bundle option.
* @param { string } deviceType - The device type.
* @param { boolean } enable - Set enable or not.
* @returns { Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @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 18
*/
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
*/
/**
* Obtains whether an application supports distributed notification.
*
* @permission ohos.permission.NOTIFICATION_CONTROLLER
* @param { BundleOption } bundle - The bundle option.
* @param { AsyncCallback
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @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 18
*/
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
*/
/**
* Obtains whether an application supports distributed notification.
*
* @permission ohos.permission.NOTIFICATION_CONTROLLER
* @param { BundleOption } bundle - The bundle option.
* @returns { Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @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 18
*/
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
*/
/**
* Obtains whether an application supports distributed notification.
*
* @permission ohos.permission.NOTIFICATION_CONTROLLER
* @param { BundleOption } bundle - The bundle option.
* @param { string } deviceType - The device type.
* @returns { Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @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 18
*/
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
*/
/**
* Sets whether an application supports smart reminders across devices.
*
* @permission ohos.permission.NOTIFICATION_CONTROLLER
* @param { string } deviceType - The device type.
* @param { boolean } enable - Set enable or not.
* @returns { Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @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 18
*/
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
*/
/**
* Obtains whether an application supports smart reminders across devices.
*
* @permission ohos.permission.NOTIFICATION_CONTROLLER
* @param { string } deviceType - The device type.
* @returns { Promise
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @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 18
*/
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
*/
/**
* Obtains the remind modes of the notification.
*
* @permission ohos.permission.NOTIFICATION_CONTROLLER
* @param { AsyncCallback
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @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 18
*/
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.
* @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
*/
/**
* 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 } 801 - Capability not supported.
* @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 18
*/
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
*/
/**
* 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.
* @param { AsyncCallback
2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @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 18
*/
function setNotificationEnableSlot(
bundle: BundleOption,
type: SlotType,
enable: boolean,
isForceControl: boolean,
callback: AsyncCallback