目录

Introduction to NotificationSubscriberExtensionAbility

Functionality Overview

The core purpose of this extension ability is to allow third-party apps to receive system notifications. In this extension ability, an app can implement data transmission with a wearable. After the app sends a notification to the distributed notification service, the service forwards the notification to the NotificationSubscriberExtensionAbility implemented by the third-party app. If no new notification is published within a certain period of time, the currently running NotificationSubscriberExtensionAbility is automatically destroyed by the system.

Prerequisites

When to Use

Constraints

  1. This sample runs only on standard systems and supports phones and tablets.
  2. This sample uses the stage model and requires an SDK with API version 22 or later.
  3. This sample can only be compiled and run in DevEco Studio 6.0.2 or later.
  4. The third-party wearable application should request the ohos.permission.SUBSCRIBE_NOTIFICATION permission (system_basic level).

Working Principles