Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- val smartReply = FirebaseNaturalLanguage.getInstance().smartReply
- smartReply.suggestReplies(conversation)
- .addOnSuccessListener { result ->
- if (result.status == STATUS_SUCCESS) {
- val ri = RemoteInput.Builder(...)
- .setChoices(result.suggestions)
- .build()
- notificationActionBuilder.addRemoteOnput(ri)
- ...
- }
- }}
- // 1. pass conversation text to Smart Reply to suggest
- // and it will return suggestions to the callback
- // 2. take the suggestions and set them on your notifications remote input
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement