女人自慰AV免费观看内涵网,日韩国产剧情在线观看网址,神马电影网特片网,最新一级电影欧美,在线观看亚洲欧美日韩,黄色视频在线播放免费观看,ABO涨奶期羡澄,第一导航fulione,美女主播操b

0
  • 聊天消息
  • 系統(tǒng)消息
  • 評(píng)論與回復(fù)
登錄后你可以
  • 下載海量資料
  • 學(xué)習(xí)在線課程
  • 觀看技術(shù)視頻
  • 寫文章/發(fā)帖/加入社區(qū)
會(huì)員中心
創(chuàng)作中心

完善資料讓更多小伙伴認(rèn)識(shí)你,還能領(lǐng)取20積分哦,立即完善>

3天內(nèi)不再提示

鴻蒙開發(fā)接口公共事件與通知:【@ohos.reminderAgent (后臺(tái)代理提醒)】

jf_46214456 ? 來源:jf_46214456 ? 作者:jf_46214456 ? 2024-05-25 16:27 ? 次閱讀

后臺(tái)代理提醒

本模塊提供后臺(tái)代理提醒的能力。

開發(fā)應(yīng)用時(shí),開發(fā)者可以調(diào)用后臺(tái)提醒發(fā)布的接口創(chuàng)建定時(shí)提醒,包括倒計(jì)時(shí)、日歷、鬧鐘三種提醒類型。使用后臺(tái)代理提醒能力后,應(yīng)用可以被凍結(jié)或退出,計(jì)時(shí)和彈出提醒的功能將被后臺(tái)系統(tǒng)服務(wù)代理。
說明: 本模塊首批接口從API version 7開始支持。后續(xù)版本的新增接口,采用上角標(biāo)單獨(dú)標(biāo)記接口的起始版本。

導(dǎo)入模塊

import reminderAgent from'@ohos.reminderAgent';

開發(fā)前請(qǐng)熟悉鴻蒙開發(fā)指導(dǎo)文檔 :[gitee.com/li-shizhen-skin/harmony-os/blob/master/README.md]點(diǎn)擊或者復(fù)制轉(zhuǎn)到。

reminderAgent.publishReminder

publishReminder(reminderReq: ReminderRequest, callback: AsyncCallback): void

發(fā)布一個(gè)后臺(tái)代理提醒,使用callback方式實(shí)現(xiàn)異步調(diào)用。

需要權(quán)限 : ohos.permission.PUBLISH_AGENT_REMINDER

系統(tǒng)能力 : SystemCapability.Notification.ReminderAgent

參數(shù)

參數(shù)名類型必填說明
reminderReq[ReminderRequest]需要發(fā)布的提醒實(shí)例。
callbackAsyncCallback異步回調(diào),返回當(dāng)前發(fā)布的提醒的reminderId。

示例

let timer = {
      reminderType: reminderAgent.ReminderType.REMINDER_TYPE_TIMER,
      triggerTimeInSeconds: 10
  }
  reminderAgent.publishReminder(timer, (err, reminderId) = > {
      console.log("callback, reminderId = " + reminderId);
  });

reminderAgent.publishReminder

publishReminder(reminderReq: ReminderRequest): Promise

發(fā)布一個(gè)后臺(tái)代理提醒,使用Promise方式實(shí)現(xiàn)異步調(diào)用。

需要權(quán)限 : ohos.permission.PUBLISH_AGENT_REMINDER

系統(tǒng)能力 : SystemCapability.Notification.ReminderAgent

參數(shù)

參數(shù)名類型必填說明
reminderReq[ReminderRequest]需要發(fā)布的提醒實(shí)例。

返回值

類型說明
Promise返回提醒的reminderId。

示例

let timer = {
      reminderType: reminderAgent.ReminderType.REMINDER_TYPE_TIMER,
      triggerTimeInSeconds: 10
  }
  reminderAgent.publishReminder(timer).then((reminderId) = > {
      console.log("promise, reminderId = " + reminderId);
  });

reminderAgent.cancelReminder

cancelReminder(reminderId: number, callback: AsyncCallback): void

取消指定id的提醒,使用callback方式實(shí)現(xiàn)異步調(diào)用。

