How to become an Android developer: from scratch to publish an app on Google Play

15 steps, and you are an Android developer! What language to choose, how to learn how to write applications and what to pay attention to when developing programs for mobile devices.

 

Android developer is the profession of the future. The main trends in the development of mobile technologies in the coming years will be related to the following directions:

 

    Augmented and virtual reality. AR and VR are already used in mobile games and when visiting interactive museums. Shared use with geolocation services gives special chic. Mobile devices are the most affordable option to use these technologies.

    Machine learning algorithms (ML). We don’t even notice how many different ML solutions we already use in our smartphones: text recognition, face detection, barcode reading, sightseeing, converting audio into speech, chatbots, etc. All these technologies make our lives easier. As device performance grows and cloud computing becomes more available, more and more resource intensive algorithms will “come in”.

    Cloud computing. The share of mobile traffic is growing and more and more users are accessing various applications and resources through their mobile devices. The information boom requires productive capacity, and cloud computing is an effective way to meet those needs.

    Electronic payments. Buying with a smartphone is becoming easier, both via NFC and online. And new technologies, such as blockchain, provide better security for payments.

    Cyber-security. A significant part of our lives passes with a smartphone in hand, a lot of important things are stored here. Mobile devices are an attractive target for hacker attacks. Most of the vulnerabilities are the result of a lack of understanding of security. Improvements in protection will stimulate the market.

 

But what skills are needed to become a successful Android developer? Where to start?

 

  1. Choose a programming language

The two main programming languages for developing Android applications are Java and Kotlin. In fact, if you are serious about development, you will not do without both languages. However, at the Google I/O 2019 conference it was announced that Kotlin is the preferred and official language for Android. Using Kotlin reduces the number of errors in the code and the language can be easily integrated into existing applications. To master this language, you can use our Kotlin Learning Resource Kit.

  1. Choose an interactive environment for Android development

Choosing a development environment is about taste. However, at the first stage, it is more appropriate to use Android Studio. The latest IDE version 4.0 from May 2020 is available for download on the official Android website. We wrote about the latest release in our publication.

 

  1. Study the manifesto and components of the Android applications

When you create a draft of your first project in the design environment, the environment will automatically create an AndroidManifest.xml manifest file in the Android project folder.

 

The manifest file contains a unique application identifier and describes the application components. Browse through this list of components, you will understand what you need to learn:

 

    Activity – application screen with a user interface. Special attention should be paid to studying the Activity Lifecycle.

    Services – components that run in the background. For example, services may process network transactions, play music, perform file I/O, or interact with a content provider.

    Content providers. Often there are situations where you need to access information from another application. Content providers manage data: audio, video, images, and personal contact information (contacts, call list). This is the only way for Android applications to share data.

    Broadcast receiver – a component that reacts to messages from the Android system and other applications: messages about low battery, inaccessibility of the mobile network, appearance in the Wi-Fi coverage area.

    Intents – objects that connect separate components (Activity, Service and Broadcast receiver) during the application operation.

4. Study the main elements of the Android application user interface

The main elements of the application user interface are:

 

    UI Layouts – application screen layouts;

    UI Components – I/O fields, buttons, toolbars, media display and work elements, data display elements, e.g. RecyclerView;

    App Resources – application resources: rows, fonts, styles, bitmap and vector graphics, icons and animation;

    Fragment – Activity user interface module. The special attention at development of user Fragment should be given to study of its life cycle (Fragment Lifecycle);

    Other elements of the user interface (search interface, dialog boxes, ProgressBar, Toast/SnackBar).

 

Application screen layouts (UI Layouts) have different structure:

 

    Linear Layout – a layout where child elements are represented in horizontal or vertical columns;

    Relative Layout – a layout in which you can specify the location of children relative to each other or relative to the parent object;

    Constraint Layout – the most universal and popular layout that allows creating complex compositions.

 

  1. Explore Android data warehouses

Learn how to store application and user data on your device: in key-value pairs, database, or other types of data.

 

It is also important to learn how to share data between applications and devices. It’s useful to learn how to work with backup services so that users can store information in the cloud, synchronize it between devices, and restore it when they buy a new device.

The system provides several storage options:

 

    App-specific storage stores files that are designed only for your application. Either in dedicated directories on the internal drive or in external storage directories. If the information is confidential, it is better to store it in internal storage.

    A shared storage stores files that your application intends to share with other applications: media, documents, and other files.

    Settings (preferences) are used to store primitive data in key-value pairs.

    Databases are used to store structured data in a private database using the Room library.

 

  1. Learn how building Android applications and the Gradle plugin works

