TextClassifierEvent.TextLinkifyEvent Class

Definition

This class represents events that are related to the smart linkify feature.

[Android.Runtime.Register("android/view/textclassifier/TextClassifierEvent$TextLinkifyEvent", ApiSince=29, DoNotGenerateAcw=true)]
public sealed class TextClassifierEvent.TextLinkifyEvent : Android.Views.TextClassifiers.TextClassifierEvent, IDisposable, Java.Interop.IJavaPeerable
[<Android.Runtime.Register("android/view/textclassifier/TextClassifierEvent$TextLinkifyEvent", ApiSince=29, DoNotGenerateAcw=true)>]
type TextClassifierEvent.TextLinkifyEvent = class
    inherit TextClassifierEvent
    interface IParcelable
    interface IJavaObject
    interface IDisposable
    interface IJavaPeerable
Inheritance
TextClassifierEvent.TextLinkifyEvent
Attributes
Implements

Remarks

This class represents events that are related to the smart linkify feature.

// User clicked on a link.
                new TextLinkifyEvent.Builder(TYPE_LINK_CLICKED)
                    .setEventContext(classificationContext)
                    .setResultId(textClassification.getId())
                    .setEntityTypes(textClassification.getEntity(0))
                    .setScore(textClassification.getConfidenceScore(entityType))
                    .setEventIndex(0)
                    .build();

                // Smart (contextual) actions presented to the user in response to a link click.
                new TextLinkifyEvent.Builder(TYPE_ACTIONS_SHOWN)
                    .setEventContext(classificationContext)
                    .setResultId(textClassification.getId())
                    .setEntityTypes(textClassification.getEntity(0))
                    .setScore(textClassification.getConfidenceScore(entityType))
                    .setActionIndices(range(textClassification.getActions().size()))
                    .setEventIndex(1)
                    .build();

                // User chooses smart action at index 0.
                new TextLinkifyEvent.Builder(TYPE_SMART_ACTION)
                    .setEventContext(classificationContext)
                    .setResultId(textClassification.getId())
                    .setEntityTypes(textClassification.getEntity(0))
                    .setScore(textClassification.getConfidenceScore(entityType))
                    .setActionIndices(0)
                    .setEventIndex(2)
                    .build();

Java documentation for android.view.textclassifier.TextClassifierEvent.TextLinkifyEvent.

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.

Fields

CategoryConversationActions
Obsolete.

Conversation actions

(Inherited from TextClassifierEvent)
CategoryLanguageDetection
Obsolete.

Language detection

(Inherited from TextClassifierEvent)
CategoryLinkify
Obsolete.

Linkify

(Inherited from TextClassifierEvent)
CategorySelection
Obsolete.

Smart selection

(Inherited from TextClassifierEvent)
TypeActionsGenerated
Obsolete.

TextClassifier generated some actions

(Inherited from TextClassifierEvent)
TypeActionsShown
Obsolete.

Smart actions shown to the user.

(Inherited from TextClassifierEvent)
TypeAutoSelection
Obsolete.

Something else other than user or the default TextClassifier triggered a selection.

(Inherited from TextClassifierEvent)
TypeCopyAction
Obsolete.

User clicked on Copy action.

(Inherited from TextClassifierEvent)
TypeCutAction
Obsolete.

User clicked on Cut action.

(Inherited from TextClassifierEvent)
TypeLinkClicked
Obsolete.

User clicked a link.

(Inherited from TextClassifierEvent)
TypeLinksGenerated
Obsolete.

Some text links were generated.

(Inherited from TextClassifierEvent)
TypeManualReply
Obsolete.

User composed a reply.

(Inherited from TextClassifierEvent)
TypeOtherAction
Obsolete.

User clicked on a custom action.

(Inherited from TextClassifierEvent)
TypeOvertype
Obsolete.

User typed over the selection.

(Inherited from TextClassifierEvent)
TypePasteAction
Obsolete.

User clicked on Paste action.

(Inherited from TextClassifierEvent)
TypeSelectAll
Obsolete.

User clicked on Select All action

