Have to investigate this but I think the issue is that the response is unexpected (probably logged out or timeout). No messages or users are found and the Activity remains unfilled.
Fix: If the response is "logged out", login again or redirect to Login Activity.
If we can find out exactly which step this happens at, we can just open LoginActivity instead of MessagesActivity directly.
If last post less than 1 min old, refresh every 3 seconds.
Last post is 1 min old, refresh every 5 seconds.
Last post is 2 min old, refresh every 10 seconds
Last post 2.5 min old, refresh every 20 seconds
Last post 3 min old, refresh every 40 seconds
Seems like doubling the refresh interval every 30 seconds since the last post might be a good way.
TextView will not be able to display images, obviously.
Proposed solution:
Separate all [img] tags from posts.
Store the links in another column.
Attach some sort of expandable/clickable interface to view each image in the post.
Use Picasso to load the images.
If last post is 30 sec old, refresh every 5 seconds.
Last post 1 min old, refresh every 10 seconds.
Last post 1.5 min old, refresh every 20 seconds
Last post 2 min old, refresh every 40 seconds
Last post 3 min old, refresh every 160 seconds
Seems like doubling the refresh interval every 30 seconds since the last post might be a good way.
This may be totally random, but I recently came across it and thought it went through a lot of very important considerations when dealing with mobile apps that deal with data transfer.
I'm sure you're an uber android brain and you likely know a lot of this stuff, or maybe it isn't completely applicible, but I thought it was worth showing nonetheless!