First steps for the implementation of applications for Android devices.
This article is a practical entry point for understanding what is needed before creating an Android app: the role of Android Studio, the SDK, the emulator, the project structure and the difference between Android as an open platform and the Google services that many commercial devices include.
Related reading: iOS course structure, mobile app architecture and wireframes and frontend frameworks for mobile apps.
1. Presentation
This project is an introduction to the development of Android applications.2. Competencies
In this project the following competencies will be worked on:- Ability to understand how the Android operating system works.
- Ability to create an application for Android devices.
3. Objectives
The objectives of this article are that the student learns to:- Configure a development environment integrating all the necessary tools to develop Android applications.
- Create an Android project and know the elements that compose it.
- Create an Android Virtual Device in order to use it as an emulator and/or configure the drivers of a mobile device in order to be able to use it for tests.
- Run an Android application on the emulator and/or real physical device.
4. Exercises
Assessment of 20%. Read the following article about Android where different myths related to this operating system are described. Answer the following questions:- What kind of myths does the article dismantle? All those myths that criticize or try to dismantle Android's own definition as Free Software. As we can observe in Robert Ramirez Vique's document we can define Android as:
- Google applications are installed by default on those devices with a valid license. This practice (very common in other operating systems such as Red Hat or Microsoft) is criticized by certain articles. It is not really to help Google expand by suppressing possible competition but rather the customer who wants to obtain a device with an Official license expects to obtain those applications.
- Google services define Android. This myth is totally false, for example in China where Google is in continuous confrontation with the Chinese government only 80 percent of the operating systems include these services.
- Android is not open source. As we have said before, it is code under the free Apache license. Although it is true that the largest companies are the ones that receive the trial versions of the distribution first.
- Android is not Linux. It is not true, it is based on a Linux Kernel.
- Google charges a license fee for Google Mobile services. False, there is a fee to create "official" or, better said, certified devices.
- Why is there discussion about whether Android is open source or not? Definitely yes. Not only in the studied article but also in different sources we can read definitions such as the following:
- Its core is based on the Linux kernel, in which some modifications have been carried out to adapt it to the needs of Android (devices where it is necessary to optimize their hardware to the maximum). This serves as a hardware abstraction layer to which applications have to access. In this way, if a hardware element is needed, the application will simply request the resource generically, without having to know the exact hardware model. For example, if we want to access the camera, the type, the definition or the manufacturer will not matter, we will simply access the camera by means of the corresponding driver. This fact really gives us freedom to make modifications in its Kernel and complete independence from the hardware that we are using
- Android's license is the Apache free code license. Any person who wishes can obtain the code, modify it and distribute it free of charge and without any restriction. A different thing will be if we want Google to certify our distribution as valid according to its criteria, since for that it will have to fulfill a series of requirements.
- Do you agree with the conclusions of the article? What is your opinion? To a great extent yes, I agree. In my opinion, all the information shown in the text is truthful and the myths really are false or mistaken as they correctly indicate. Now then, there is one myth (Google charges a license fee for Google Mobile services) that is not true but it does play a little with ambiguity. That is to say, I consider that Google has to control a little how this operating system evolves and how the new distributions evolve for each hardware platform. Its way of acting, I imagine, will be by asking for the distribution to certify and it will analyze that it fulfills some minimum security requirements. This fact may grant an extra cost to the device but it also avoids possible incidents. If, for example, a user looks for a more economical device, he or she can access the market of uncertified devices, which does not give us so much security but it does give us a lower cost. That said, it is absolutely clear that Android is free software, multi-device and modifiable.
A complete software solution for mobile devices. It includes a whole stack of applications, such as the operating system, the middleware and the key applications. It also includes tools to develop on the platform, mainly with the Java programming language. All of it under Apache free code license.
That is, Android is free software, implemented to be used in all kinds of devices independently of their hardware unlike other operating systems such as Apple's iOS. Among the myths dismantled by the article we find:Totally free platform based on Linux that allows developing applications and/or modifying those already existing with Java language.
That said, other points on which we base ourselves are the following:- Android Studio IDE
- Android SDK Tools
- Android platform tools
- The latest version of the Android platform
- The latest system image for the emulator
- On what operating system have you installed Android Studio? Explain whether you have had any incident during the process.
- New Android versions periodically appear and with them new versions of the official Android SDK. If there were a new version change, indicate how to access the window that allows updating the most recent version of the SDK. In figure [3] there is a green circle where we can see the button that gives us access to the versions of the official SDK.
- Once the SDK Manager is open, install the Google USB driver package and Google Play Services. Attach a screenshot. To install Google USB driver we have accessed the SDK Manager as in the previous section and we have activated the installation check in blue color. In figure [5] we have indicated Apply to update the sdk.
- Android Studio is also updated from time to time. Indicate what steps must be followed to obtain the latest update and where we could see what new features it includes. In a red circle I have marked the way to access updates from two different ways as shown in figures [7 a] and [7 b]







Update Android Studio

- By means of Android Studio, create an Android virtual device. This virtual device must have the following characteristics:
- Nexus 5 with a 4.95" screen
- Latest available API
- The rear camera must be that of the webcam
- Internal storage of 400MB.
- SD card of 500MB.
- Nexus 5 with a 4.95" screen
- Latest available API
- The rear camera must be the webcam
- Internal storage of 400MB and SD card of 500MB.
- (OPTIONAL) If you have a mobile device with Android operating system, configure the drivers so that Android Studio recognizes the device when it is connected to the computer. Indicate which device you have connected and explain the steps that you have followed. In this case the device to emulate has been a Motorola G. The truth is that since it is a 5-inch device the result obtained on the Nexus 5 device has not varied much. The result can be observed in figure [13]






- Create an Android project by means of Android Studio (choose the “Blank Activity” project type). Explain all the parameters selected for the creation of the project and justify the reason for your choice. To carry out this task I have made a series of screenshots of the Android Studio application and in addition I will explain the reasons that have led me to the selection of these configurations. The second of the indicated data will only be used as the package of our Java classes.
- First of all we are going to make a choice of the name of the new project. The name will be PrimeraAplicacion and the domain 1938.com.es.
- The second point of the process is the choice of the Android version that we are going to apply. We use the wizard for the choice and the information that Android Studio shows us about each version. We are going to focus on applications for phones and tablets, in which case we will only have to select the minimum API, that is, the minimum Android version that the application will support. In this application we will focus on Android 4.0.3 as the minimum version since according to the information that Android Studio provides us, an application with this version can be executed on 94% of devices.
- Once the version has been chosen, the next point is to select the initial activity template. In our case we choose the type Blank Activity because it is the simplest option to start a first project and it allows us to understand the minimum structure generated by the IDE without adding extra complexity from other templates.
- With that choice, Android Studio automatically creates the basic files of the project, among them the main activity, the layout xml file, the manifest, the Gradle configuration and the package structure. The objective of this first exercise is not only to generate the project, but to understand that each one of those elements forms part of the skeleton of any Android application.