I have written an app which can talk to server via background service to send the request and get the response back. If I perform some operation (e.g send request and get response back) around 20-30 times, my application becomes very slow and I can observe it by pressing any button – the response becomes very slow .
If you continuously perform the same operation, after some time a pop up message displays saying “Sorry Activity of the application is not responding”.
How can I resolve this issue? It seems like my app consumes more memory, so how can I resolve it OR is there any tool available which can be pluggable with Eclipse and will display the reports of memory consumption of the App, and suggest the leak area.
1.For Memory issue: Eclipse have powerful tool for memory tracking: Memory Analyzer tool
Please refer references below for use guide of tips: (Ref.1, 2)
2.For ANR issue: To avoid ANR dialog you can put implement of network service to background implement in worker thread or Asyntask
References:
What Android tools and methods work best to find memory/resource leaks?
How do I discover memory usage of my application in Android?