How to do it...

  1. Apply filtering to the getMessages() function:
getMessages().filter { it.folder == Folder.INBOX && it.sender == "Agat" }
  1. Iterate through the filtered messages and print their messages to the console:
getMessages().filter { it.folder == Folder.INBOX && it.sender == "Agat" }
.forEach { (text) ->
println(text)

}
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
13.59.243.70