Mobile Programming

Add Auth0 authentication to your Jetpack Compose Android apps!

My newest article on the Auth0 Developer Blog is a two-part that covers adding authentication to Android apps built using the Jetpack Compose UI framework!

Here are the two parts:

  1. Jetpack Compose Basics: An introduction to Jetpack Compose through building a single-screen app with composable functions and managing state the Jetpack Compose Way.
  2. Adding authentication: Taking the app from part one and adding Auth0 authentication.

I’m working on the companion video for the article as I write this — keep an eye out for it!

Current Events Mobile Programming

A mobile dev’s perspective on that old Vine code

Of the many ideas for Twitter that Elon Musk has been posting for public reaction since taking over, the best one — an easy choice, as most of the ones he’s tweeted run the gamut from dismal to disastrous — is resurrecting Vine, the proto-TikTok short video service where you could share incredibly short (six-second) looping videos:

Vine started as its own company in June 2012, Twitter acquired it in October 2012, and its first official release was in January 2013. Twitter announced that it would discontinue Vine in October 2016 and disabled all uploads.

If Vine could be turned into a TikTok competitor as YouTuber Jimmy “MrBeast” Donaldson suggests, it could help counter TikTok’s serious security issues and help give Twitter a much-needed image boost.

Here’s the problem:

Musk has asked engineers to look at the old code. This would be a sensible thing if we were dealing with a hardware, mechanical, or physical artifact, but Vine is software. Even more challenging is the fact that it’s mobile software. That was first released in 2012 and last updated in 2016.

As software developer and product manager Sara Beykpour put it (and on Twitter, no less!):

An actual book from the early Vine era.

I have no inside knowledge of Vine, but I’d be willing to bet that the Android and iOS Vine apps were probably written as native apps. React Native wasn’t out until 2015, and every other cross-platform solution at the time (including Xamarin) wouldn’t have been up to the task.

In 2012, when Vine began, that would mean:

  • On Android: writing the app in Java using Eclipse (the stable 1.0 version of Android Studio wouldn’t come out until December 2014).
  • On iOS: writing the app in Objective-C, quite possibly using NIBs instead of storyboards.

Simply put — ancient stuff, at least by the standards of mobile development. While there are still some Java-based Android and Objective-C-based iOS projects out there, the majority of the top apps in the stores are written in either Kotlin or Swift.

It would be a good idea to have a handful of developers look over the old Vine code for an audit. There’s a chance that there might be a few useful ideas in there, possibly in feature switches that never got turned on. However, that old code will probably be useless as a starting point to build on in the short timeframe that Musk suggests for the relaunch of Vine.

In case you were wondering…

…the flagship phones of 2016, when Vine was active, were the Samsung Galaxy S7 on the Android side, which came with Android 6 (a.k.a. “Marshmallow”, a.k.a. API 23)

…and on the iOS side, it was the iPhone 7, which came with iOS 10.

Current Events Mobile is now called “Kodeco!”

“Distracted Boyfriend” meme, with logo covering the ignored girlfriend’s head, a smartphone covering the boyfriend’s head, and the Kodeco logo covering the distracting woman’s head.

Kodeco (pronounced Koe-DECK-coe, or “code echo,” your choice) is the new name of, the premier mobile development tutorial site!

Over the past decade, I’ve had the pleasure of not just learning mobile development at, but also writing articles for them, doing presentations and workshops at their conference, recording a full video course, and even co-authoring a book!

Anitra Pavka professional head shot.

I even introduced Anitra to them, and she’s now a tech editor there, which is why we’re both on the team photo collage:

Photo collage of team with arrows pointing to Anitra Pavka’s and Joey deVilla’s photos.
Ray Wenderlich.

The name made sense when it was just a blog that its namesake, Ray Wenderlich, started when he’d quit his job to become an indie mobile developer. At the time, he was simply blogging and sharing iOS development tips as part of his business. As I mentioned earlier, I learned iOS programming from the original edition of his first book, The iOS Apprentice, where you learn by building four applications.

The site kept growing and became that classic internet success story where the side business became the main business. The site grew to add Android development tutorials (around the time I joined the team), and since then has expanded to add Flutter, Unity, and other mobile development topics.

A decade and thousands of articles later, the name change makes sense. It’s no longer an indie mobile developer’s side project, but a full-fledged publishing company in the same spirit as O’Reilly and No Starch Press.

