Language

FillResponse.Builder.SetAuthentication メソッド

定義

オーバーロード

名前 説明
SetAuthentication(AutofillId[], IntentSender, Presentations)

この応答でデータ セットを使用して画面をオートフィルする前に、カスタム UI をトリガーします。

SetAuthentication(AutofillId[], IntentSender, RemoteViews)

この応答でデータ セットを使用して画面をオートフィルする前に、カスタム UI をトリガーします。

SetAuthentication(AutofillId[], IntentSender, RemoteViews, InlinePresentation)

この応答でデータ セットを使用して画面をオートフィルする前に、カスタム UI をトリガーします。

SetAuthentication(AutofillId[], IntentSender, RemoteViews, InlinePresentation, InlinePresentation)

この応答でデータ セットを使用して画面をオートフィルする前に、カスタム UI をトリガーします。

SetAuthentication(AutofillId[], IntentSender, Presentations)

この応答でデータ セットを使用して画面をオートフィルする前に、カスタム UI をトリガーします。

[Android.Runtime.Register("setAuthentication", "([Landroid/view/autofill/AutofillId;Landroid/content/IntentSender;Landroid/service/autofill/Presentations;)Landroid/service/autofill/FillResponse$Builder;", "", ApiSince=33)]
public Android.Service.Autofill.FillResponse.Builder SetAuthentication(Android.Views.Autofill.AutofillId[] ids, Android.Content.IntentSender? authentication, Android.Service.Autofill.Presentations? presentations);
[<Android.Runtime.Register("setAuthentication", "([Landroid/view/autofill/AutofillId;Landroid/content/IntentSender;Landroid/service/autofill/Presentations;)Landroid/service/autofill/FillResponse$Builder;", "", ApiSince=33)>]
member this.SetAuthentication : Android.Views.Autofill.AutofillId[] * Android.Content.IntentSender * Android.Service.Autofill.Presentations -> Android.Service.Autofill.FillResponse.Builder

パラメーター

ids
AutofillId[]

ビューの ID。フォーカスされると認証 UI が表示されます。 この値は null にすることはできません。

authentication
IntentSender

認証フローを使用したアクティビティへの意図。 この値は null である可能性があります。

presentations
Presentations

応答を視覚化するプレゼンテーション。 この値は null である可能性があります。

返品

このビルダー。

属性

注釈

この応答でデータ セットを使用して画面をオートフィルする前に、カスタム UI をトリガーします。

注: この方法の名前は、認証フローのためだけに使用する必要があることを示唆していますが、他の高度なフローにも使用できます。例については、「AutofillService」を参照してください。

これは通常、データ セット ラベルとデータ セット データを暗号化する場合に、ユーザーの操作でデータ コンテナーのロックを解除する必要がある場合に便利です。 ユーザー エクスペリエンスの向上につながるデータ セット レベルでの認証を許可するデータ セット ラベルではなく、機密データのみを暗号化することをお勧めします。 機密データをラベル (メール アドレスなど) として使用する場合は、暗号化も行う必要があることに注意してください。 指定された意図は、認証フローを実装するアクティビティである必要があります。 また、認証の意図を指定する場合は、ユーザーが認証フローをトリガーするために、塗りつぶし UI に表示するプレゼンテーション ビューも指定する必要があります。

ユーザーがオートフィルをトリガーすると、指定された意図が起動され、その追加コンテンツに画面の内容とクライアントの状態が表示されます。 認証フローを完了したら、アクティビティの結果をActivity.RESULT_OKに設定し、完全に設定された応答でAutofillManager.EXTRA_AUTHENTICATION_RESULTを追加設定する必要があります (画面を自動入力できない場合は null)。

たとえば、ユーザーのデータがロックされ、認証が必要とマークされているために空の応答を指定した場合、認証に成功した場合に返される応答では、使用可能なすべてのデータ セット (CVV を入力する必要があるクレジット カードなど) をさらに認証する必要がある場合があります。

認証の意図を指定する場合は、認証フローをトリガーするための応答を視覚化するために使用されるプレゼンテーションも提供する必要があります。

注: プラットフォームが認証引数を入力する必要があるPendingIntent.FLAG_IMMUTABLEを使用して、指定された保留中の意図を変更不可にしないでください。

注: setHeader(RemoteViews) または setFooter(RemoteViews) は InlinePresentation では機能しません。

android.service.autofill.FillResponse.Builder.setAuthenticationの Android リファレンス。

このページの一部は、によって作成および共有され、に記載されている条件に従って使用される作業に基づく変更です。

適用対象

SetAuthentication(AutofillId[], IntentSender, RemoteViews)

この応答でデータ セットを使用して画面をオートフィルする前に、カスタム UI をトリガーします。

