Język

ContentSafetyManager.RequestContentClassification Method

Definition

Requests classification of the specified content.

[Android.Runtime.Register("requestContentClassification", "(Landroid/app/contentsafety/ClassifiableContent;Ljava/util/concurrent/Executor;Landroid/app/contentsafety/ContentClassificationCallback;)V", "", ApiSince=37)]
public void RequestContentClassification(Android.App.ContentSafety.ClassifiableContent content, Java.Util.Concurrent.IExecutor executor, Android.App.ContentSafety.IContentClassificationCallback callback);
[<Android.Runtime.Register("requestContentClassification", "(Landroid/app/contentsafety/ClassifiableContent;Ljava/util/concurrent/Executor;Landroid/app/contentsafety/ContentClassificationCallback;)V", "", ApiSince=37)>]
member this.RequestContentClassification : Android.App.ContentSafety.ClassifiableContent * Java.Util.Concurrent.IExecutor * Android.App.ContentSafety.IContentClassificationCallback -> unit

Parameters

content
ClassifiableContent

the content to be classified

executor
IExecutor

the executor on which to run the callback

callback
IContentClassificationCallback

the callback to receive the classification result

Attributes

Remarks

Requests classification of the specified content.

When content safety is enabled, this method determines if the specified content is appropriate based on the user's settings.

If the content is classified, the result provided to the callback will have a classification type of ContentClassificationResult.TYPE_ALLOWED, ContentClassificationResult.TYPE_WARNING, or ContentClassificationResult.TYPE_BLOCKED. If the content could not be classified or if content safety is disabled, the classification type will be ContentClassificationResult.TYPE_UNCLASSIFIED.

Android reference for android.app.contentsafety.ContentSafetyManager.requestContentClassification.

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