d-man
d-man

Reputation: 58073

Android resource hungry operations

  1. I am using JSON to receive data from the web service, creating text to JSON object is resource hungry operation.
  2. 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 ??
  3. After the crash, how can I stop re-launching activity?
  4. How can I know how much memory remaining and Android OS will kill my object?

Upvotes: 1

Views: 618

Answers (1)

CaseyB
CaseyB

Reputation: 25058

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.

Upvotes: 1

Related Questions