系統(tǒng)能力 : SystemCapability.Notification.ReminderAgent

參數(shù)

參數(shù)名類型必填說明
reminderIdnumber目標(biāo)reminder的id號(hào)。
callbackAsyncCallback異步回調(diào)。

示例

reminderAgent.cancelReminder(1, (err, data) = > {
    console.log("cancelReminder callback");
});

reminderAgent.cancelReminder

cancelReminder(reminderId: number): Promise

取消指定id的提醒,使用Promise方式實(shí)現(xiàn)異步調(diào)用。

系統(tǒng)能力 : SystemCapability.Notification.ReminderAgent

參數(shù)

參數(shù)名類型必填說明
reminderIdnumber目標(biāo)reminder的id號(hào)。

返回值

類型說明
PromisePromise類型異步回調(diào)。

示例

reminderAgent.cancelReminder(1).then(() = > {
    console.log("cancelReminder promise");
});

reminderAgent.getValidReminders

getValidReminders(callback: AsyncCallback>): void

獲取當(dāng)前應(yīng)用已設(shè)置的所有有效(未過期)的提醒,使用callback方式實(shí)現(xiàn)異步調(diào)用。

系統(tǒng)能力 : SystemCapability.Notification.ReminderAgent

參數(shù)

參數(shù)名類型必填說明
callbackAsyncCallback>異步回調(diào),返回當(dāng)前應(yīng)用已設(shè)置的所有有效(未過期)的提醒。

示例

reminderAgent.getValidReminders((err, reminders) = > {
    console.log("callback, getValidReminders length = " + reminders.length);
    for (let i = 0; i < reminders.length; i++) {
        console.log("getValidReminders = " + reminders[i]);
        console.log("getValidReminders, reminderType = " + reminders[i].reminderType);
        for (let j = 0; j < reminders[i].actionButton.length; j++) {
            console.log("getValidReminders, actionButton.title = " + reminders[i].actionButton[j].title);
            console.log("getValidReminders, actionButton.type = " + reminders[i].actionButton[j].type);
        }
        console.log("getValidReminders, wantAgent.pkgName = " + reminders[i].wantAgent.pkgName);
        console.log("getValidReminders, wantAgent.abilityName = " + reminders[i].wantAgent.abilityName);
        console.log("getValidReminders, maxScreenWantAgent.pkgName = " + reminders[i].maxScreenWantAgent.pkgName);
        console.log("getValidReminders, maxScreenWantAgent.abilityName = " + reminders[i].maxScreenWantAgent.abilityName);
        console.log("getValidReminders, ringDuration = " + reminders[i].ringDuration);
        console.log("getValidReminders, snoozeTimes = " + reminders[i].snoozeTimes);
        console.log("getValidReminders, timeInterval = " + reminders[i].timeInterval);
        console.log("getValidReminders, title = " + reminders[i].title);
        console.log("getValidReminders, content = " + reminders[i].content);
        console.log("getValidReminders, expiredContent = " + reminders[i].expiredContent);
        console.log("getValidReminders, snoozeContent = " + reminders[i].snoozeContent);
        console.log("getValidReminders, notificationId = " + reminders[i].notificationId);
        console.log("getValidReminders, slotType = " + reminders[i].slotType);
    }
})

reminderAgent.getValidReminders

getValidReminders(): Promise>

獲取當(dāng)前應(yīng)用已設(shè)置的所有有效(未過期)的提醒,使用Promise方式實(shí)現(xiàn)異步調(diào)用。

系統(tǒng)能力 : SystemCapability.Notification.ReminderAgent

返回值

類型說明
Promise>返回當(dāng)前應(yīng)用已設(shè)置的所有有效(未過期)的提醒。

示例

