Back to project page face_rec_android.
The source code is released under:
GNU General Public License
If you think the Android project face_rec_android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package in.amolgupta.helpingfaceless.common; // w w w . j av a 2 s . co m import in.amolgupta.helpingfaceless.R; import in.amolgupta.helpingfaceless.utils.ET; import java.io.File; import android.app.Application; import android.graphics.Bitmap.CompressFormat; import com.nostra13.universalimageloader.cache.disc.impl.UnlimitedDiscCache; import com.nostra13.universalimageloader.cache.disc.naming.HashCodeFileNameGenerator; import com.nostra13.universalimageloader.cache.memory.impl.LruMemoryCache; import com.nostra13.universalimageloader.core.DisplayImageOptions; import com.nostra13.universalimageloader.core.ImageLoader; import com.nostra13.universalimageloader.core.ImageLoaderConfiguration; import com.nostra13.universalimageloader.core.assist.QueueProcessingType; import com.nostra13.universalimageloader.utils.StorageUtils; import com.pushbots.push.Pushbots; /** * @author amol * */ public class App extends Application { private DisplayImageOptions options; private ImageLoaderConfiguration config; @Override public void onCreate() { super.onCreate(); File cacheDir = StorageUtils.getCacheDirectory(this); config = new ImageLoaderConfiguration.Builder(this) .memoryCacheExtraOptions(480, 800) // default = device screen dimensions .discCacheExtraOptions(480, 800, CompressFormat.JPEG, 75, null) .threadPoolSize(3) // default .threadPriority(Thread.NORM_PRIORITY - 1) // default .tasksProcessingOrder(QueueProcessingType.FIFO) // default .denyCacheImageMultipleSizesInMemory() .memoryCache(new LruMemoryCache(2 * 1024 * 1024)) .memoryCacheSize(2 * 1024 * 1024).memoryCacheSizePercentage(13) // default .discCache(new UnlimitedDiscCache(cacheDir)) // default .discCacheSize(50 * 1024 * 1024).discCacheFileCount(100) .discCacheFileNameGenerator(new HashCodeFileNameGenerator()) // default .defaultDisplayImageOptions(DisplayImageOptions.createSimple()) // default .writeDebugLogs().build(); ImageLoader.getInstance().init(config); Pushbots.init(this, getResources().getString(R.string.push_bots_key), getResources().getString(R.string.push_bots_key)); ET.trackAppopened(); } }