Search code examples
androidperformance

Should BitmapFactory.decodeByteArray be on a background thread?


Is it wise to call BitmapFactory.decodeByteArray() on the UI thread or should you always do it in a background task?


Solution

  • http://developer.android.com/training/displaying-bitmaps/index.html

    http://developer.android.com/training/displaying-bitmaps/process-bitmap.html

    http://android-developers.blogspot.in/2009/05/painless-threading.html

    The one of the advantage using background thread (Asynch Task etc) for bitmap operation,we can get rid from ANR(A pplication N ot R esponding. ) when downloading bitmap from URL perhaps go anything wrong.preffering you to follow painless threading http://android-developers.blogspot.in/2009/05/painless-threading.html for app construction while working with long running task.