reminderAgent.getValidReminders().then((reminders) = > {
    console.log("promise, getValidReminders length = " + reminders.length);
    for (let i = 0; i < reminders.length; i++) {
        console.log("getValidReminders = " + reminders[i]);
        console.log("getValidReminders, reminderType = " + reminders[i].reminderType);
        for (let j = 0; j < reminders[i].actionButton.length; j++) {
            console.log("getValidReminders, actionButton.title = " + reminders[i].actionButton[j].title);
            console.log("getValidReminders, actionButton.type = " + reminders[i].actionButton[j].type);
        }
        console.log("getValidReminders, wantAgent.pkgName = " + reminders[i].wantAgent.pkgName);
        console.log("getValidReminders, wantAgent.abilityName = " + reminders[i].wantAgent.abilityName);
        console.log("getValidReminders, maxScreenWantAgent.pkgName = " + reminders[i].maxScreenWantAgent.pkgName);
        console.log("getValidReminders, maxScreenWantAgent.abilityName = " + reminders[i].maxScreenWantAgent.abilityName);
        console.log("getValidReminders, ringDuration = " + reminders[i].ringDuration);
        console.log("getValidReminders, snoozeTimes = " + reminders[i].snoozeTimes);
        console.log("getValidReminders, timeInterval = " + reminders[i].timeInterval);
        console.log("getValidReminders, title = " + reminders[i].title);
        console.log("getValidReminders, content = " + reminders[i].content);
        console.log("getValidReminders, expiredContent = " + reminders[i].expiredContent);
        console.log("getValidReminders, snoozeContent = " + reminders[i].snoozeContent);
        console.log("getValidReminders, notificationId = " + reminders[i].notificationId);
        console.log("getValidReminders, slotType = " + reminders[i].slotType);
    }
})

reminderAgent.cancelAllReminders

cancelAllReminders(callback: AsyncCallback): void

取消當(dāng)前應(yīng)用所有的提醒,使用callback方式實(shí)現(xiàn)異步調(diào)用。

系統(tǒng)能力 : SystemCapability.Notification.ReminderAgent

參數(shù)

參數(shù)名類型必填說明
callbackAsyncCallback異步回調(diào)。

示例

reminderAgent.cancelAllReminders((err, data) = >{
    console.log("cancelAllReminders callback")
})

reminderAgent.cancelAllReminders

cancelAllReminders(): Promise

取消當(dāng)前應(yīng)用所有的提醒,使用Promise方式實(shí)現(xiàn)異步調(diào)用。

系統(tǒng)能力 : SystemCapability.Notification.ReminderAgent

返回值

類型說明
PromisePromise類型異步回調(diào)。

示例

reminderAgent.cancelAllReminders().then(() = > {
    console.log("cancelAllReminders promise")
})

reminderAgent.addNotificationSlot

addNotificationSlot(slot: NotificationSlot, callback: AsyncCallback): void

添加一個(gè)NotificationSlot,使用callback方式實(shí)現(xiàn)異步調(diào)用。

系統(tǒng)能力 : SystemCapability.Notification.ReminderAgent

參數(shù)

參數(shù)名類型必填說明
slot[NotificationSlot]notification slot實(shí)例,僅支持設(shè)置其type屬性。
callbackAsyncCallback異步回調(diào)。

示例

import notification from '@ohos.notification'

let mySlot = {
    type: notification.SlotType.SOCIAL_COMMUNICATION
}
reminderAgent.addNotificationSlot(mySlot, (err, data) = > {
    console.log("addNotificationSlot callback");
});

reminderAgent.addNotificationSlot

addNotificationSlot(slot: NotificationSlot): Promise

添加一個(gè)NotificationSlot,使用Promise方式實(shí)現(xiàn)異步調(diào)用。

系統(tǒng)能力 : SystemCapability.Notification.ReminderAgent

參數(shù)

參數(shù)名類型必填說明
slot[NotificationSlot]notification slot實(shí)例,僅支持設(shè)置其type屬性。

返回值

類型說明
PromisePromise類型異步回調(diào)。

示例

import notification from '@ohos.notification'

let mySlot = {
    type: notification.SlotType.SOCIAL_COMMUNICATION
}
reminderAgent.addNotificationSlot(mySlot).then(() = > {
   console.log("addNotificationSlot promise");
});

reminderAgent.removeNotificationSlot

removeNotificationSlot(slotType: notification.SlotType, callback: AsyncCallback): void

刪除目標(biāo)NotificationSlot,使用callback方式實(shí)現(xiàn)異步調(diào)用。

