# Print output for @column tags ?> TextClassifierEvent.TextLinkifyEvent - Android SDK | Android Developers

Most visited


Recently visited


TextClassifierEvent.TextLinkifyEvent

public static final class TextClassifierEvent.TextLinkifyEvent
extends TextClassifierEvent implements Parcelable

java.lang.Object
   ↳ android.view.textclassifier.TextClassifierEvent
     ↳ android.view.textclassifier.TextClassifierEvent.TextLinkifyEvent


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();
 

Summary


Nested classes

class TextClassifierEvent.TextLinkifyEvent.Builder

Builder class for TextLinkifyEvent

Inherited constants

Fields

public static final Creator<TextClassifierEvent.TextLinkifyEvent> CREATOR

Inherited fields

Inherited methods

Fields


CREATOR

public static final Creator<TextClassifierEvent.TextLinkifyEvent> CREATOR

Browse this site in English?

You requested a page in English, but your language preference for this site is English.

Would you like to change your language preference and browse this site in English? If you want to change your language preference later, use the language menu at the bottom of each page.