[Android.Runtime.Register("setAuthentication", "([Landroid/view/autofill/AutofillId;Landroid/content/IntentSender;Landroid/widget/RemoteViews;)Landroid/service/autofill/FillResponse$Builder;", "", ApiSince=26)]
public Android.Service.Autofill.FillResponse.Builder SetAuthentication(Android.Views.Autofill.AutofillId[] ids, Android.Content.IntentSender? authentication, Android.Widget.RemoteViews? presentation);
[<Android.Runtime.Register("setAuthentication", "([Landroid/view/autofill/AutofillId;Landroid/content/IntentSender;Landroid/widget/RemoteViews;)Landroid/service/autofill/FillResponse$Builder;", "", ApiSince=26)>]
member this.SetAuthentication : Android.Views.Autofill.AutofillId[] * Android.Content.IntentSender * Android.Widget.RemoteViews -> Android.Service.Autofill.FillResponse.Builder

パラメーター

ids
AutofillId[]

ビューの ID。フォーカスされると認証 UI が表示されます。 この値は null にすることはできません。

authentication
IntentSender

認証フローを使用したアクティビティへの意図。 この値は null である可能性があります。

presentation
RemoteViews

応答を視覚化するプレゼンテーション。 この値は null である可能性があります。

返品

このビルダー。

属性

注釈

このメソッドは、API レベル 33 では非推奨になりました。 代わりに setAuthentication(AutofillId[],IntentSender,Presentations) を使用してください。

この応答でデータ セットを使用して画面をオートフィルする前に、カスタム UI をトリガーします。

注: この方法の名前は、認証フローのためだけに使用する必要があることを示唆していますが、他の高度なフローにも使用できます。例については、「AutofillService」を参照してください。

これは通常、データ セット ラベルとデータ セット データを暗号化する場合に、ユーザーの操作でデータ コンテナーのロックを解除する必要がある場合に便利です。 ユーザー エクスペリエンスの向上につながるデータ セット レベルでの認証を許可するデータ セット ラベルではなく、機密データのみを暗号化することをお勧めします。 機密データをラベル (メール アドレスなど) として使用する場合は、暗号化も行う必要があることに注意してください。 指定された意図は、認証フローを実装するアクティビティである必要があります。 また、認証の意図を指定する場合は、ユーザーが認証フローをトリガーするために、塗りつぶし UI に表示するプレゼンテーション ビューも指定する必要があります。

ユーザーがオートフィルをトリガーすると、指定された意図が起動され、その追加コンテンツに画面の内容とクライアントの状態が表示されます。 認証フローを完了したら、アクティビティの結果をActivity.RESULT_OKに設定し、完全に設定された応答でAutofillManager.EXTRA_AUTHENTICATION_RESULTを追加設定する必要があります (画面を自動入力できない場合は null)。

重要: Android 12 に設定されている意図に対して Extras を null 以外にする必要があります。そうしないと、クラッシュが発生します。 Activity.setResult(int) を使用しないでください。代わりに、Null 以外のエクストラで Activity.setResult(int,Intent) を使用してください。 クラッシュを回避するためにアクティビティを終了するときは、AutofillManager.EXTRA_AUTHENTICATION_RESULTを null に設定するか、Intent.putExtras(Bundle) で Bundle.EMPTY を使用することを検討してください。

たとえば、ユーザーのデータがロックされ、認証が必要とマークされているために空の応答を指定した場合、認証に成功した場合に返される応答では、使用可能なすべてのデータ セット (CVV を入力する必要があるクレジット カードなど) をさらに認証する必要がある場合があります。

認証の意図を指定する場合は、認証フローをトリガーするための応答を視覚化するために使用されるプレゼンテーションも提供する必要があります。

注: プラットフォームが認証引数を入力する必要があるPendingIntent.FLAG_IMMUTABLEを使用して、指定された保留中の意図を変更不可にしないでください。

テーマは RemoteViews レイアウトでは機能しません。 ハードコードされたテキストの色や背景色を避ける: プラットフォームによってオートフィルのテーマが異なる場合があります。

android.service.autofill.FillResponse.Builder.setAuthenticationの Android リファレンス。

このページの一部は、によって作成および共有され、に記載されている条件に従って使用される作業に基づく変更です。

適用対象

SetAuthentication(AutofillId[], IntentSender, RemoteViews, InlinePresentation)

この応答でデータ セットを使用して画面をオートフィルする前に、カスタム UI をトリガーします。