系統(tǒng)能力 : SystemCapability.Notification.ReminderAgent

參數(shù)

參數(shù)名類型必填說明
slotType[notification.SlotType]目標(biāo)notification slot的類型。
callbackAsyncCallback異步回調(diào)。

示例

import notification from '@ohos.notification'

reminderAgent.removeNotificationSlot(notification.SlotType.CONTENT_INFORMATION, (err, data) = > {
    console.log("removeNotificationSlot callback");
});

reminderAgent.removeNotificationSlot

removeNotificationSlot(slotType: notification.SlotType): Promise

刪除目標(biāo)NotificationSlot,使用Promise方式實(shí)現(xiàn)異步調(diào)用。

系統(tǒng)能力 : SystemCapability.Notification.ReminderAgent

參數(shù)

參數(shù)名類型必填說明
slotType[notification.SlotType]目標(biāo)notification slot的類型。

返回值

類型說明
PromisePromise類型異步回調(diào)。

示例

import notification from '@ohos.notification'

reminderAgent.removeNotificationSlot(notification.SlotType.CONTENT_INFORMATION).then(() = > {
    console.log("removeNotificationSlot promise");
});

ActionButtonType

按鈕的類型。

系統(tǒng)能力 :以下各項(xiàng)對(duì)應(yīng)的系統(tǒng)能力均為SystemCapability.Notification.ReminderAgent

名稱默認(rèn)值說明
ACTION_BUTTON_TYPE_CLOSE0表示關(guān)閉提醒的按鈕。
ACTION_BUTTON_TYPE_SNOOZE1表示延遲提醒的按鈕。

ReminderType

提醒的類型。

系統(tǒng)能力 :以下各項(xiàng)對(duì)應(yīng)的系統(tǒng)能力均為SystemCapability.Notification.ReminderAgent

名稱默認(rèn)值說明
REMINDER_TYPE_TIMER0表示提醒類型:倒計(jì)時(shí)。
REMINDER_TYPE_CALENDAR1表示提醒類型:日歷。
REMINDER_TYPE_ALARM2表示提醒類型:鬧鐘。

ActionButton

用于設(shè)置彈出的提醒通知信息上顯示的按鈕類型和標(biāo)題。

系統(tǒng)能力 :以下各項(xiàng)對(duì)應(yīng)的系統(tǒng)能力均為SystemCapability.Notification.ReminderAgent

名稱參數(shù)類型必填說明
titlestring按鈕顯示的標(biāo)題。
type[ActionButtonType]按鈕的類型。

WantAgent

點(diǎn)擊提醒通知后跳轉(zhuǎn)的目標(biāo)ability信息。

系統(tǒng)能力 :以下各項(xiàng)對(duì)應(yīng)的系統(tǒng)能力均為SystemCapability.Notification.ReminderAgent

名稱參數(shù)類型必填說明
pkgNamestring指明點(diǎn)擊提醒通知欄后跳轉(zhuǎn)的目標(biāo)hap包名。
abilityNamestring指明點(diǎn)擊提醒通知欄后跳轉(zhuǎn)的目標(biāo)ability名稱。

MaxScreenWantAgent

提醒到達(dá)時(shí)自動(dòng)拉起的目標(biāo)ability信息。

系統(tǒng)能力 :以下各項(xiàng)對(duì)應(yīng)的系統(tǒng)能力均為SystemCapability.Notification.ReminderAgent

名稱參數(shù)類型必填說明
pkgNamestring指明提醒到達(dá)時(shí)自動(dòng)拉起的目標(biāo)hap包名(如果設(shè)備在使用中,則只彈出通知橫幅框)。
abilityNamestring指明提醒到達(dá)時(shí)自動(dòng)拉起的目標(biāo)ability名(如果設(shè)備在使用中,則只彈出通知橫幅框)。

ReminderRequest

提醒實(shí)例對(duì)象,用于設(shè)置提醒類型、響鈴時(shí)長等具體信息。

系統(tǒng)能力 :以下各項(xiàng)對(duì)應(yīng)的系統(tǒng)能力均為SystemCapability.Notification.ReminderAgent

