新聞中心
NotificationSlotGroup

為黃石港等地區(qū)用戶提供了全套網(wǎng)頁設(shè)計(jì)制作服務(wù),及黃石港網(wǎng)站建設(shè)行業(yè)解決方案。主營業(yè)務(wù)為成都網(wǎng)站建設(shè)、網(wǎng)站設(shè)計(jì)、黃石港網(wǎng)站設(shè)計(jì),以傳統(tǒng)方式定制建設(shè)網(wǎng)站,并提供域名空間備案等一條龍服務(wù),秉承以專業(yè)、用心的態(tài)度為用戶提供真誠的服務(wù)。我們深信只要達(dá)到每一位用戶的要求,就會(huì)得到認(rèn)可,從而選擇與我們長(zhǎng)期合作。這樣,我們也可以走得更遠(yuǎn)!
java.lang.Object
|---ohos.event.notification.NotificationSlotGroup
public final class NotificationSlotGroup
extends Object
implements Sequenceable
管理應(yīng)用程序中具有相同名稱的多個(gè)通知槽。 例如,社交網(wǎng)絡(luò)服務(wù) (SNS) 應(yīng)用程序可能同時(shí)支持個(gè)人和企業(yè)帳戶,并且每個(gè)帳戶可能需要具有相同功能和名稱的多個(gè)通知槽。 您可以將屬于單個(gè)帳戶的同名通知槽綁定到一個(gè)通知槽組,以管理它們各自的信息。
Since:
3
嵌套類摘要
| 從接口 ohos.utils.Sequenceable 繼承的嵌套類/接口 |
|---|
| Sequenceable.ProducerT |
字段摘要
| 修飾符和類型 | 字段 | 描述 |
|---|---|---|
| static Sequenceable.ProducerNotificationSlotGroup | PRODUCER | 從 Parcel 創(chuàng)建 NotificationSlotGroup 實(shí)例。 |
構(gòu)造函數(shù)摘要
| 構(gòu)造函數(shù) | 描述 |
|---|---|
| NotificationSlotGroup() | 用于創(chuàng)建 NotificationSlotGroup 實(shí)例的默認(rèn)構(gòu)造函數(shù)。 |
| NotificationSlotGroup(String id, String name) | 一個(gè)構(gòu)造函數(shù),用于創(chuàng)建具有初始化組 ID 和名稱的 NotificationSlotGroup 實(shí)例。 |
方法總結(jié)
| 修飾符和類型 | 方法 | 描述 |
|---|---|---|
| String | getDescription() | 獲取此 NotificationSlotGroup 對(duì)象的描述,由 setDescription(java.lang.String) 設(shè)置。 |
| String | getId() | 獲取此 NotificationSlotGroup 對(duì)象的 ID,由 NotificationSlotGroup(java.lang.String,java.lang.String) 設(shè)置。 |
| String | getName() | 獲取此 NotificationSlotGroup 對(duì)象的名稱,由 NotificationSlotGroup(java.lang.String,java.lang.String) 設(shè)置。 |
| ListNotificationSlot | getSlots() | 獲取綁定到此 NotificationSlotGroup 對(duì)象的通知槽列表。 |
| boolean | isDisabled() | 檢查此 NotificationSlotGroup 是否已禁用。 |
| boolean | marshalling(Parcel out) | Marshalls NotificationS 不是 Group 對(duì)象并將它們寫入 Parcel。 |
| void | setDescription(String desc) | 設(shè)置此 NotificationSlotGroup 對(duì)象的描述。 |
| String | toString() | 返回對(duì)象的字符串表示形式。 |
| boolean | unmarshalling(Parcel in) | 從 Parcel 中解組 NotificationSlotGroup 對(duì)象。 |
| 從類 java.lang.Object 繼承的方法 |
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| 從接口 ohos.utils.Sequenceable 繼承的方法 |
|---|
| hasFileDescriptor |
字段詳細(xì)信息
PRODUCER
public static final Sequenceable.ProducerNotificationSlotGroup PRODUCER
從 Parcel 創(chuàng)建 NotificationSlotGroup 實(shí)例。
Since:
4
構(gòu)造函數(shù)詳細(xì)信息
NotificationSlotGroup
public NotificationSlotGroup(String id, String name)
一個(gè)構(gòu)造函數(shù),用于創(chuàng)建具有初始化組 ID 和名稱的 NotificationSlotGroup 實(shí)例。
參數(shù):
| 參數(shù)名稱 | 參數(shù)描述 |
|---|---|
| id | NotificationSlotGroup的ID。 ID 必須是唯一的,并且它的長(zhǎng)度不能超過 1000 個(gè)字符(超出的部分會(huì)被自動(dòng)截?cái)啵?/td> |
| name | 表示 NotificationSlotGroup 的名稱。 其長(zhǎng)度不得超過 1000 個(gè)字符(超出部分將自動(dòng)截?cái)啵?/td> |
Since:
3
NotificationSlotGroup
public NotificationSlotGroup()
用于創(chuàng)建 NotificationSlotGroup 實(shí)例的默認(rèn)構(gòu)造函數(shù)。
Since:
3
方法詳情
getId
public String getId()
獲取此 NotificationSlotGroup 對(duì)象的 ID,由 NotificationSlotGroup(java.lang.String,java.lang.String) 設(shè)置。
返回:
返回此 NotificationSlotGroup 的 ID。
Since:
3
getName
public String getName()
獲取此 NotificationSlotGroup 對(duì)象的名稱,由 NotificationSlotGroup(java.lang.String,java.lang.String) 設(shè)置。
返回:
返回此 NotificationSlotGroup 的名稱。
Since:
3
getSlots
public ListNotificationSlot getSlots()
獲取綁定到此 NotificationSlotGroup 對(duì)象的通知槽列表。 NotificationSlot#setSlotGroup(String) 用于將通知槽綁定到通知槽組。
返回:
返回綁定到此 NotificationSlotGroup 的通知槽列表。
Since:
3
setDescription
public void setDescription(String desc)
設(shè)置此 NotificationSlotGroup 對(duì)象的描述。
參數(shù):
| 參數(shù)名稱 | 參數(shù)描述 |
|---|---|
| desc | 描述此 NotificationSlotGroup 對(duì)象。 其長(zhǎng)度不得超過 1000 個(gè)字符(超出部分將自動(dòng)截?cái)啵?/td> |
Since:
3
getDescription
public String getDescription()
獲取此 NotificationSlotGroup 對(duì)象的描述,由 setDescription(java.lang.String) 設(shè)置。
返回:
返回此 NotificationSlotGroup 的描述。
Since:
3
isDisabled
public boolean isDisabled()
檢查此 NotificationSlotGroup 是否已禁用。 如果禁用,則無法發(fā)布與屬于該組的通知槽關(guān)聯(lián)的通知。
返回:
如果此 NotificationSlotGroup 被禁用,則返回 true; 否則返回 false。
Since:
3
marshalling
public boolean marshalling(Parcel out)
編組 NotificationSlotGroup 對(duì)象并將它們寫入 Parcel。
進(jìn)程可以調(diào)用 unmarshalling(ohos.utils.Parcel) 方法從 Parcel 中解組 NotificationSlotGroup 對(duì)象以實(shí)現(xiàn)進(jìn)程間通信 (IPC)。
指定者:
接口 Sequenceable 中的編組
參數(shù):
| 參數(shù)名稱 | 參數(shù)描述 |
|---|---|
| out | 指示用于編組的 Parcel 對(duì)象。 |
返回:
如果編組成功,則返回 true; 否則返回 false。
Since:
4
unmarshalling
public boolean unmarshalling(Parcel in)
從 Parcel 中解組 NotificationSlotGroup 對(duì)象。
指定者:
在接口 Sequenceable 中解組
參數(shù):
| 參數(shù)名稱 | 參數(shù)描述 |
|---|---|
| in | 指示用于解組的 Parcel 對(duì)象。 |
返回:
如果解組成功,則返回 true; 否則返回 false。
Since:
4
toString
public String toString()
從類復(fù)制的描述:對(duì)象
返回對(duì)象的字符串表示形式。 通常,toString 方法返回一個(gè)“以文本方式表示”該對(duì)象的字符串。 結(jié)果應(yīng)該是一個(gè)簡(jiǎn)潔但信息豐富的表示,易于人們閱讀。 建議所有子類重寫此方法。
Object 類的 toString 方法返回一個(gè)字符串,該字符串由對(duì)象作為其實(shí)例的類的名稱、at 符號(hào)字符“@”和對(duì)象哈希碼的無符號(hào)十六進(jìn)制表示形式組成。 換句話說,此方法返回一個(gè)等于以下值的字符串:
getClass().getName() + '@' + Integer.toHexString(hashCode())
覆蓋:
類 Object 中的 toString
返回:
對(duì)象的字符串表示形式。
Since:
4
本文題目:創(chuàng)新互聯(lián)鴻蒙OS教程:鴻蒙OSNotificationSlotGroup
分享URL:http://m.fisionsoft.com.cn/article/cdopjgd.html


咨詢
建站咨詢
