01 Tutorial On Basic Android Setup
01 Tutorial On Basic Android Setup
Introduction
In this tutorial, we will learn how to set up the Android software development environment and
how to implement image processing operations on an Android mobile device. Android is an
open-source platform developed by Google and the Open Handset Alliance on which interesting
and powerful new applications can be quickly developed and distributed to many mobile devices.
There is a large, growing community of Android developers and a vast selection of Android
devices, which includes smartphones, tablets, and TV setup boxes. Android also comes with an
extension library of useful functions, including functions for user interfaces, image/bitmap
manipulation, and camera control that we will frequently use in EE368/CS232. We look forward
to seeing your novel image processing algorithms and applications running on Android devices
as the quarter progresses.
The tutorial is split into two parts. In the first part, we will explain how to download and install
the Android software tools onto your computer. Then, in the second part, we will explain how to
develop image processing programs that can run on an Android mobile device.
Note: Before December 2014, the official IDE was Eclipse. Android Studio is backwards
compatible with projects created with Eclipse, but you may notice differences in the file structure
of older Android projects.
2. Open the Android Studio application. A window will appear saying that no Android SDK
was found on your system. Click Next and leave the settings as default. Click Next one
more time and Finish. Android Studio will now download and install all the necessary
components, which will take a few minutes.
3. Once this is done, a window like in Figure 1 should be shown. You are now ready to use
Android Studio.
1
Figure 1. Initial start-up screen of Android Studio.
We recommend that you go through this tutorial so that you learn how to write, build and run a
basic Android app.
If you want to know more about Android Studio, the following page is also very informative:
https://developer.android.com/studio/intro/index.html
c. “Add an Activity to Mobile”
Activity Name: ViewfinderEE368
Uncheck “Generate Layout File”.
Leave “Backwards Compatibility” checked.
5. Run the project and select your device in the “Select Deployment Target” dialog. You
should see something like Figure 2 on your device. Point the camera at different objects
around you to see how the mean, standard deviation, and histogram of each color channel
changes dynamically. You are augmenting the viewfinder in real time!
6. The repository contains all the files necessary to build the project, so instead of creating
the project from scratch, it is also possible to open the project from the repository (File >
Open) and you can run it directly.
sequential list of real-time messages from the phone. In particular, error messages in red can be
very useful when trying to debug a problem.
1. Click on the “Android Monitor” button at the bottom of your Android Studio window.
3. Click the camera icon (circled in red in Figure 3), and a panel like Figure 4 should pop
up.
4. Finally, when you have the desired screen shown, click Save to extract the screen shot.
Figure 4. Device screen capture panel.
5