名稱參數(shù)類型必填說明
reminderTypeReminderType指明提醒類型。
actionButton[ActionButton?, ActionButton?]彈出的提醒通知欄中顯示的按鈕(參數(shù)可選,支持0/1/2個(gè)按鈕)。
wantAgentWantAgent點(diǎn)擊通知后需要跳轉(zhuǎn)的目標(biāo)ability信息。
maxScreenWantAgentMaxScreenWantAgent提醒到達(dá)時(shí)跳轉(zhuǎn)的目標(biāo)包。如果設(shè)備正在使用中,則彈出一個(gè)通知框。
ringDurationnumber指明響鈴時(shí)長。
snoozeTimesnumber指明延遲提醒次數(shù)。
timeIntervalnumber執(zhí)行延遲提醒間隔。
titlestring指明提醒標(biāo)題。
contentstring指明提醒內(nèi)容。
expiredContentstring指明提醒過期后需要顯示的內(nèi)容。
snoozeContentstring指明延遲提醒時(shí)需要顯示的內(nèi)容。
notificationIdnumber指明提醒使用的通知的id號(hào),相同id號(hào)的提醒會(huì)覆蓋。
slotType[notification.SlotType]指明提醒的slot類型。

ReminderRequestCalendar

ReminderRequestCalendar extends ReminderRequest

日歷實(shí)例對(duì)象,用于設(shè)置提醒的時(shí)間。

系統(tǒng)能力 :以下各項(xiàng)對(duì)應(yīng)的系統(tǒng)能力均為SystemCapability.Notification.ReminderAgent

名稱參數(shù)類型必填說明
dateTime[LocalDateTime]指明提醒的目標(biāo)時(shí)間。
repeatMonthsArray指明重復(fù)提醒的月份。
repeatDaysArray指明重復(fù)提醒的日期。

ReminderRequestAlarm

ReminderRequestAlarm extends ReminderRequest

鬧鐘實(shí)例對(duì)象,用于設(shè)置提醒的時(shí)間。

系統(tǒng)能力 :以下各項(xiàng)對(duì)應(yīng)的系統(tǒng)能力均為SystemCapability.Notification.ReminderAgent

名稱參數(shù)類型必填說明
hournumber指明提醒的目標(biāo)時(shí)刻。
minutenumber指明提醒的目標(biāo)分鐘。
daysOfWeekArray指明每周哪幾天需要重復(fù)提醒。

ReminderRequestTimer

ReminderRequestTimer extends ReminderRequest

倒計(jì)時(shí)實(shí)例對(duì)象,用于設(shè)置提醒的時(shí)間。

系統(tǒng)能力 :SystemCapability.Notification.ReminderAgent

名稱參數(shù)類型必填說明HarmonyOSOpenHarmony鴻蒙文檔籽料:mau123789是v直接拿
triggerTimeInSecondsnumber指明倒計(jì)時(shí)的秒數(shù)。

搜狗高速瀏覽器截圖20240326151547.png

LocalDateTime

用于日歷類提醒設(shè)置時(shí)指定時(shí)間信息。

系統(tǒng)能力 :以下各項(xiàng)對(duì)應(yīng)的系統(tǒng)能力均為SystemCapability.Notification.ReminderAgent

名稱參數(shù)類型必填說明
yearnumber
monthnumber
daynumber
hournumber時(shí)
minutenumber
secondnumber
聲明:本文內(nèi)容及配圖由入駐作者撰寫或者入駐合作網(wǎng)站授權(quán)轉(zhuǎn)載。文章觀點(diǎn)僅代表作者本人,不代表電子發(fā)燒友網(wǎng)立場。文章及其配圖僅供工程師學(xué)習(xí)之用,如有內(nèi)容侵權(quán)或者其他違規(guī)問題,請(qǐng)聯(lián)系本站處理。 舉報(bào)投訴
  • HarmonyOS
    +關(guān)注

    關(guān)注

    79

    文章

    2026

    瀏覽量

    32058
  • OpenHarmony
    +關(guān)注

    關(guān)注

    26

    文章

    3814

    瀏覽量

    18064
  • 鴻蒙OS
    +關(guān)注

    關(guān)注

    0

    文章

    191

    瀏覽量

    4863
