Categories
Mobile Reading Material

New book: “Androids: The Team That Built the Android Operating System”

Androids: The Team That Built the Android Operating System is a new book written by Chet Haase, a long-time lead on the Android UI toolkit team, and more recently, an Android developer advocate.

This article is part of the Android August series, in which I’m writing an Android development-related article every day during the month of August 2021.

Haase has been on the Android team since 2010, which is back when it was still considered to be the “wild card” in the race for mobile OS dominance. This gives him serious “in the room where it happened” cred, as well as access to people, photos, documentation, and other behind-the-scenes information about the creation of a operating system that now drives over 3 billion active devices today.

The original demo, written by Brian Swetland and Chris White and later enhanced by Fadden, showing a home screen and several apps (most of which were not implemented). It’s a far cry from a modern Android home screen.
The is the original demo of Android on a mid-2000s phone, showing a home screen and a selection of apps, most of which weren’t implemented at the time. Hey, it was a demo for a pitch! (Photo by Chet Haase)

Android wasn’t originally meant to be a phone OS. The original plan was for it to be an advanced OS for digital cameras, which were more common back in the early 2000s, and it’s the use case they presented to investors in early 2004.

It was later decided that the camera market wasn’t big enough, and that Android should aim for the same space occupied by the big mobile operating systems at the time: Symbian (the most popular mobile OS until 2010) and Windows Mobile. They courted Samsung and HTC, but in July 2005, Google made the prescient decision to acquire Android for $50 million. According to Wikipedia, this move was described in 2010 as Google’s “best deal ever” by their then VP of corporate development, David Lawee, to whom I reported during the dot-com era at OpenCola.

A Look Back at the First Android Phone, 10 Years Later | Digital Trends
The first commercially-available Android device: The HTC Dream, also known as the T-Mobile G1, released September 2008. (Creative Commons photo by Michael Oryl.)

Androids is an insider’s history of the Android operating system, but Haase also promises that it won’t be above a non-techie’s head:

Instead, it’s a history: It describes the events, stories, experiences, thinking, and decisions made by the Android team, most notably in the early days, well before the present-day concept of a smartphone existed.

Want to find more about the book? Check out these articles:

Want to get the book? There are a couple of ways to do so:

The book will also be available in paperback form.

The Connectory
Women Who Code: WWCode is a non profit that helps mid-career engineers get  promoted. | Y Combinator

Here’s another reason to buy the book: Haase is donating profits from the book to Black Girls Code and Women Who Code.

Categories
Mobile Programming

Learn how to build an Android app using MVVM

Last week, I pointed you to Tutorials.EU’s video tutorial, Everything You Need To Know About Retrofit in Android | Get Data from an API, which showed you how to build an app that accesses the Rick and Morty API using the Retrofit HTTP client for Android.

This article is part of the Android August series, in which I’m writing an Android development-related article every day during the month of August 2021.

This week, they expand on that tutorial by showing you how to clean up the project’s architecture by refactoring it so that it uses the MVVM (Model-View-ViewModel) architecture:

This video is the second in a series. In next week’s video, you’ll change the implementation so that it uses coroutines to perform tasks in the background.

Categories
Mobile Programming

Android’s Camera2 API

This article is part of the Android August series, in which I’m writing an Android development-related article every day during the month of August 2021.

If you want to write an Android app that interacts with the camera beyond merely taking a picture or shooting some video, you’ll want to make use of the Camera2 API, which became available at API level 21 (a.k.a. Android 5.0, a.k.a. Lollipop), which goes all the way back to late 2014.

There are a number of recently published articles and documents that you can consult if you’d like to explore Camera2:

Categories
Mobile Programming

It’s time to get a head start with Jetpack Compose

This article is part of the Android August series, in which I’m writing an Android development-related article every day during the month of August 2021.

As I mentioned in the previous article in this series, the biggest development in the latest version of Android Studio (at least as far as I’m concerned) is that Jetpack Compose is now included, and therefore official.

Jetpack Compose is Android’s declarative UI, which puts it in the same general category as iOS’ SwiftUI or Facebook’s React.

Jetpack Compose is called declarative as opposed to imperative, which is often summarized as building UIs in a “this is what it should be like” way versus a “this is how it should be created”. It’s the difference between this…

// Imperative UI (Kotlin)
// ======================
val helloButton = Button()
helloButton.text = "Hello, World!"
val layout = Layout()
layout.add(helloButton)

…and this:

// Declarative UI (Kotlin)
// =======================
Layout {
    Button("Hello, World!")
}

The first one specifies, step by step, how to build a simple UI, while the second simply says “this is the UI I want”.

This is a brand new way to build Android UIs, and it’s expected to become the standard way. Now is you chance to get a head start, and the following links can be your first steps.

Get Started with Jetpack Compose

If you want to learn Jetpack Compose, start here — at developer.android.com, where they’ve got a page of links on learning the basics.

Android Developers’ Jetpack Compose Tutorial

In this official tutorial direct from Android’s own creators, you’ll learn Jetpack Compose by building a screen for a chat app that features:

  • A list of expandable and animated messages
  • With each message containing an image and some text,
  • Using Material Design principles with a dark theme included

