Whenever the unread count changes in Textra, it broadcasts an intent with the action set to "com.textra.UPDATE_UNREAD". The intent will have an integer extra called "count" with the unread count.
You can receive the broadcasts in the normal way, by either registering a receiver in the manifest of your app, or by programmatically registering a receiver.
The official documentation is here:
and a succinct tutorial is here:
Any queries please contact email@example.com
Note: this broadcast is provided only from Textra v3.22 onwards.