Mark Allison

Kotlin Nullability

Mark Allison | Apr 23, 2018

In this screencast, we'll learn how to take a Java class converted to Kotlin using the conversion tool built in Android Studio, and apply some better null safety to the code learning about null safety along the way.

For the More Curious...

Null Safety | Kotlin Lang
BNR Guide to Kotlin
Android & Kotlin Courses

Subscribers Only

Transcripts are for subscribers. Create an account today to access our collection of screencasts, skill packs, and more.

Subscribers Only

Project files are only available for subscribers. Create an account today to access our collection of screencasts, skill packs, and more.

Need Help?

If you get stuck, try starting a discussion with Big Nerd Ranch experts in the community tab.

Getting Started with Kotlin

This screencast is part of a skill pack called Getting Started with Kotlin.

Kotlin Class Extensions

8 minutes

Class extensions are a powerful feature of Kotlin that allow you to add behavior to classes without extending them. In this video we will take a look at how to work with class extensions, some of the subtleties of how class extensions work with custom objects, and how to define your own class extensions to simplify your code.

SAM Type Conversion in Kotlin

7 minutes

In this screencast, we will do a recap on SAM Types, see how they work in Kotlin to support Java interoperability, and we'll also see some of the "gotchas" involved with the feature.

Converting a Java Android Project to Kotlin

8 minutes

Google announced official support for the Kotlin Programming language at google io 2017. In this video we will learn how to migrate our existing Java Android projects to the Kotlin language by using the automated Kotlin Conversion tools. In the process, we will also learn Kotlin language fundamentals, including the null safety features of the language, safe call operator, and how statics are represented in Kotlin.

Dagger and Kotlin

8 minutes

Dagger is a dependency injection framework. In this screencast you will learn how to set up Dagger in a Kotlin Android app and some best practices.

Kotlin Nullability

5 minutes

In this screencast, we'll learn how to take a Java class converted to Kotlin using the conversion tool built in Android Studio, and apply some better null safety to the code learning about null safety along the way.

Kotlin and Android Lifecycles

6 minutes

What are some strategies for dealing with Kotlin and Android Lifecycles? In this screencast, cast you'll learn how Android Lifecycles appear to inhibit some core behaviors of Kotlin.

Related Screencasts

Explore other screencasts related to this topic.

Android NFC: Read Payload Data from a Tag

5 minutes

In the second screencast of this series, we’ll build upon the app we started in the first screencast and demonstrate how we can retrieve the payload of the tag within the Activity which was launched when the device detected a matching tag. Along the way we’ll explore some of the internals of how NFC tags are structured.

Android NFC: Android Application Records

3 minutes

In the final screen cast of the series we’ll return to the Android chooser behavior which asks the user which application they wish to use to handle a newly discovered tag. We’ll then look at how we can add an Android Application Record to our NdefMessage which will effectively specify that our app will handle the tag and bypass the chooser. While it is very light on code, the concepts do require a little explanation to make the code changes understandable.

Kotlin and Android Lifecycles

6 minutes

What are some strategies for dealing with Kotlin and Android Lifecycles? In this screencast, cast you'll learn how Android Lifecycles appear to inhibit some core behaviors of Kotlin.

Android NFC: Launch Activity

4 minutes

In the first screencast of this series we’ll cover the basics of NFC tags introducing NDEF and the Android tag dispatch system. We’ll look at how to add an intent-filter to the Manifest entry for a given Activity to enable that Activity to be launched when a matching tag is detected by the device.

Android NFC: Foreground Dispatch

5 minutes

In the third screencast of the Android NFC series, we’ll continue to build on the app we’ve been working on in the series so far. Now we’ll begin preparations to write to a tag by creating a new Activity which will use foreground dispatch to get notifications of any tags which are detected while it is in resumed state.

Android NFC: Write an NdefTag

6 minutes

In this screen cast we’ll further build upon the app from the last cast where we got foreground dispatch working to handle tag discovery events within a resumed Activity. We’ll look at how we can construct an NdefRecord, and an NdefMessage and write this to a tag. We’ll also look at the difference in writing to an Ndef tag and an un-formatted NdefFormatable tag.