Part 2 of the camera2 API tutorial series which describes how to setup the camera2 API surface preview sizes. It is important that the supported preview sizes from the camera device closely match the desired preview size of the applications preview display. GitHub You can clone the code from github and then Tag “camera2-surface-preview-sizes” or else run this […]
Read moreIn the Android performance with inBitmap tutorial we add the BitmapFactory.Option’s inBitmap flag which can be used for bitmaps that have been evicted from the memory cache but not yet deallocated. This is only supported for android versions Honeycomb or later. Implementation Create a Set of SoftReferenced Bitmaps CamaraIntentActivity private static Set<SoftReference<Bitmap>> mReuseableBitmap; Initialise the […]
Read moreAndroid Camera2 API LooknFeel – Part 1 of a new tutorial series on how to use the android camera 2 api’s. Part 1 focuses on the look & feel of the application, which is based on the recyclerview image gallery Code available on github You can clone the code from https://github.com/mobapptuts/recyclerview_image_gallery.git Tag looknfeel or else you […]
Read moreThis android video tutorial explains how to create memory cache for android. Using this method will have a dramatic effect on performance for android applications. Implementation Create LruCache final int maxMemorySize = (int) Runtime.getRuntime().maxMemory() / 1024; final int cacheSize = maxMemorySize / 10; mMemoryCache = new LruCache<String, Bitmap>(cacheSize) { @Override protected int sizeOf(String key, Bitmap […]
Read moreThis tutorial is about resolving concurrency issues that happen when issuing AsyncTasks when using RecyclerViews in android applications. Get Code You can download the code from github here https://github.com/mobapptuts/recyclerview_image_gallery.git Tag concurrency Or else run this command git clone –branch concurrency https://github.com/mobapptuts/recyclerview_image_gallery.git Create a class derived from BitmapDrawable public static class AsyncDrawable extends BitmapDrawable { final WeakReference<BitmapWorkerTask> taskReference; […]
Read morePart 2 – Addresses the issue with the bitmaps being loaded from the filesystem in the UI thread by creating asynctask in android which in effect creates a background thread to do the file loading. Steps Create the AsyncTask Class public class BitmapWorkerTask extends AsyncTask<File, Void, Bitmap> { WeakReference<ImageView> imageViewReferences; public BitmapWorkerTask(ImageView imageView) { imageViewReferences […]
Read moreThis is part 1 of the android tutorial performance series. We look for a quick and fast solution with testing Picasso image library. It’s mainly a convenience library for downloading images from the internet but also has caching support which we will be looking to use to improve the performance of the recyclerview image gallery […]
Read moreCreate android video app is a short video tutorial describing how to create an android video application. The concepts are based on the how to create an android camera app using intents, so if you are brand new to android programming I recommend you view that series first. For I will be skipping the fundamentals […]
Read moreLoad Bitmaps Properly Part 6 explains the issues involved when loading bitmaps and the correct procedure to use.
Read more
Recent Comments