Reputation: 3047
I have been working on a chat application and I need some suggestions to go about it. I have a server. Whenever a user logs into my app, and selects some user by searching, and sends a message to him, it will be stored on the server. Then my app checks if any a new message has arrived for me. If any message comes, it will be notified to the user. For achieving this, I have followed this method to update the UI whenever a new message comes.
And when the chat continues for more than 3 minutes, the app starts becoming slow. How to go about the problem?
Upvotes: 3
Views: 1819
Reputation: 33792
If the app is sluggish that means there is a memory leak somewhere, or you are over logging, or doing something that you shouldn't be doing on the UI thread. Maybe you're polling the server too much?
By the way using TextView for chat is primitive, use the transcript mode for ListViews.
Upvotes: 2