SHARE
TWEET

Untitled

a guest Jun 12th, 2019 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top