/Android-ImageManager

[DEPRECATED] An image downloading and caching library for Android

Primary LanguageJavaMIT LicenseMIT

Android-ImageManager

[DEPRECATED] Use Picasso instead.

Android-ImageManager handles all the boilerplate code for simple downloading, caching and using images with Android. It downloads the images and caches them using an in-memory LRU and a second level Disk cache.

Usage:

Initialization

import com.felipecsl.android.imaging.*;

public class MainActivity extends Activity {
	private ImageManager imageManager;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        final MainActivity self = this;

        if (!DiskLruImageCache.isInitialized()) {
            new AsyncTask<Void, Void, Void>() {
                @Override
                protected Void doInBackground(Void... params) {
                    DiskLruImageCache.getInstance(self);
                    return null;
                }

                @Override
                protected void onPostExecute(Void result) {
                    imageManager = new ImageManager(self);
                }
            }.execute();
        }
}

Loading images

imageManager.loadImage("http://www.roflcat.com/images/cats/bike.jpg", imageView, new JobOptions());

Features

  • Seamless two-level caching (Memory and Disk, using DiskLruCache)
  • Concurrent image downloads via android-async-http library
  • Auto-rotation of JPEG images based on the EXIF information
  • Ability to load local files (eg. from the device Gallery app using Uri)

Sample application

Check the sample application for an example of usage

Try out the sample application on Google Play

Gplay

This library was tested with Android API Level 8 and newer.

Applications using Android-ImageManager

If your app uses this library, send a pull request with the update to this Readme file adding your app to the list!

Contributing to Android-ImageManager

  • Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
  • Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
  • Fork the project
  • Start a feature/bugfix branch
  • Commit and push until you are happy with your contribution
  • Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.

Contributors

Copyright

Copyright (c) 2012 Felipe Lima. See LICENSE.txt for further details.