…and all in fewer than 100 lines of code.

Android Developers’ Jetpack Compose Basics

You’ll want to supplement the article above with this video, which also has you writing a list-based application using Jetpack Compose.

CODE Magazine’s A Practical Introduction to Jetpack Compose Android Apps

This article introduces Jetpack Compose in small steps, starting with a “Hello, World!” app. It goes from there to introduce key concepts such as state, modifiers, and layouts. Finally, you’re introduced to the list and are shown how to use it by building a list of famous comic book superheroes.

Categories
Mobile Programming

What’s new in Android Studio Arctic Fox?

This article is part of the Android August series, in which I’m writing an Android development-related article every day during the month of August 2021.

If you haven’t updated Android Studio lately, you may not be aware that the newest revision, codenamed Arctic Fox, has been released on the stable channel. That means that it’s the official current version of Android Studio.

This new version packs a lot of interesting new goodies, but for me, the biggest development is built-in support for Jetpack Compose — the new declarative/reactive/state-driven way to build user interfaces — and the accessibility scanner for the Layout Editor.

To find out more, check out this video from Android Developers:

Categories
Mobile Programming

Learn how to access an API in Android with Retrofit

This article is part of the Android August series, in which I’m writing an Android development-related article every day during the month of August 2021.

Mobile apps are often front ends for APIs, so one of the first things you should learn about Android programming after getting a reasonable grasp on the basics is how to access an API. If you’re at this stage, this is your lucky day: Tutorials.EU has just posted a new tutorial titled Everything You Need To Know About Retrofit in Android | Get Data from an API that shows you how to build an app that accesses the Rick and Morty API:

There are a number of Android libraries that you can use to access APIs, including OkHttp, Volley, and the one used in this tutorial: Retrofit.

Both OkHttp and Retrofit are creations of the digital payments and financial services company Square, whose work you’ve probably encountered when buying something. Both are HTTP clients, but when it comes to accessing APIs, you want to use Retrofit, because that’s exactly what it’s for.

This video is the first in a series. This first video will cover the basics of API access with Retrofit. There’ll be a second video where you’ll clean up the app’s architecture using the MVVM pattern, and then a third video where you’ll change the implementation so that it uses coroutines to perform tasks in the background.

Categories
Mobile Podcasts

Recommended Android developer podcasts for 2021

This article is part of the Android August series, in which I’m writing an Android development-related article every day during the month of August 2021.

If you’re a regular podcast listener and an Android developer (or an aspiring Android developer), you’ll want to check out these podcasts. Not only are they informative, but they’re also active, or in other words, they’re still in the process of making more episodes. Add them to your playlist and deepen your Android knowledge!

Android Developers Backstage (171 episodes)

This is probably the longest-running Android developer podcasts. Hosted by Nick and Romain, two developers from the Android engineering team, Android Developers Backstage covers topics of interest to Android programmers, with in-depth discussions and interviews with engineers on the Android team at Google.

Jetpack Compose, the reactive data-driven UI toolkit for Android, has finally hit the 1.0 stage, and it’s included in the “Arctic Fox” release of Android Studio. It’s the hot new thing, and Android Developers Backstage is right on top of it, with several recent episodes covering different aspects of Jetpack Compose.

Fragmented: The Software Podcast (220 episodes)

For sheer volume of developer-focused episodes and topics, you can’t beat Fragmented, the Android-centric developer podcast hosted by Donn Felker and Kaushik Gopal. While they do talk a lot about Android, they focus on all sorts of topics that are relevant to software developers of all stripes, such as the importance of having a growth mindset, the importance of code conventions, the three things every developer needs to be able to do, growing an online presence in the software industry, and more.

Talking Kotlin (101 episodes)

I’m sure that there are still lots of Android developers out there who prefer to code in Java, but as far as I’m concered, Kotlin is the Android programming language. And wouldn’t you know it — there is a Kotlin programming podcast, and it comes straight from the source: JetBrains, the dev tool vendor behind Android Studio and Kotlin. Better still, it’s hosted by Kotlin’s best advocate, Hadi Hariri, JetBrains’ VP of Developer Advocacy.

Now in Android (43 episodes)

This is the official Android developer podcast, put together by the Android team. It provides summaries of what the Android team has been up to that you, the developer should know about. It covers library and platform releases, articles, videos, podcasts, samples, code labs — whatever seems relevant and interesting for Android developers.

Lately, there’ve been a number of episodes covering the beta version of the upcoming Android 12.

All About Android (535 episodes)

“All About Android” is aptly named: For over 500 episodes, they’ve been covering all sorts of Android developments — “the biggest news, freshest hardware, best apps and geekiest how-tos”.

POW! Samsung Developer Program (21 episodes)

Samsung, the people behind what’s considered to be the Android flagship phone, have a developer podcast: POW! The Samsung Developers Podcast. It’s hosted Samsung senior developer evangelist Tony Morelan, Sr..

The RayWenderlich.com Podcast

This is the official podcast of my friends at RayWenderlich.com, the premier mobile development tutorial site. RayWenderlich.com started off as an iOS dev tutorial site (it’s how I learned), but they’ve expanded to cover Android, Unity, and Flutter development, and so has the podcast.