Advertisement
Guest User

Untitled

a guest
Jun 12th, 2019
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. val smartReply = FirebaseNaturalLanguage.getInstance().smartReply
  2. smartReply.suggestReplies(conversation)
  3. .addOnSuccessListener { result ->
  4. if (result.status == STATUS_SUCCESS) {
  5. val ri = RemoteInput.Builder(...)
  6. .setChoices(result.suggestions)
  7. .build()
  8. notificationActionBuilder.addRemoteOnput(ri)
  9. ...
  10. }
  11. }}
  12.  
  13. // 1. pass conversation text to Smart Reply to suggest
  14. // and it will return suggestions to the callback 
  15. // 2. take the suggestions and set them on your notifications remote input
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement