RemoteInput 類別

定義

RemoteInput物件會指定要從使用者收集的輸入,以連同傳送之 內的 android.app.PendingIntent 意圖一起傳遞。

[Android.Runtime.Register("android/app/RemoteInput", DoNotGenerateAcw=true)]
public sealed class RemoteInput : Java.Lang.Object, Android.OS.IParcelable, IDisposable, Java.Interop.IJavaPeerable
[<Android.Runtime.Register("android/app/RemoteInput", DoNotGenerateAcw=true)>]
type RemoteInput = class
    inherit Object
    interface IParcelable
    interface IJavaObject
    interface IDisposable
    interface IJavaPeerable
繼承
RemoteInput
屬性
實作

備註

RemoteInput物件會指定要從使用者收集的輸入,以連同傳送之 內的 android.app.PendingIntent 意圖一起傳遞。 一律使用 RemoteInput.Builder 來建立這個類別的實例。 <p class=「note」 > 如需如何使用這個類別的詳細資訊,請參閱 回復通知

下列範例會將 新增 RemoteInputNotification.Action 、將結果索引鍵設定為 quick_reply ,並將標籤設定為 Quick reply 。 當使用者觸發動作時,系統會提示使用者輸入回應。 結果會連同意圖一起傳送,而且可以使用結果索引鍵擷取, (從 所 #getResultsFromIntent 傳回的 Bundle) 提供給 Builder 建構函式。

public static final String KEY_QUICK_REPLY_TEXT = "quick_reply";
            Notification.Action action = new Notification.Action.Builder(
                    R.drawable.reply, &quot;Reply&quot;, actionIntent)
<b>.addRemoteInput(new RemoteInput.Builder(KEY_QUICK_REPLY_TEXT)
                            .setLabel("Quick reply").build()</b>)
                    .build();

android.app.PendingIntent引發 時,內的意圖會在收集時包含輸入結果。 若要存取這些結果,請使用 函式 #getResultsFromIntent 。 結果值會顯示在傳遞至 Builder 建構函式的結果索引鍵底下。

public static final String KEY_QUICK_REPLY_TEXT = "quick_reply";
            Bundle results = RemoteInput.getResultsFromIntent(intent);
            if (results != null) {
                CharSequence quickReplyResult = results.getCharSequence(KEY_QUICK_REPLY_TEXT);
            }

android.app.RemoteInput JAVA 檔。

此頁面的部分是根據所建立和共用的工作進行修改,並根據 2.5 屬性授權中所述的詞彙來使用。

欄位

EditChoicesBeforeSendingAuto
已淘汰.

平臺會決定在傳送至應用程式之前,是否要編輯選擇。

EditChoicesBeforeSendingDisabled
已淘汰.

點選選擇應該立即傳送輸入,而不需要讓使用者編輯。

EditChoicesBeforeSendingEnabled
已淘汰.

點選選擇應該讓使用者在傳送至應用程式之前先編輯輸入。

ExtraResultsData

額外新增至剪輯資料意圖物件,以保存文字結果組合。

ResultsClipLabel

用來表示用於遠端輸入傳輸之剪輯資料類型的標籤

SourceChoice
已淘汰.

使用者已從 #getChoices 選取其中一個選項。

SourceFreeFormInput
已淘汰.

使用者手動輸入資料。

屬性

AllowedDataTypes

取得可接受的非文字輸入。

AllowFreeFormInput

取得使用者是否可以為輸入提供任意值。

Class

傳回這個 Object 的執行時間類別。

(繼承來源 Object)
Creator
EditChoicesBeforeSending

取得點選選擇是否應該讓使用者在傳送至應用程式之前編輯輸入。

Extras

取得隨此遠端輸入所攜帶的其他中繼資料。

Handle

基礎 Android 實例的控制碼。

(繼承來源 Object)
IsDataOnly

如果輸入只接受資料,表示 #getAllowFreeFormInput false、 #getChoices 為 Null 或空白,且為非 Null 且非空白,則 #getAllowedDataTypes 傳回 true。

JniIdentityHashCode

RemoteInput物件會指定要從使用者收集的輸入,以連同傳送之 內的 android.app.PendingIntent 意圖一起傳遞。

(繼承來源 Object)
JniPeerMembers

RemoteInput物件會指定要從使用者收集的輸入,以連同傳送之 內的 android.app.PendingIntent 意圖一起傳遞。

Label

RemoteInput物件會指定要從使用者收集的輸入,以連同傳送之 內的 android.app.PendingIntent 意圖一起傳遞。

LabelFormatted

收集此輸入時,取得要向使用者顯示的標籤。

PeerReference

RemoteInput物件會指定要從使用者收集的輸入,以連同傳送之 內的 android.app.PendingIntent 意圖一起傳遞。

(繼承來源 Object)
ResultKey

從傳送 時 android.app.PendingIntent#getResultsFromIntent 回的 Bundle 傳回取得此輸入結果的索引鍵。

ThresholdClass

此 API 支援適用于 Android 的 Mono 基礎結構,並不適合直接從您的程式碼使用。

(繼承來源 Object)
ThresholdType

此 API 支援適用于 Android 的 Mono 基礎結構,並不適合直接從您的程式碼使用。

(繼承來源 Object)

方法

AddDataResultToIntent(RemoteInput, Intent, IDictionary<String,Uri>)

#addResultsToIntent 設定資料結果相同。

AddResultsToIntent(RemoteInput[], Intent, Bundle)

在意圖物件中填入從遠端輸入收集的文字結果。

Clone()

建立並傳回這個 物件的複本。

(繼承來源 Object)
DescribeContents()

描述這個可封送處理標記法中包含的特殊物件種類。

Dispose()

RemoteInput物件會指定要從使用者收集的輸入,以連同傳送之 內的 android.app.PendingIntent 意圖一起傳遞。

(繼承來源 Object)
Dispose(Boolean)

RemoteInput物件會指定要從使用者收集的輸入,以連同傳送之 內的 android.app.PendingIntent 意圖一起傳遞。

(繼承來源 Object)
Equals(Object)

指出其他物件是否「等於」這個物件。

(繼承來源 Object)
GetChoices()

取得可能的輸入選項。

GetChoicesFormatted()

取得可能的輸入選項。

GetDataResultsFromIntent(Intent, String)

類似于 #getResultsFromIntent ,但會擷取特定 RemoteInput 結果的資料結果。

GetHashCode()

傳回此物件的雜湊碼值。

(繼承來源 Object)
GetResultsFromIntent(Intent)

從意圖取得遠端輸入文字結果組合。

GetResultsSource(Intent)

取得 RemoteInput 結果的來源。

JavaFinalize()

當垃圾收集判斷物件不再參考物件時,垃圾收集行程會在物件上呼叫。

(繼承來源 Object)
Notify()

喚醒正在等候此物件監視器的單一線程。

(繼承來源 Object)
NotifyAll()

喚醒正在等候此物件監視器的所有線程。

(繼承來源 Object)
SetHandle(IntPtr, JniHandleOwnership)

設定 Handle 屬性。

(繼承來源 Object)
SetResultsSource(Intent, RemoteInputSource)

設定 RemoteInput 結果的來源。

ToArray<T>()

RemoteInput物件會指定要從使用者收集的輸入,以連同傳送之 內的 android.app.PendingIntent 意圖一起傳遞。

(繼承來源 Object)
ToString()

傳回物件的字串表示。

(繼承來源 Object)
UnregisterFromRuntime()

RemoteInput物件會指定要從使用者收集的輸入,以連同傳送之 內的 android.app.PendingIntent 意圖一起傳遞。

(繼承來源 Object)
Wait()

讓目前的執行緒等到喚醒為止,通常是 em < notified/em > 或 < em > interrupted < /em > 。 ><

(繼承來源 Object)
Wait(Int64)

讓目前的執行緒等到喚醒為止,通常是 em < notified/em > 或 < em > interrupted < /em > ,或直到經過一定數量的即時為止。 <>

(繼承來源 Object)
Wait(Int64, Int32)

讓目前的執行緒等到喚醒為止,通常是 em < notified/em > 或 < em > interrupted < /em > ,或直到經過一定數量的即時為止。 <>

(繼承來源 Object)
WriteToParcel(Parcel, ParcelableWriteFlags)

將這個 物件壓平合併至一個托地。

明確介面實作

IJavaPeerable.Disposed()

RemoteInput物件會指定要從使用者收集的輸入,以連同傳送之 內的 android.app.PendingIntent 意圖一起傳遞。

(繼承來源 Object)
IJavaPeerable.DisposeUnlessReferenced()

RemoteInput物件會指定要從使用者收集的輸入,以連同傳送之 內的 android.app.PendingIntent 意圖一起傳遞。

(繼承來源 Object)
IJavaPeerable.Finalized()

RemoteInput物件會指定要從使用者收集的輸入,以連同傳送之 內的 android.app.PendingIntent 意圖一起傳遞。

(繼承來源 Object)
IJavaPeerable.JniManagedPeerState

RemoteInput物件會指定要從使用者收集的輸入,以連同傳送之 內的 android.app.PendingIntent 意圖一起傳遞。

(繼承來源 Object)
IJavaPeerable.SetJniIdentityHashCode(Int32)

RemoteInput物件會指定要從使用者收集的輸入,以連同傳送之 內的 android.app.PendingIntent 意圖一起傳遞。

(繼承來源 Object)
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates)

RemoteInput物件會指定要從使用者收集的輸入,以連同傳送之 內的 android.app.PendingIntent 意圖一起傳遞。

(繼承來源 Object)
IJavaPeerable.SetPeerReference(JniObjectReference)

RemoteInput物件會指定要從使用者收集的輸入,以連同傳送之 內的 android.app.PendingIntent 意圖一起傳遞。

(繼承來源 Object)

擴充方法

JavaCast<TResult>(IJavaObject)

執行 Android 執行時間檢查的類型轉換。

JavaCast<TResult>(IJavaObject)

RemoteInput物件會指定要從使用者收集的輸入,以連同傳送之 內的 android.app.PendingIntent 意圖一起傳遞。

GetJniTypeName(IJavaPeerable)

RemoteInput物件會指定要從使用者收集的輸入,以連同傳送之 內的 android.app.PendingIntent 意圖一起傳遞。

適用於