After putting together resources for the Mobile Developer Graduate Program that we run at DVT, I realised that the content I referenced could be a great guide for getting started with Modern Android development.
It is worth noting that we have a very hands-on approach to training the graduates at DVT. We run workshops as well as practical projects to ensure our graduates have a solid understanding of Android development.
With the vast amount of content available online, when I started Android development I didn’t really know where to look or what I should be aware of when developing an app. Having a concise list like the one in this blog post would have been invaluable for me when I started out. I hope you find value in it too.
Here is a list of links, code labs and reference material that would be useful for any developer that wants to get started in the world of Android development.
General Programming Practices
The following general programming practices are key to getting started with your successful career in development. These practices include:
- Source Control (Git) — Source control is a tool to manage versions of your code, it is great for writing software collaboratively.
- Git Workflows — There are many different ways in which software is managed when using source control. Popular methods include: Gitflow workflow, Centralized workflow, Forking workflow etc.
- Continuous Integration — Continuous integration ensures that your code is building on a server that is not your own machine. Look at using a build server like Jenkins, Buddybuild, Circle CI, Travis etc.
- Pull Requests — Pull requests are a great way to get very detailed feedback on the code that you have developed.
- Agile/Scrum methodologies — Most modern software development teams follow Scrum methodologies for working.
- Code Quality Tools – There are many tools that companies use to measure the quality of their code and the health of the codebase. Metrics such as number of lines of test coverage or how much technical debt the code base has, are made visible. Some tools that are frequently used: Sonar, FindBugs, Checkstyle and Android Lint.
Introduction to Android Basics
There are a bunch of websites that provide the basics of getting started with Android development. My recommendation is to follow the official documentation to understand the basics and then look to other resources (such as blogs etc) for additional information as you get into the more technical aspects of your application design (see the sections referenced later in this post).
Some getting started resources:
Mastering Layouts in Android
There are a lot of different layout types in Android, from FrameLayout to RelativeLayout to ConstraintLayout. Make sure you are comfortable with these commonly used layout types: FrameLayout, RelativeLayout, LinearLayout, ConstraintLayout, CoordinatorLayout.
Networking in Android
Although most of the Android documentation doesn’t reference Retrofit or OkHttp, these are the most commonly used libraries when it comes to networking in Android. It is also good to be familiar with the different profiling tools available in Android Studio.
- Understanding RESTful Services
- Retrofit —A type-safe HTTP client for Android and Java
- OkHttp — An HTTP & HTTP/2 client for Android and Java applications
- Network Profiler in Android — A tool in Android Studio that allows you to profile your network calls.
- Charles Proxy — Useful for intercepting network calls whilst testing.
Architecting your Android Applications
Unfortunately, writing code and getting your app to compile isn’t the end of knowing how to write a maintainable Android app. Large scale Android applications need to follow good architectural designs in order for them to be maintainable and testable. There are many different patterns you can follow when writing an Android application. Patterns such as MVP, MVVM and Clean Architecture are commonly used. Make sure you understand the differences between the patterns as you will encounter many different patterns in the wild.
Testing your Android Applications
Once you have gotten the hang of creating Android apps, you will need to think of how to test them. Unit testing and UI testing are very important concepts that you need to make sure you understand. There are plenty of different tools you can use to write UI tests. Most Android developers use Espresso and JUnit to write tests but there are many other tools out there such as Robotium, Calabash, Appium etc. I would recommend using Espresso and JUnit.
There are plenty of things that should be done in order to secure your application and make sure no one gains access to unauthorised content. Make sure you are using ProGuard (mentioned earlier). Understand what a Man in the Middle Attack is. Understand different encryption methods and ways in which you can securely store information inside an Android App including securing your API Tokens, certificate pinning etc.
Advanced Android Topics
Once you have covered all the basics of writing Android applications, there are a few advanced topics that you might need to cover in order to contribute to some codebases:
- Kotlin — Kotlin is the new programming language for Android, developers are actively writing their code in Kotlin. It is worth reading up about Kotlin and running through the Kotlin Koans. There is also a Kotlin code lab available.
- RxJava — RxJava is a library used for asynchronous, event-based programming. It allows you to compose operations together to do complex tasks (such as combining multiple network calls together) and can be very useful with regards to managing which thread your code is executed on. There is a great video from Jake Wharton describing how to use RxJava and the benefits of using it.
- Dagger (Dependency Injection) — Dependency Injection is a way to manage objects and their dependencies within your application. The concept of DI is not an Android one but is available in many other frameworks as well. DI can make your code more memory efficient and promotes testability. Dagger 2 is the most popular Android DI Framework.
- Material Design — Most Android Apps follow Google’s Material Design Guidelines. The guidelines are a way of designing your apps in a standard way which users are accustomed to.
- Support Libraries in Android — The support libraries in Android are very important to ensure that your app looks and behaves consistently across multiple versions of Android. There are a few different libraries that have different purposes. The linked article describes the reasoning behind the libraries.
- Memory Leaks — In Android, it is quite easy to create memory leaks. This can lead to erroneous behaviour in your application (random crashes). Read about memory leaks here. A lot of developers use LeakCanary within their apps to ensure that there aren’t any memory leaks present.
Keeping up to date with Modern Android Development
There are a multitude of ways to keep up to date with the latest changes and developments in the Android Community. Some of the ways I find useful:
There are many concepts you will encounter as an Android developer, such as working with notifications, widgets, themes and styling your apps etc. This list covers the main topics that I feel are necessary in order to be a great Android developer, most of the other topics can be understood as you go.
I hope this list of resources helps you on the path to becoming a great Android developer. Let me know on Twitter if there is something you feel should be added to this list!