Use non-blocking NIO for listening. It allows to cancel listening task.
Add share icon to actionbar
Trying to use ShareActionProvider, see https://developer.android.com/guide/topics/ui/actionbar.html#ActionProvider
Share received text
Enable sharing only if text was received