[Android.Runtime.Register("setAuthentication", "([Landroid/view/autofill/AutofillId;Landroid/content/IntentSender;Landroid/widget/RemoteViews;Landroid/service/autofill/InlinePresentation;)Landroid/service/autofill/FillResponse$Builder;", "", ApiSince=30)]
public Android.Service.Autofill.FillResponse.Builder SetAuthentication(Android.Views.Autofill.AutofillId[] ids, Android.Content.IntentSender? authentication, Android.Widget.RemoteViews? presentation, Android.Service.Autofill.InlinePresentation? inlinePresentation);
[<Android.Runtime.Register("setAuthentication", "([Landroid/view/autofill/AutofillId;Landroid/content/IntentSender;Landroid/widget/RemoteViews;Landroid/service/autofill/InlinePresentation;)Landroid/service/autofill/FillResponse$Builder;", "", ApiSince=30)>]
member this.SetAuthentication : Android.Views.Autofill.AutofillId[] * Android.Content.IntentSender * Android.Widget.RemoteViews * Android.Service.Autofill.InlinePresentation -> Android.Service.Autofill.FillResponse.Builder

パラメーター

ids
AutofillId[]

ビューの ID。フォーカスされると認証 UI が表示されます。 この値は null にすることはできません。

authentication
IntentSender

認証フローを使用したアクティビティへの意図。 この値は null である可能性があります。

presentation
RemoteViews

応答を視覚化するプレゼンテーション。 この値は null である可能性があります。

inlinePresentation
InlinePresentation

インラインで応答を視覚化する inlinePresentation。 この値は null である可能性があります。

返品

このビルダー。 この値は null にすることはできません。

属性

注釈

このメソッドは、API レベル 33 では非推奨になりました。 代わりに setAuthentication(AutofillId[],IntentSender,Presentations) を使用してください。

この応答でデータ セットを使用して画面をオートフィルする前に、カスタム UI をトリガーします。

注: この方法の名前は、認証フローのためだけに使用する必要があることを示唆していますが、他の高度なフローにも使用できます。例については、「AutofillService」を参照してください。

このメソッドは setAuthentication(AutofillId[],IntentSender,RemoteViews) に似ていますが、インライン オートフィル フローを介した認証に必要な InlinePresentation プレゼンテーションも受け入れます。

注: setHeader(RemoteViews) または setFooter(RemoteViews) は InlinePresentation では機能しません。

android.service.autofill.FillResponse.Builder.setAuthenticationの Android リファレンス。

このページの一部は、によって作成および共有され、に記載されている条件に従って使用される作業に基づく変更です。

適用対象

SetAuthentication(AutofillId[], IntentSender, RemoteViews, InlinePresentation, InlinePresentation)

この応答でデータ セットを使用して画面をオートフィルする前に、カスタム UI をトリガーします。

[Android.Runtime.Register("setAuthentication", "([Landroid/view/autofill/AutofillId;Landroid/content/IntentSender;Landroid/widget/RemoteViews;Landroid/service/autofill/InlinePresentation;Landroid/service/autofill/InlinePresentation;)Landroid/service/autofill/FillResponse$Builder;", "", ApiSince=31)]
public Android.Service.Autofill.FillResponse.Builder SetAuthentication(Android.Views.Autofill.AutofillId[] ids, Android.Content.IntentSender? authentication, Android.Widget.RemoteViews? presentation, Android.Service.Autofill.InlinePresentation? inlinePresentation, Android.Service.Autofill.InlinePresentation? inlineTooltipPresentation);
[<Android.Runtime.Register("setAuthentication", "([Landroid/view/autofill/AutofillId;Landroid/content/IntentSender;Landroid/widget/RemoteViews;Landroid/service/autofill/InlinePresentation;Landroid/service/autofill/InlinePresentation;)Landroid/service/autofill/FillResponse$Builder;", "", ApiSince=31)>]
member this.SetAuthentication : Android.Views.Autofill.AutofillId[] * Android.Content.IntentSender * Android.Widget.RemoteViews * Android.Service.Autofill.InlinePresentation * Android.Service.Autofill.InlinePresentation -> Android.Service.Autofill.FillResponse.Builder

パラメーター

ids
AutofillId[]
authentication
IntentSender
presentation
RemoteViews
inlinePresentation
InlinePresentation
inlineTooltipPresentation
InlinePresentation

返品

属性

注釈

このメソッドは、API レベル 33 では非推奨になりました。 代わりに setAuthentication(AutofillId[],IntentSender,Presentations) を使用してください。

この応答でデータ セットを使用して画面をオートフィルする前に、カスタム UI をトリガーします。

setAuthentication(AutofillId[],IntentSender,RemoteViews,InlinePresentation) のようなこのメソッドですが、インライン検索候補ツールヒントの InlinePresentation を設定できます。

android.service.autofill.FillResponse.Builder.setAuthenticationの Android リファレンス。

このページの一部は、によって作成および共有され、に記載されている条件に従って使用される作業に基づく変更です。

適用対象