Created
November 5, 2018 01:20
-
-
Save ricardoogliari/98328c925f36ff3102d0abdb652fa2ac to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mMessageListener = object : MessageListener() { | |
override fun onFound(message: Message?) { | |
val messageStr = String(message!!.content) | |
partsMessage = messageStr.split(" ".toRegex()).dropLastWhile { it.isEmpty() }.toTypedArray() | |
txtFacebook.text = "Facebook: ${partsMessage!![0]}" | |
txtTwitter.text = "Twitter: ${partsMessage!![1]}" | |
txtLinkedin.text = "Linkedin: ${partsMessage!![1]}" | |
Picasso.get().load(partsMessage!![3]).into(imgPhoto) | |
ctnReceivedCard.visibility = View.VISIBLE | |
ctnMyCard.visibility = View.GONE | |
"Found message: ".toast(this@MainActivityK); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment