新聞中心
NotificationUserInput

10年積累的網(wǎng)站設(shè)計制作、成都網(wǎng)站建設(shè)經(jīng)驗,可以快速應(yīng)對客戶對網(wǎng)站的新想法和需求。提供各種問題對應(yīng)的解決方案。讓選擇我們的客戶得到更好、更有力的網(wǎng)絡(luò)服務(wù)。我雖然不認(rèn)識你,你也不認(rèn)識我。但先網(wǎng)站設(shè)計后付款的網(wǎng)站建設(shè)流程,更有榮縣免費網(wǎng)站建設(shè)讓你可以放心的選擇與我們合作。
java.lang.Object
|---ohos.event.notification.NotificationUserInput
public class NotificationUserInput
extends Object
implements Sequenceable定義用戶輸入,它將與發(fā)送的 IntentAgent 中的意圖一起傳遞。 您應(yīng)該始終使用 NotificationUserInput.Builder 創(chuàng)建此類的實例。 您可以調(diào)用 NotificationActionButton.Builder#addNotificationUserInput(NotificationUserInput) 將 NotificationUserInput 對象添加到 NotificationActionButton。
Since:
3
嵌套類摘要
| 修飾符和類型 | 類 | 描述 |
|---|---|---|
| static class | NotificationUserInput.Builder | NotificationUserInput 對象的構(gòu)建器類。 |
| 從接口 ohos.utils.Sequenceable 繼承的嵌套類/接口 |
|---|
| Sequenceable.ProducerT |
字段摘要
| 修飾符和類型 | 字段 | 描述 |
|---|---|---|
| static Sequenceable.ProducerNotificationUserInput | PRODUCER | 從 Parcel 創(chuàng)建 NotificationUserInput 實例。 |
方法總結(jié)
| 修飾符和類型 | 方法 | 描述 |
|---|---|---|
| static void | addInputsToIntent(ListNotificationUserInput userInputs, Intent intent, PacMap pacMap) | 將 NotificationUserInput 對象列表添加到 Intent。 |
| static void | addMimeInputToIntent(NotificationUserInput userInput, Intent intent, MapString,Uri results) | 將指定 MIME 類型的給定 NotificationUserInput 對象添加到 Intent。 |
| PacMap | getAdditionalData() | 獲取包含在此 NotificationUserInput 對象中的附加數(shù)據(jù)。 |
| int | getEditType() | 獲取此 NotificationUserInput 對象提供的選項的編輯類型。 |
| String | getInputKey() | 獲取此 NotificationUserInput 對象的鍵。 |
| static PacMap | getInputsFromIntent(Intent intent) | 從指定的 ohos.aafwk.content.Intent 獲取輸入文本結(jié)果。 |
| static int | getInputsSource(Intent intent) | 獲取此 NotificationUserInput 對象的輸入源。 |
| static MapString,Uri | getMimeInputsFromIntent(Intent intent, String inputKey) | 從指定的 ohos.aafwk.content.Intent 獲取特定 MIME 類型的輸入結(jié)果。 |
| ListString | getOptions() | 獲取提供給用戶的選項以滿足用戶輸入需求。 |
| SetString | getPermitMimeTypes() | 獲取此 NotificationUserInput 對象允許的 MIME 類型。 |
| String | getTag() | 當(dāng)從用戶那里收集這個輸入時,獲取要顯示給用戶的標(biāo)簽。 |
| boolean | isMimeTypeOnly() | 檢查此 NotificationUserInput 對象是否僅允許特定 MIME 類型的值。 |
| boolean | isPermitFreeFormInput() | 檢查用戶是否可以為此 NotificationUserInput 對象提供任意值。 |
| boolean | marshalling(Parcel out) | 將 NotificationUserInput 對象編組到 Parcel 中。 |
| static void | setInputsSource(Intent intent, NotificationConstant.InputsSource source) | 設(shè)置此 NotificationUserInput 對象的輸入源。 |
| String | toString() | 返回對象的字符串表示形式。 |
| boolean | unmarshalling(Parcel in) | 從 Parcel 中解組 NotificationUserInput 對象。 |
| 從類 java.lang.Object 繼承的方法 |
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| 從接口 ohos.utils.Sequenceable 繼承的方法 |
|---|
| hasFileDescriptor |
字段詳細(xì)信息
PRODUCER
public static final Sequenceable.ProducerNotificationUserInput PRODUCER
從 Parcel 創(chuàng)建 NotificationUserInput 實例。
Since:
4
方法詳情
addMimeInputToIntent
public static void addMimeInputToIntent(NotificationUserInput userInput, Intent intent, MapString,Uri results)
將指定 MIME 類型的給定 NotificationUserInput 對象添加到 Intent。 該方法與 addInputsToIntent(java.util.List, ohos.aafwk.content.Intent, ohos.utils.PacMap) 類似,只是必須指定 MIME 類型。
參數(shù):
| 參數(shù)名稱 | 參數(shù)描述 |
|---|---|
| userInput | 指示為其提供輸入結(jié)果的 NotificationUserInput 對象。 |
| intent | 指示要添加輸入結(jié)果的 Intent。 |
| results | 指示包含 MIME 類型及其 URI 結(jié)果的映射。 |
Since:
3
addInputsToIntent
public static void addInputsToIntent(ListNotificationUserInput userInputs, Intent intent, PacMap pacMap)
將 NotificationUserInput 對象列表添加到 Intent。 此方法僅應(yīng)在將輸入結(jié)果發(fā)送到 IntentAgent 時由用戶輸入收集服務(wù)調(diào)用。
參數(shù):
| 參數(shù)名稱 | 參數(shù)描述 |
|---|---|
| userInputs | 指示為其提供輸入結(jié)果的 NotificationUserInput 對象的列表。 |
| intent | 指示要添加輸入結(jié)果的 Intent。 |
| pacMap | 指示保存輸入結(jié)果的 PacMap 對象。 PacMap 鍵必須與 userInputs 中指定的對象中包含的鍵匹配。 |
Since:
3
getMimeInputsFromIntent
public static MapString,Uri getMimeInputsFromIntent(Intent intent, String inputKey)
從指定的 ohos.aafwk.content.Intent 獲取特定 MIME 類型的輸入結(jié)果。 此方法類似于 getInputsFromIntent(ohos.aafwk.content.Intent),但使用的是 NotificationUserInput 的鍵。
參數(shù):
| 參數(shù)名稱 | 參數(shù)描述 |
|---|---|
| intent | 表示包含用戶輸入結(jié)果的 Intent。 |
| inputKey | 表示要獲取的 NotificationUserInput 結(jié)果的鍵。 |
返回:
返回包含 MIME 類型及其 URI 結(jié)果的映射。
Since:
3
getInputsFromIntent
public static PacMap getInputsFromIntent(Intent intent)
從指定的 ohos.aafwk.content.Intent 獲取輸入文本結(jié)果。
參數(shù):
| 參數(shù)名稱 | 參數(shù)描述 |
|---|---|
| intent | 表示包含一個或多個用戶輸入結(jié)果的 Intent 對象。 |
返回:
返回包含輸入文本結(jié)果的 PacMap 對象。
Since:
3
setInputsSource
public static void setInputsSource(Intent intent, NotificationConstant.InputsSource source)
設(shè)置此 NotificationUserInput 對象的輸入源。
參數(shù):
| 參數(shù)名稱 | 參數(shù)描述 |
|---|---|
| intent | 指示要添加輸入結(jié)果的 Intent。 |
| source | 表示輸入源。 |
Since:
3
getInputsSource
public static int getInputsSource(Intent intent)
獲取此 NotificationUserInput 對象的輸入源。
參數(shù):
| 參數(shù)名稱 | 參數(shù)描述 |
|---|---|
| intent | 表示包含輸入結(jié)果的 Intent。 |
返回:
返回此 NotificationUserInput 對象的輸入源,如 NotificationConstant.InputsSource 中所枚舉。
Since:
3
getInputKey
public String getInputKey()
獲取此 NotificationUserInput 對象的鍵。
返回:
返回此 NotificationUserInput 對象的鍵。
Since:
3
getTag
public String getTag()
當(dāng)從用戶那里收集這個輸入時,獲取要顯示給用戶的標(biāo)簽。
返回:
返回要顯示給用戶的標(biāo)簽。
Since:
3
getOptions
public ListString getOptions()
獲取提供給用戶的選項以滿足用戶輸入需求。
返回:
返回預(yù)定義選項的列表。
Since:
3
getPermitMimeTypes
public SetString getPermitMimeTypes()
獲取此 NotificationUserInput 對象允許的 MIME 類型。
返回:
返回允許的 MIME 類型列表。
Since:
3
getAdditionalData
public PacMap getAdditionalData()
獲取包含在此 NotificationUserInput 對象中的附加數(shù)據(jù)。
返回:
返回此 NotificationUserInput 對象中的附加數(shù)據(jù)。
Since:
3
isPermitFreeFormInput
public boolean isPermitFreeFormInput()
檢查用戶是否可以為此 NotificationUserInput 對象提供任意值。
返回:
如果此對象允許任意值,則返回 true; 否則返回 false。
Since:
3
isMimeTypeOnly
public boolean isMimeTypeOnly()
檢查此 NotificationUserInput 對象是否僅允許特定 MIME 類型的值。
返回:
如果此對象僅允許特定 MIME 類型的值,則返回 true; 否則返回 false。
Since:
3
getEditType
public int getEditType()
獲取此 NotificationUserInput 對象提供的選項的編輯類型。
返回:
返回選項的編輯類型。
Since:
4
marshalling
public boolean marshalling(Parcel out)
將 NotificationUserInput 對象編組到 Parcel 中。
進(jìn)程可以調(diào)用 unmarshalling(ohos.utils.Parcel) 方法從 Parcel 中解組 NotificationUserInput 對象以實現(xiàn)進(jìn)程間通信 (IPC)。
指定者:
接口 Sequenceable 中的編組
參數(shù):
| 參數(shù)名稱 | 參數(shù)描述 |
|---|---|
| out | 指示用于編組的 Parcel 對象。 |
返回:
如果編組成功,則返回 true; 否則返回 false。
Since:
3
unmarshalling
public boolean unmarshalling(Parcel in)
從 Parcel 中解組 NotificationUserInput 對象。
指定者:
在接口 Sequenceable 中解組
參數(shù):
| 參數(shù)名稱 | 參數(shù)描述 |
|---|---|
| in | 指示用于解組的 Parcel 對象。 |
返回:
如果解組成功,則返回 true; 否則返回 false。
Since:
3
toString
public String toString()
從類復(fù)制的描述:對象
返回對象的字符串表示形式。 通常,toString 方法返回一個“以文本方式表示”該對象的字符串。 結(jié)果應(yīng)該是一個簡潔但信息豐富的表示,易于人們閱讀。 建議所有子類重寫此方法。
Object 類的 toString 方法返回一個字符串,該字符串由對象作為其實例的類的名稱、at 符號字符“@”和對象哈希碼的無符號十六進(jìn)制表示形式組成。 換句話說,此方法返回一個等于以下值的字符串:
getClass().getName() + '@' + Integer.toHexString(hashCode())覆蓋:
類 Object 中的 toString
返回:
對象的字符串表示形式。
Since:
4
網(wǎng)站名稱:創(chuàng)新互聯(lián)鴻蒙OS教程:鴻蒙OS NotificationUserInput
分享路徑:http://fisionsoft.com.cn/article/djoihgd.html


咨詢
建站咨詢