The Android build system collects application resources and source code, packages them into APK files. They can be tested and distributed. Android Studio uses Gradle, an advanced build automation and management tool. This allows you to define different configuration settings for different projects.

 

  1. Learn how to create multi-threaded Android applications

Every Android developer faces the need to use threads. When an application is launched, it creates the main execution thread. To keep an application responsive, it is necessary to avoid using the main thread to perform operations that lead to its blocking: network operations, accessing the database, loading components. Such processes are executed in separate threads. Android provides many ways to create and manage threads. If you use the Kotlin language for these tasks, you can use Coroutines.

 

  1. Learn how to debug the Android application

Application debugging is the process of searching and fixing errors and other incorrect code behavior. To understand what is going on and to find an error, we can use debugging to pause the program execution in the right place and look through the contents of objects and variables.

The application is debugged using standard tools provided by the Android Studio development environment.

 

  1. Learn to work with third-party libraries

Not every problem can be solved with the standard Android tools. For many tasks already developed their own solutions, which is a sin not to use. For image processing and uploading they are Glide and Picasso, for Dependency Injection – Dagger, Koin, Kodein and Hilt, for network communications – Retrofit, for multithreaded programming – RxJava. Don’t be too lazy to explore Google’s libraries: Firebase, Google Play Services, Google Maps. Introduction to the device of third-party libraries will also teach you to write better code in your own projects.

 

  1. Explore Android Jetpack, a set of libraries and tools that speed up your Android developer’s work

Android Jetpack is a set of libraries and tools created by the Google team to simplify development for Android. The libraries included in Jetpack are divided into four kinds:

 

    Foundation – basic libraries that help reduce template code.

    Architecture Components – libraries used to build an application architecture.

    Behavior – libraries-wrappers for functionality provided by the Android SDK. They are created to improve the standard Android API: Permissions, Notifications, CameraX and others.

    UI – components for working with fragments, user interface elements and animation.

 

11. Explore architectural design templates

 

As the application grows, you will inevitably face the issues of designing, using the practices and experience of other developers. Instead of reinventing the bike, ride quickly and elegantly on proven models. Start dismantling design templates as early as possible – they describe typical ways to solve common problems when designing Android applications.

12. By default, Google has documented the MVVM architecture, but you need to use the one that best meets our needs

 

Three design templates are common:

 

    MVVM (Model-View-ViewModel) – used to separate the model and its presentation. The developer defines the logic of working with data, and the designer works with the user interface.

    MVP (Model-View-Presenter) – a template that facilitates automatic modular testing.

    MVI (Model-View-Intent) – An architectural template for improving application scalability.

 

Learn how to test Android applications.

 

Application testing is an integral part of the development process. By constantly running tests, you can check the correctness, functionality and usability of an application before it is published.

 

Testing gives you the following benefits:

 

    Quick response in case of application failure.

    Early fault detection.

    Safer code refactoring.

    Stable development speed.

 

  1. Explore Android application security issues

Android is serious about the security of the Android platform and ecosystem. The following tools and mechanisms are used to secure Android applications: Encrypt/Decrypt, Proguard and R8.

 

  1. Learn how to work with sensors

Programming is cool, but even more cool to use the physical components of the phone: GPS, camera, NFC, accelerometer. Work with these sensors in fascination is close to a high-level programming of microcontrollers – it’s nice to see how the abstract algorithm you wrote interacts with the outside world.

  1. Publish the application on Google Play. Congratulations, you are an Android developer!

Finally, all you have to do is publish the application. This process also has its own mechanism and subtleties. But it is much easier than writing the code of the application.

 

With the described knowledge luggage you can safely move forward! The questions discussed in this article will help you create your portfolio and employment.

***

As you can see, development on Android is not easy, but very exciting. For those who want to learn the profession of Android developer from scratch using the latest technology, video lessons and work with teachers, there is an opportunity to take an educational course at the Android development department of GeekBrains. During the course you will create several working applications for your portfolio and get a diploma. In case of successful completion, the university team will help you with your job placement.

 

The program of the GeekBrains educational course covers almost all the issues of this article: the programming languages Java and Kotlin, the main components and elements of the Android application user interface, the life cycle of Activity and Fragment components, working with databases, architectural design templates, working with third-party libraries and testing applications. Related issues are also considered: working with Git version control system, preparing for Android developer interview, job search and employment.