diff --git a/en/application-dev/application-models/inputmethodextentionability.md b/en/application-dev/application-models/inputmethodextentionability.md index b36cf2a050cd15c1d4047410406ed46343f604e5..49686c5d5c087d8a484123f0f6d58a12f6283976 100644 --- a/en/application-dev/application-models/inputmethodextentionability.md +++ b/en/application-dev/application-models/inputmethodextentionability.md @@ -1,4 +1,4 @@ -# InputMethodExtensionAbility Development +# InputMethodExtensionAbility ## When to Use [InputMethodExtensionAbility](../reference/apis/js-apis-inputmethod-extension-ability.md), inherited from [ExtensionAbility](extensionability-overview.md), is used for developing input method applications. diff --git a/en/application-dev/notification/Readme-EN.md b/en/application-dev/notification/Readme-EN.md index f7b76df0e99484508bcb073462fd65f0ab3d03cb..47c6303ebec771590779b7cb9e5c3acaf6eaf31c 100644 --- a/en/application-dev/notification/Readme-EN.md +++ b/en/application-dev/notification/Readme-EN.md @@ -1,9 +1,9 @@ # Notification - [Notification Overview](notification-overview.md) -- [Notification Subscription (for System Applications Only)](notification-subscription.md) +- [Subscribing to Notifications (for System Applications Only)](notification-subscription.md) - [Enabling Notification](notification-enable.md) -- [Notification Badge](notification-badge.md) +- [Managing the Notification Badge](notification-badge.md) - Publishing a Notification - [Publishing a Basic Notification](text-notification.md) - [Publishing a Progress Notification](progress-bar-notification.md) diff --git a/en/application-dev/notification/notification-badge.md b/en/application-dev/notification/notification-badge.md index 66d29e659d03ac147a9aa7acc0e1af24b60980c3..5cf38e460c8db944f8608869760e3dfc63c648a7 100644 --- a/en/application-dev/notification/notification-badge.md +++ b/en/application-dev/notification/notification-badge.md @@ -1,4 +1,4 @@ -# Notification Badge +# Managing the Notification Badge OpenHarmony provides APIs for setting the notification badge, which is displayed in the upper right corner of the application icon on the home screen to notify the user of the count of unread notifications. @@ -11,11 +11,11 @@ After a notification is read, the count on the badge is decremented by 1. If the 1. The notification service provides two methods to increase the count on the notification badge: - - When publishing a notification, pass the **badgeNumber** parameter in [NotificationRequest](../reference/apis/js-apis-notificationManager.md#notificationrequest). After the notification is received, the count on the badge is incremented. + - When publishing a notification, pass the **badgeNumber** parameter in [NotificationRequest](../reference/apis/js-apis-inner-notification-notificationRequest.md#notificationrequest). After the notification is received, the count on the badge is incremented. - - Call the [setBadgeNumber](../reference/apis/js-apis-notificationManager.md#setbadgenumber) API to set the count on the badge. + - Call the [setBadgeNumber()](../reference/apis/js-apis-notificationManager.md#notificationmanagersetbadgenumber10) API to set the count on the badge. -2. To decrease the count on the badge, call the **setBadgeNumber** API. +2. To decrease the count on the badge, call the [setBadgeNumber()](../reference/apis/js-apis-notificationManager.md#notificationmanagersetbadgenumber10) API. | API| Description| | -------- | -------- | @@ -32,37 +32,37 @@ After a notification is read, the count on the badge is decremented by 1. If the 2. Increase the count on the badge. - When publishing a notification, pass the **badgeNumber** parameter in [NotificationRequest](../reference/apis/js-apis-notificationManager.md#notificationrequest). For details, see [Publishing a Basic Notification](text-notification.md). + When publishing a notification, pass the **badgeNumber** parameter in [NotificationRequest](../reference/apis/js-apis-inner-notification-notificationRequest.md#notificationrequest). For details, see [Publishing a Basic Notification](text-notification.md). In this example, the **setBadgeNumber** API is called to add a badge. This API is called after a new notification is published. ```ts function setBadgeNumberCallback(err) { - if (err) { - console.info(`Set badge failed code is ${err.code}, message is ${err.message}`); - } else { - console.info(`Set badge success`); - } + if (err) { + console.error(`Failed to set badge number. Code is ${err.code}, message is ${err.message}`); + return; + } + console.info(`Succeeded in seting badge number.`); } - let badgeNumber = 10 + let badgeNumber = 10; notificationManager.setBadgeNumber(badgeNumber, setBadgeNumberCallback); ``` -3. Reduce the count on the badge. +3. Decrease the count on the badge. After a notification is read, the application needs to call the API to set the number of remaining unread notifications. The badge is then updated. ```ts function setBadgeNumberCallback(err) { - if (err) { - console.info(`Set badge failed code is ${err.code}, message is ${err.message}`); - } else { - console.info(`Set badge success`); - } + if (err) { + console.error(`Failed to set badge number. Code is ${err.code}, message is ${err.message}`); + return; + } + console.info(`Succeeded in seting badge number.`); } - let badgeNumber = 9 + let badgeNumber = 9; notificationManager.setBadgeNumber(badgeNumber, setBadgeNumberCallback); ``` diff --git a/en/application-dev/notification/notification-subscription.md b/en/application-dev/notification/notification-subscription.md index 45e75f1f64606cfa89cae2cfae91b89a13faaa5c..68bc11450b9302d66c05b3388ca8096e5c33088f 100644 --- a/en/application-dev/notification/notification-subscription.md +++ b/en/application-dev/notification/notification-subscription.md @@ -1,4 +1,4 @@ -# Notification Subscription (for System Applications Only) +# Subscribing to Notifications (for System Applications Only) To receive notifications, an application must subscribe to notifications first. The notification subsystem provides two types of subscription APIs, allowing applications to subscribe to notifications from all applications or notifications from a specific application. @@ -13,14 +13,14 @@ The major APIs for notification subscription are described as follows. For detai **Table 1** Major APIs for notification subscription -| Name | Description| +| API| Description| | -------- | -------- | | subscribe(subscriber: NotificationSubscriber, info: NotificationSubscribeInfo, callback: AsyncCallback<void>): void | Subscribes to notifications from a specific application.| | subscribe(subscriber: NotificationSubscriber, callback: AsyncCallback<void>): void | Subscribes to notifications from all applications. | **Table 2** Callbacks for notification subscription -| Name | Description| +| API| Description| | -------- | -------- | | onConsume?:(data: SubscribeCallbackData) => void | Callback for receiving notifications. | | onCancel?:(data: SubscribeCallbackData) => void | Callback for canceling notifications. | diff --git a/en/application-dev/notification/notification-with-wantagent.md b/en/application-dev/notification/notification-with-wantagent.md index 638f53ef2f6f6fce1637468ba4c900496727f23d..3864db71c96b59827bdf4603f48199f27345a2a3 100644 --- a/en/application-dev/notification/notification-with-wantagent.md +++ b/en/application-dev/notification/notification-with-wantagent.md @@ -13,7 +13,7 @@ Below you can see the process of adding a **WantAgent** object to a notification For details about the APIs, see [@ohos.app.ability.wantAgent](../reference/apis/js-apis-app-ability-wantAgent.md). -| Name| Description| +| API | Description| | -------- | -------- | | getWantAgent(info: WantAgentInfo, callback: AsyncCallback<WantAgent>): void | Creates a **WantAgent** object.| | trigger(agent: WantAgent, triggerInfo: TriggerInfo, callback?: Callback<CompleteData>): void | Triggers a **WantAgent** object.| diff --git a/en/application-dev/ui/arkts-common-components-button.md b/en/application-dev/ui/arkts-common-components-button.md index 82c893d33aa0049e5b2e815ae6a31b7d13a1775a..8abc45a87a9cc0ed6d0b40eaf907c2afb5692299 100644 --- a/en/application-dev/ui/arkts-common-components-button.md +++ b/en/application-dev/ui/arkts-common-components-button.md @@ -258,4 +258,4 @@ Button('Ok', { type: ButtonType.Normal, stateEffect: true }) } ``` - ![GIF](figures/GIF.gif) + ![floating_button](figures/floating_button.gif) diff --git a/en/application-dev/ui/arkts-navigation-tabs.md b/en/application-dev/ui/arkts-navigation-tabs.md index f16a5e5df1868c9500ea571deb09e74396f8f77c..28b4c68b55c447c7de9870772ff652c82d837e98 100644 --- a/en/application-dev/ui/arkts-navigation-tabs.md +++ b/en/application-dev/ui/arkts-navigation-tabs.md @@ -333,7 +333,7 @@ For non-custom navigation bars, tabs and tab content are linked by default. For **Figure 11** Lack of linkage between tabs and tab content -![lack-of-linkage](figures /lack-of-linkage.gif) +![lack-of-linkage](figures/lack-of-linkage.gif) To manually switch between the tabs, use the **onChange** API provided by the **\** component to listen for the index change and pass the index of the active tab to **currentIndex**. diff --git a/en/application-dev/ui/figures/GIF.gif b/en/application-dev/ui/figures/floating_button.gif similarity index 100% rename from en/application-dev/ui/figures/GIF.gif rename to en/application-dev/ui/figures/floating_button.gif diff --git a/en/application-dev/ui/figures/lack-of-linkage.gif b/en/application-dev/ui/figures/lack-of-linkage.gif new file mode 100644 index 0000000000000000000000000000000000000000..c0dde5b1ef76e44606de04a979c5e62cf4464438 Binary files /dev/null and b/en/application-dev/ui/figures/lack-of-linkage.gif differ diff --git a/en/readme/common-event-notification.md b/en/readme/common-event-notification.md index 745ea06735002601ca57b2fe7ab620ae0162a2af..6242a81042f831a35a4faee004a2fb3bb990f269 100644 --- a/en/readme/common-event-notification.md +++ b/en/readme/common-event-notification.md @@ -14,7 +14,7 @@ Each application can subscribe to common events as required. After your applicat ### Architecture -![]( figures/cesfwk_architecture_diagram.png "CES Architecture") +![](figures/cesfwk_architecture_diagram.png "CES Architecture") ## Directory Structure