• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Urgent Help as my Android Chat Application on OUTOFMEMORYERROR

hademylola

Lurker
Hello Team.,

Please i need someone to advise me on the best way to organise a chat concept.

I have a running instant chat application using Android studio. The concept i use for getting instant feeds/messages for the users is this.
1. upon launching the application, a function is called (getData()) which fetches all messages at the receiver side of my chatconversation table in database. and display accordingly on LISTVIEW

2. i have a variable called countmessage, this variable stores the totalnumber of messages fetched and a timer () updatefetch is trigger to constantly check the database for all messages at the background but will not have to refresh my listview not until the timer fetch total number of messages greater than the countmessage.

If this happens, the countmessage variable will be updated with this count and listview adapter is refreshed to display the new messages after which timer continues its fetch all over again searching for new messages.

This methods works really fine, but crashes my application after some minutes, with OutMemoryError on my log.

Please i need help at this junction.

regards
 
Sorry, I don't have a solution for your Out of Memory issue but I am interested as to why you developed a chat client from scratch instead of basing it on open source alternative?
 
Sorry, I don't have a solution for your Out of Memory issue but I am interested as to why you developed a chat client from scratch instead of basing it on open source alternative?
open source alternative? kindly enlighten me on that...a new to android application development
 
I am referring to frameworks like Chat SDK.

The base code is free and open source but they sell premium modules.
 
Back
Top Bottom