Congratulations, Kodeco, and I look forward to writing more mobile dev tutorials with you!

More about Kodeco

Kodeco banner
Mobile Programming Video What I’m Up To

How to add Auth0 authentication to a SwiftUI app

Joey deVilla in his home office, holding an “Einstein” rubber duck up to the camera.
C’mon, how many programming tutorial videos have a scene like this?

If you’re making an iOS app, the odds are pretty good that sooner or later, you’re going to have to integrate authentication — login and logout — into it. I show you how to do that with Auth0 in both a video

…as well as a matching two-part article series that walks you through the process:

Both the video and article present how the final app will look and work:

Tap to view at full size.

And then they’ll get you started with a starter project:

Joey deVilla appears in the corner of the screen showing the starter project of Auth0’s iOS/SwiftUI authentication video.
Tap to view at full size.

I’ll walk you through the processes of getting Auth0 set up to recognize your app and creating a user with which to log in:

Joey deVilla appears in the corner of the screen showing the Auth0 dashboard in Auth0’s iOS/SwiftUI authentication video.
Tap to view at full size.

And then, I’ll show you how to add login and logout to the project’s app:

Joey deVilla appears in the corner of the screen, while adding login and logout to the starter project of Auth0’s iOS/SwiftUI authentication video.
Tap to view at full size.

And along the way, I’ll provide a brief intro to ID tokens, JWTs, and

Joey deVilla appears in the corner of the screen showing the site in  Auth0’s iOS/SwiftUI authentication video.
Tap to view at full size.

Of course the video ends with an accordion number!

Joey deVilla plays accordion at the end of an Auth0 tutorial video.
Again, I ask: how many programming tutorial videos have a scene like this?

Once again, the here’s the video, How to Integrate Auth0 in a SwiftUI App, and here are the articles:

Whether you prefer to learn by watching video, reading, or a little bit of both, I hope you find these useful!

Mobile Programming

My initial impression of Android development with Jetpack Compose

Cat with horrified expression on its face.
Mobile Programming

How to fix the “Android Gradle plugin requires Java 11 to run” error (quick and dirty edition)

Maybe you’ve run into this Android Studio problem lately. You’ve created a brand new project, and when you run it — even if you haven’t made any changes — you get the dreaded Android Gradle plugin requires Java 11 to run error:

Here’s the “quick and dirty” fix. It assumes that you already have JDK 11 installed.

  • On Linux and Windows, open the File menu and select Settings… to get to the Settings window (you can also use the keyboard shortcut Ctrl + Alt + s).
  • On macOS, open the Android Studio menu and select Preferences… to get to the Preferences window (you can also use the keyboard shortcut + , ).

Once the Settings or Preferences window is open, select Build, Execution, DeploymentBuild ToolsGradle from the menu on the left side.

You can change the JDK that Gradle uses in the Gradle projects section’s Gradle JDK menu. Changing the current selection from JDK 1.8 to JDK 11 works for me:

The Android Studio on my Windows machine already defaults Gradle to JDK 11, but on my Mac, it’s still insisting on JDK 1.8. I’m sure there’s some config file floating around somewhere that I need to edit — does anyone know which one? — but in the meantime, I’m using the quick and dirty fix.

Hardware Mobile

Sidetalking makes a (slight) comeback


While getting groceries, I saw this endcap for cotton candy-flavored energy drink. The “XBox controller as phone” pose is silly, but it also reminded me of a phone I’d wanted way back in the early 2000s: the Nokia N-Gage.

The Nokia N-Gage. Tap to view at full size.

Released in 2003 (in the pre-smartphone era, back when mobile phones sported a lot of dedicated buttons), the N-Gage was a phone-meets-handheld gaming device. IGN summed it up best as “a bad console filled with bad games,” and it didn’t help that the speaker and microphone were mounted on its side. In order to use it as a phone, you’d have to hold it like this — a position that would come to be known as sidetalking:

Sidetalking looked silly, so soon there were sidetalking photos featuring people using the N-Gage while making silly faces…

…followed by people ditching the N-Gage altogether and opting to take sidetalking photos with any old electronic thing, turning it into a full-blown meme:

I even got on the fun, using my device of choice:

In case you’re wondering, I’m not really pining for the N-Gage anymore. My iPhone 13 Pro is a decent gaming phone, and on the Android side, I’ve got a Nubia Redmagic 6R that plays Genshin Impact rather nicely.