In this performance tutorial we use the BitmapFactory.Options inSampleSize for loading smaller images with subsampling therefore saving memory & cpu resources, resulting in more responsiveness especially in scrolling. Method Create a scale factor algorithm private int calculateInSampleSize(BitmapFactory.Options bmOptions) { final int photoWidth = bmOptions.outWidth; final int photoHeight = bmOptions.outHeight; int scaleFactor = 1; if(photoWidth > TARGET_IMAGE_VIEW_WIDTH […]

Read more

Part 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 more

This 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 more

  Create 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 more

Load Bitmaps Properly Part 6 explains the issues involved when loading bitmaps and the correct procedure to use.  

Read more

Save Photo to Storage Part 5 explains how to create a file whose location will be passed to  the camera application where it will save the photo on capture.  

Read more

Display Thumbnail Part 4 grabs the bitmap returned from the external camera application and puts it on to the image view created in the layout.  

Read more

Take Photo Part 3 involves calling an external camera application to capture the photo and then return back to the application.  

Read more

Add camera button Part 2 explains how to replace the standard hello world text view and replaces it with a clickable button view.  

Read more

This first tutorial in the how to create an android camera app is part 1 – create project, which is setting up the initial project with the default hello world app  

Read more