Creates an instance of
FirebaseTextMessage for a local user. The local user is the current user of
the app's instance and is the user for which SmartReply is generating a reply.
Parameters
messageText
the message content. We don't limit the length here, but the API works best for
casual conversations with reasonable long messages.
timestampMillis
timestamp of the message in milliseconds since midnight, January 1, 1970 UTC.
You can use, for example, java.lang.System.currentTimeMillis() to
get the value.
Creates an instance of
FirebaseTextMessage for a remote user. Your local user may have a
conversation with one or more remote users and providing context for messages your
local user has received will help the API generate smart replies.
Parameters
messageText
the message content.
The API does not limit length, but it does function optimally with reasonably
long message in casual conversations.
timestampMillis
timestamp of the message in milliseconds since midnight, January 1, 1970 UTC.
You can use, for example, java.lang.System.currentTimeMillis() to
get the value.
remoteUserId
A unique user ID representing a remote user if the local user is having a
conversation with more than one remote user.
FirebaseSmartReply is a stateless API, so there is no need to guarantee
consistent user IDs across different API calls.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2020-08-14 UTC."],[],[],null,["# FirebaseTextMessage\n\npublic final class **FirebaseTextMessage** extends [Object](//developer.android.com/reference/java/lang/Object.html) \n**This class is deprecated.** \n\nThe standalone ML Kit SDK replaces this API. For more information, refer to the [migration guide](//developers.google.com/ml-kit/migration).\n\nRepresents a text message from a certain user in a conversation, providing context for\nSmartReply to generate reply suggestions. \n\n### Public Method Summary\n\n|-----------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| static [FirebaseTextMessage](/docs/reference/android/com/google/firebase/ml/naturallanguage/smartreply/FirebaseTextMessage) | [createForLocalUser](/docs/reference/android/com/google/firebase/ml/naturallanguage/smartreply/FirebaseTextMessage#createForLocalUser(java.lang.String, long))([String](//developer.android.com/reference/java/lang/String.html) messageText, long timestampMillis) Creates an instance of [FirebaseTextMessage](/docs/reference/android/com/google/firebase/ml/naturallanguage/smartreply/FirebaseTextMessage) for a local user. |\n| static [FirebaseTextMessage](/docs/reference/android/com/google/firebase/ml/naturallanguage/smartreply/FirebaseTextMessage) | [createForRemoteUser](/docs/reference/android/com/google/firebase/ml/naturallanguage/smartreply/FirebaseTextMessage#createForRemoteUser(java.lang.String, long, java.lang.String))([String](//developer.android.com/reference/java/lang/String.html) messageText, long timestampMillis, [String](//developer.android.com/reference/java/lang/String.html) remoteUserId) Creates an instance of [FirebaseTextMessage](/docs/reference/android/com/google/firebase/ml/naturallanguage/smartreply/FirebaseTextMessage) for a remote user. |\n\n### Inherited Method Summary\n\nFrom class java.lang.Object \n\n|----------------------------------------------------------------------------|--------------------------------------------------------------------------------|\n| [Object](//developer.android.com/reference/java/lang/Object.html) | clone() |\n| boolean | equals([Object](//developer.android.com/reference/java/lang/Object.html) arg0) |\n| void | finalize() |\n| final [Class](//developer.android.com/reference/java/lang/Class.html)\\\u003c?\\\u003e | getClass() |\n| int | hashCode() |\n| final void | notify() |\n| final void | notifyAll() |\n| [String](//developer.android.com/reference/java/lang/String.html) | toString() |\n| final void | wait(long arg0, int arg1) |\n| final void | wait(long arg0) |\n| final void | wait() |\n\nPublic Methods\n--------------\n\n#### public static [FirebaseTextMessage](/docs/reference/android/com/google/firebase/ml/naturallanguage/smartreply/FirebaseTextMessage) **createForLocalUser** ([String](//developer.android.com/reference/java/lang/String.html) messageText, long timestampMillis)\n\nCreates an instance of [FirebaseTextMessage](/docs/reference/android/com/google/firebase/ml/naturallanguage/smartreply/FirebaseTextMessage) for a local user. The local user is the current user of\nthe app's instance and is the user for which SmartReply is generating a reply. \n\n##### Parameters\n\n| messageText | the message content. We don't limit the length here, but the API works best for casual conversations with reasonable long messages. |\n| timestampMillis | timestamp of the message in milliseconds since midnight, January 1, 1970 UTC. You can use, for example, `java.lang.System.currentTimeMillis()` to get the value. |\n|-----------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n\n#### public static [FirebaseTextMessage](/docs/reference/android/com/google/firebase/ml/naturallanguage/smartreply/FirebaseTextMessage) **createForRemoteUser** ([String](//developer.android.com/reference/java/lang/String.html) messageText, long timestampMillis, [String](//developer.android.com/reference/java/lang/String.html) remoteUserId)\n\nCreates an instance of [FirebaseTextMessage](/docs/reference/android/com/google/firebase/ml/naturallanguage/smartreply/FirebaseTextMessage) for a remote user. Your local user may have a\nconversation with one or more remote users and providing context for messages your\nlocal user has received will help the API generate smart replies. \n\n##### Parameters\n\n| messageText | the message content. The API does not limit length, but it does function optimally with reasonably long message in casual conversations. |\n| timestampMillis | timestamp of the message in milliseconds since midnight, January 1, 1970 UTC. You can use, for example, `java.lang.System.currentTimeMillis()` to get the value. |\n| remoteUserId | A unique user ID representing a remote user if the local user is having a conversation with more than one remote user. [FirebaseSmartReply](/docs/reference/android/com/google/firebase/ml/naturallanguage/smartreply/FirebaseSmartReply) is a stateless API, so there is no need to guarantee consistent user IDs across different API calls. |\n|-----------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|"]]