# Print output for @column tags ?>
Developers

- Design
- Develop
- Distribute

Developer Console

## Most visited

## Recently visited

## Results for

Summary: Nested Classes | Inherited Constants | Fields | Inherited Fields | Inherited Methods

# TextClassifierEvent.LanguageDetectionEvent

`public static final class TextClassifierEvent.LanguageDetectionEvent`
`` `extends TextClassifierEvent` `implements Parcelable`

java.lang.Object
↳ | android.view.textclassifier.TextClassifierEvent
| ↳ | android.view.textclassifier.TextClassifierEvent.LanguageDetectionEvent

This class represents events that are related to the language detection feature.

##

###

###

###

###

###

##

###

         // Translate action shown for foreign text.
         new LanguageDetectionEvent.Builder(TYPE_ACTIONS_SHOWN)
             .setEventContext(classificationContext)
             .setResultId(textClassification.getId())
             .setEntityTypes(language)
             .setScore(score)
             .setActionIndices(textClassification.getActions().indexOf(translateAction))
             .setEventIndex(0)
             .build();

         // Translate action selected.
         new LanguageDetectionEvent.Builder(TYPE_SMART_ACTION)
             .setEventContext(classificationContext)
             .setResultId(textClassification.getId())
             .setEntityTypes(language)
             .setScore(score)
             .setActionIndices(textClassification.getActions().indexOf(translateAction))
             .setEventIndex(1)
             .build();

    Summary

    Nested classes

            class

            TextClassifierEvent.LanguageDetectionEvent.Builder
            Builder class for LanguageDetectionEvent.

    Inherited constants

          From class
            android.view.textclassifier.TextClassifierEvent

            int

              CATEGORY_CONVERSATION_ACTIONS
              Conversation actions

            int

              CATEGORY_LANGUAGE_DETECTION
              Language detection

            int

              CATEGORY_LINKIFY
              Linkify

            int

              CATEGORY_SELECTION
              Smart selection

            int

              TYPE_ACTIONS_GENERATED
              TextClassifier generated some actions

            int

              TYPE_ACTIONS_SHOWN
              Smart actions shown to the user.

            int

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

            int

              TYPE_COPY_ACTION
              User clicked on Copy action.

            int

              TYPE_CUT_ACTION
              User clicked on Cut action.

            int

              TYPE_LINKS_GENERATED
              Some text links were generated.

            int

              TYPE_LINK_CLICKED
              User clicked a link.

            int

              TYPE_MANUAL_REPLY
              User composed a reply.

            int

              TYPE_OTHER_ACTION
              User clicked on a custom action.

            int

              TYPE_OVERTYPE
              User typed over the selection.

            int

              TYPE_PASTE_ACTION
              User clicked on Paste action.

            int

              TYPE_SELECTION_DESTROYED
              Selection is destroyed.

            int

              TYPE_SELECTION_DRAG
              User dragged+dropped the selection.

            int

              TYPE_SELECTION_MODIFIED
              User modified an existing selection.

            int

              TYPE_SELECTION_RESET
              User reset the smart selection.

            int

              TYPE_SELECTION_STARTED
              User started a new selection.

            int

              TYPE_SELECT_ALL
              User clicked on Select All action

            int

              TYPE_SHARE_ACTION
              User clicked on Share action.

            int

              TYPE_SMART_ACTION
              User clicked on a Smart action.

            int

              TYPE_SMART_SELECTION_MULTI
              Smart selection triggered spanning multiple tokens (words).

            int

              TYPE_SMART_SELECTION_SINGLE
              Smart selection triggered for a single token (word).

          From interface
            android.os.Parcelable

            int

              CONTENTS_FILE_DESCRIPTOR
              Descriptor bit used with describeContents(): indicates that
     the Parcelable object's flattened representation includes a file descriptor.

            int

              PARCELABLE_WRITE_RETURN_VALUE
              Flag for use with writeToParcel(Parcel, int): the object being written
     is a return value, that is the result of a function such as
     "Parcelable someFunction()",
     "void someFunction(out Parcelable)", or
     "void someFunction(inout Parcelable)".

    Fields

        public
        static
        final
        Creator<TextClassifierEvent.LanguageDetectionEvent>

          CREATOR

    Inherited fields

          From class
            android.view.textclassifier.TextClassifierEvent

        public
        static
        final
        Creator<TextClassifierEvent>

          CREATOR

    Inherited methods

        From class

              android.view.textclassifier.TextClassifierEvent

            int

          describeContents()

            Describe the kinds of special objects contained in this Parcelable
     instance's marshaled representation.

            int[]

          getActionIndices()

            Returns the indices of the actions relating to this event.

            String[]

          getEntityTypes()

            Returns an array of entity types.

            int

          getEventCategory()

            Returns the event category.

            TextClassificationContext

          getEventContext()

            Returns the event context.

            int

          getEventIndex()

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

            int

          getEventType()

            Returns the event type.

            Bundle

          getExtras()

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

            ULocale

          getLocale()

            Returns the detected locale.

            String

          getModelName()

            Returns the model name.

            String

          getResultId()

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

            float[]

          getScores()

            Returns the scores of the suggestions.

            String

          toString()

            Returns a string representation of the object.

            void

          writeToParcel(Parcel dest, int flags)

            Flatten this object in to a Parcel.

        From class

              java.lang.Object

            Object

          clone()

            Creates and returns a copy of this object.

            boolean

          equals(Object obj)

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

            void

          finalize()

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

            final

            Class<?>

          getClass()

            Returns the runtime class of this Object.

            int

          hashCode()

            Returns a hash code value for the object.

            final

            void

          notify()

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

            final

            void

          notifyAll()

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

            String

          toString()

            Returns a string representation of the object.

            final

            void

          wait(long timeout, int nanos)

            Causes the current thread to wait until another thread invokes the
     notify() method or the
     notifyAll() method for this object, or
     some other thread interrupts the current thread, or a certain
     amount of real time has elapsed.

            final

            void

          wait(long timeout)

            Causes the current thread to wait until either another thread invokes the
     notify() method or the
     notifyAll() method for this object, or a
     specified amount of time has elapsed.

            final

            void

          wait()

            Causes the current thread to wait until another thread invokes the
     notify() method or the
     notifyAll() method for this object.

        From interface

              android.os.Parcelable

            abstract

            int

          describeContents()

            Describe the kinds of special objects contained in this Parcelable
     instance's marshaled representation.

            abstract

            void

          writeToParcel(Parcel dest, int flags)

            Flatten this object in to a Parcel.

    Fields

        CREATOR

    public static final Creator<TextClassifierEvent.LanguageDetectionEvent> CREATOR

Full name *
Email address *
Company / developer name
One of your Play Store app URLs *
Which best describes your business:*
Apps
Games
Apps & Games
*
*