SaveCallback.OnFailure Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
OnFailure(ICharSequence) |
Notifies the Android System that an
|
OnFailure(String) |
Notifies the Android System that an
|
OnFailure(ICharSequence)
Notifies the Android System that an
AutofillService#onSaveRequest(SaveRequest, SaveCallback)
could not be handled
by the service.
[Android.Runtime.Register("onFailure", "(Ljava/lang/CharSequence;)V", "", ApiSince=26)]
public void OnFailure (Java.Lang.ICharSequence? message);
[<Android.Runtime.Register("onFailure", "(Ljava/lang/CharSequence;)V", "", ApiSince=26)>]
member this.OnFailure : Java.Lang.ICharSequence -> unit
Parameters
- message
- ICharSequence
error message. <b>Note: </b> this message should <b>not</b> contain PII (Personally Identifiable Information, such as username or email address).
- Attributes
Remarks
Notifies the Android System that an AutofillService#onSaveRequest(SaveRequest, SaveCallback)
could not be handled by the service.
This method is just used for logging purposes, the Android System won't call the service again in case of failures—if you need to recover from the failure, just save the SaveRequest
and try again later.
<b>Note: </b>for apps targeting android.os.Build.VERSION_CODES#Q
or higher, this method just logs the message on logcat
; for apps targetting older SDKs, it also displays the message to user using a android.widget.Toast
.
Java documentation for android.service.autofill.SaveCallback.onFailure(java.lang.CharSequence)
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
OnFailure(String)
Notifies the Android System that an
AutofillService#onSaveRequest(SaveRequest, SaveCallback)
could not be handled
by the service.
public void OnFailure (string? message);
member this.OnFailure : string -> unit
Parameters
- message
- String
error message. <b>Note: </b> this message should <b>not</b> contain PII (Personally Identifiable Information, such as username or email address).
Remarks
Notifies the Android System that an AutofillService#onSaveRequest(SaveRequest, SaveCallback)
could not be handled by the service.
This method is just used for logging purposes, the Android System won't call the service again in case of failures—if you need to recover from the failure, just save the SaveRequest
and try again later.
<b>Note: </b>for apps targeting android.os.Build.VERSION_CODES#Q
or higher, this method just logs the message on logcat
; for apps targetting older SDKs, it also displays the message to user using a android.widget.Toast
.
Java documentation for android.service.autofill.SaveCallback.onFailure(java.lang.CharSequence)
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.