收藏 人收藏

    評(píng)論

    相關(guān)推薦
    熱點(diǎn)推薦

    鴻蒙開發(fā)接口公共事件與通知:【@ohos.commonEvent (公共事件模塊)】

    本模塊首批接口從API version 7開始支持。后續(xù)版本的新增接口,采用上角標(biāo)單獨(dú)標(biāo)記接口的起始版本。
    的頭像 發(fā)表于 05-21 11:13 ?1612次閱讀
    <b class='flag-5'>鴻蒙</b><b class='flag-5'>開發(fā)</b><b class='flag-5'>接口</b><b class='flag-5'>公共事</b>件與<b class='flag-5'>通知</b>:【@<b class='flag-5'>ohos</b>.commonEvent (<b class='flag-5'>公共事</b>件模塊)】

    鴻蒙開發(fā)接口公共事件與通知:【@ohos.events.emitter (Emitter)】

    本模塊首批接口從API version 7開始支持。
    的頭像 發(fā)表于 05-21 16:06 ?1740次閱讀
    <b class='flag-5'>鴻蒙</b><b class='flag-5'>開發(fā)</b><b class='flag-5'>接口</b><b class='flag-5'>公共事</b>件與<b class='flag-5'>通知</b>:【@<b class='flag-5'>ohos</b>.events.emitter (Emitter)】

    鴻蒙開發(fā)接口公共事件與通知:【Notification模塊】

    本模塊首批接口從API version 7開始支持。后續(xù)版本的新增接口,采用上角標(biāo)單獨(dú)標(biāo)記接口的起始版本。
    的頭像 發(fā)表于 05-21 17:04 ?2747次閱讀
    <b class='flag-5'>鴻蒙</b><b class='flag-5'>開發(fā)</b><b class='flag-5'>接口</b><b class='flag-5'>公共事</b>件與<b class='flag-5'>通知</b>:【Notification模塊】

    鴻蒙開發(fā)接口公共事件與通知:【application/EventHub (EventHub)】

    EventHub模塊提供了事件中心,提供訂閱、取消訂閱、觸發(fā)事件的能力。
    的頭像 發(fā)表于 05-25 16:31 ?1242次閱讀
    <b class='flag-5'>鴻蒙</b><b class='flag-5'>開發(fā)</b><b class='flag-5'>接口</b><b class='flag-5'>公共事</b>件與<b class='flag-5'>通知</b>:【application/EventHub (EventHub)】

    鴻蒙原生應(yīng)用/元服務(wù)開發(fā)-通知添加行為意圖

    WantAgent提供了封裝行為意圖的能力,這里所說的行為意圖主要是指拉起指定的應(yīng)用組件及發(fā)布公共事件等能力。HarmonyOS支持以通知的形式,將WantAgent從發(fā)布方傳遞至接收方,從而在接收
    發(fā)表于 01-05 15:07

    鴻蒙原生應(yīng)用/元服務(wù)開發(fā)-代理提醒說明(一)

    的本應(yīng)用。 三、接口說明 表1 主要接口 以下是代理提醒的相關(guān)接口,下表均以Promise形式為例。 本文根據(jù)HarmonyOS官方
    發(fā)表于 01-12 09:49

    鴻蒙原生應(yīng)用/元服務(wù)開發(fā)-代理提醒開發(fā)步驟(二)

    1.申請(qǐng)ohos.permission.PUBLISH_AGENT_REMINDER權(quán)限。 2.使能通知開關(guān)。獲得用戶授權(quán)后,才能使用代理提醒功能。 3.導(dǎo)入模塊。 import
    發(fā)表于 01-15 14:14

    基于ArkTS語言的OpenHarmony APP應(yīng)用開發(fā)公共事件的訂閱和發(fā)布

    監(jiān)聽特定系統(tǒng)公共事件,應(yīng)用退出后該選項(xiàng)將自動(dòng)調(diào)整為“從不”。 返回值應(yīng)用菜單頁面,點(diǎn)擊“關(guān)于”可查看應(yīng)用版本信息及本示例的說明。 本案例已在OpenHarmony凌蒙派-RK3568開發(fā)板驗(yàn)證通過
    發(fā)表于 09-18 13:16

    HarmonyOS應(yīng)用開發(fā)-公共事件處理

    開發(fā)過程中service想要控制多個(gè)ability時(shí),可以考慮使用公共事件處理。發(fā)布無序的公共事件: //發(fā)布公共事件 同步修改卡片與頁面public void subscribeE
    發(fā)表于 11-02 15:15

    請(qǐng)問鴻蒙智能穿戴設(shè)備如何保持后臺(tái)任務(wù)定時(shí)獲取網(wǎng)絡(luò)數(shù)據(jù)?

    ;ohos.permission.SET_WIFI_INFO"},{ "name": "ohos.permission.GET_WIFI_INFO"}]無法滿足業(yè)務(wù)業(yè)務(wù)要求:應(yīng)用退后臺(tái)后,間隔
    發(fā)表于 04-25 10:19

    HarmonyOS后臺(tái)任務(wù)管理開發(fā)指南上線!

    為應(yīng)用進(jìn)程分配 CPU 資源,同時(shí)對(duì)應(yīng)的公共事件等不再發(fā)給應(yīng)用進(jìn)程)和進(jìn)程終止。 為了保障后臺(tái)音樂播放、日歷提醒等功能的正常使用,系統(tǒng)提供了規(guī)范內(nèi)受約束的后臺(tái)任務(wù),擴(kuò)展應(yīng)用在
    發(fā)表于 11-29 09:58

    鴻蒙原生應(yīng)用/元服務(wù)開發(fā)-Stage模型能力接口(四)

    一、說明 AbilityStage是HAP的運(yùn)行時(shí)類。AbilityStage類提供在HAP加載的時(shí)候,通知開發(fā)者,可以在此進(jìn)行該HAP的初始化(如資源預(yù)加載,線程創(chuàng)建等)能力。 本模塊首批接口
    發(fā)表于 12-14 15:39

    鴻蒙開發(fā)接口Ability框架:【@ohos.ability.wantConstant (wantConstant)】

    wantConstant模塊提供want中action和entity的權(quán)限列表的能力,包括系統(tǒng)公共事件宏,系統(tǒng)公共事件名稱等。
    的頭像 發(fā)表于 04-30 16:33 ?846次閱讀
    <b class='flag-5'>鴻蒙</b><b class='flag-5'>開發(fā)</b><b class='flag-5'>接口</b>Ability框架:【@<b class='flag-5'>ohos</b>.ability.wantConstant (wantConstant)】

    鴻蒙開發(fā)接口公共事件與通知:【FFI能力(Node-API)】

    Node-API是封裝底層JavaScript運(yùn)行時(shí)能力的一套Native接口。OpenHarmony的N-API組件對(duì)Node-API的接口進(jìn)行了重新實(shí)現(xiàn),ArkUI-X同樣擁有這部分能力,目前支持部分接口,支持列表。
    的頭像 發(fā)表于 05-21 16:38 ?1265次閱讀
    <b class='flag-5'>鴻蒙</b><b class='flag-5'>開發(fā)</b><b class='flag-5'>接口</b><b class='flag-5'>公共事</b>件與<b class='flag-5'>通知</b>:【FFI能力(Node-API)】

    基于ArkTS語言的OpenHarmony APP應(yīng)用開發(fā)公共事件的訂閱和發(fā)布

    1、程序介紹本示例主要展示了公共事件相關(guān)的功能,實(shí)現(xiàn)了一個(gè)檢測用戶部分行為的應(yīng)用。具體而言,本案例實(shí)現(xiàn)了如下幾個(gè)公共事件功能:通過訂閱系統(tǒng)公共事件,實(shí)現(xiàn)對(duì)用戶操作行為(亮滅屏、斷聯(lián)網(wǎng))的監(jiān)測;通過
    的頭像 發(fā)表于 09-19 08:05 ?898次閱讀
    基于ArkTS語言的OpenHarmony APP應(yīng)用<b class='flag-5'>開發(fā)</b>:<b class='flag-5'>公共事</b>件的訂閱和發(fā)布