Android resource hungry operations
- I am using JSON to receive data from the web service, creating text to JSON object is resource hungry operation.
- I have to load images from the web, I am lazy loading images in the async process how can I compress and make the cache ??
- After the crash, how can I stop re-launching activity?
- How can I know how much memory remaining an开发者_开发百科d Android OS will kill my object?
You can cache your images using a pool of SoftReferences (http://developer.android.com/intl/de/reference/java/lang/ref/SoftReference.html). This will allow the OS to clean them up if it's running out of memory while still allowing you to access them. This should help with #2 and #4, but I am not sure what you mean by #3.
精彩评论