(Inherited from TextClassifierEvent)
TypeSelectionDestroyed
Obsolete.

Selection is destroyed.

(Inherited from TextClassifierEvent)
TypeSelectionDrag
Obsolete.

User dragged+dropped the selection.

(Inherited from TextClassifierEvent)
TypeSelectionModified
Obsolete.

User modified an existing selection.

(Inherited from TextClassifierEvent)
TypeSelectionReset
Obsolete.

User reset the smart selection.

(Inherited from TextClassifierEvent)
TypeSelectionStarted
Obsolete.

User started a new selection.

(Inherited from TextClassifierEvent)
TypeShareAction
Obsolete.

User clicked on Share action.

(Inherited from TextClassifierEvent)
TypeSmartAction
Obsolete.

User clicked on a Smart action.

(Inherited from TextClassifierEvent)
TypeSmartSelectionMulti
Obsolete.

Smart selection triggered spanning multiple tokens (words).

(Inherited from TextClassifierEvent)
TypeSmartSelectionSingle
Obsolete.

Smart selection triggered for a single token (word).

(Inherited from TextClassifierEvent)

Properties

Class

Returns the runtime class of this Object.

(Inherited from Object)
Creator
EventCategory

Returns the event category.

(Inherited from TextClassifierEvent)
EventContext

Returns the event context.

(Inherited from TextClassifierEvent)
EventIndex

Returns the index of this event in the series of event it belongs to.

(Inherited from TextClassifierEvent)
EventType

Returns the event type.

(Inherited from TextClassifierEvent)
Extras

Returns a bundle containing non-structured extra information about this event.

(Inherited from TextClassifierEvent)
Handle

The handle to the underlying Android instance.

(Inherited from Object)
JniIdentityHashCode (Inherited from Object)
JniPeerMembers
Locale

Returns the detected locale.

(Inherited from TextClassifierEvent)
ModelName

Returns the model name.

(Inherited from TextClassifierEvent)
PeerReference (Inherited from Object)
ResultId

Returns the id of the text classifier result related to this event.

(Inherited from TextClassifierEvent)
ThresholdClass (Inherited from TextClassifierEvent)
ThresholdType (Inherited from TextClassifierEvent)

Methods

Clone()

Creates and returns a copy of this object.

(Inherited from Object)
DescribeContents() (Inherited from TextClassifierEvent)
Dispose() (Inherited from Object)
Dispose(Boolean) (Inherited from Object)
Equals(Object)

Indicates whether some other object is "equal to" this one.

(Inherited from Object)
GetActionIndices()

Returns the indices of the actions relating to this event.

(Inherited from TextClassifierEvent)
GetEntityTypes()

Returns an array of entity types.

(Inherited from TextClassifierEvent)
GetHashCode()

Returns a hash code value for the object.

(Inherited from Object)
GetScores()

Returns the scores of the suggestions.

(Inherited from TextClassifierEvent)
JavaFinalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

(Inherited from Object)
Notify()

Wakes up a single thread that is waiting on this object's monitor.

(Inherited from Object)
NotifyAll()

Wakes up all threads that are waiting on this object's monitor.

(Inherited from Object)
SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

(Inherited from Object)
ToArray<T>() (Inherited from Object)
ToString()

Returns a string representation of the object.

(Inherited from Object)
UnregisterFromRuntime() (Inherited from Object)
Wait()

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>.

(Inherited from Object)
Wait(Int64)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)
Wait(Int64, Int32)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)
WriteToParcel(Parcel, ParcelableWriteFlags) (Inherited from TextClassifierEvent)

Explicit Interface Implementations

IJavaPeerable.Disposed() (Inherited from Object)
IJavaPeerable.DisposeUnlessReferenced() (Inherited from Object)
IJavaPeerable.Finalized() (Inherited from Object)
IJavaPeerable.JniManagedPeerState (Inherited from Object)
IJavaPeerable.SetJniIdentityHashCode(Int32) (Inherited from Object)
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) (Inherited from Object)
IJavaPeerable.SetPeerReference(JniObjectReference) (Inherited from Object)

Extension Methods

JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable)

Applies to