Introduction Android Development with Kotlin - Copy
Introduction Android Development with Kotlin - Copy
There are Android phones, tablets, TVs, watches, and even cars.
In 2017, Kotlin was officially announced as another supported language on Android.
Two years later, in 2019, Google announced their commitment to making Android
development increasingly Kotlin-first. That means new platform features and libraries
will first be made available in Kotlin. As a result, new developers are encouraged to
build their Android apps in Kotlin.
Together, JetBrains and Google created the Kotlin Foundation to protect, promote,
and advance the development of the Kotlin language.
Resources:
● Android Announces Support for Kotlin blogpost
● Google I/O 2019 blogpost
● Kotlin Foundation
Kotlin is an open-source statically typed language, which supports both functional
programming and object-oriented programming styles. Kotlin was designed to be
pragmatic for developers, with a focus on interoperability, safety, clarity, and tooling
support.
Kotlin is a modern programming language that has rapidly gained momentum in the
industry. According to JetBrains, as of December 2019, there are over 4 million
developers globally using Kotlin. Kotlin is currently ranked as the #4 most-loved
programming language among developers, according to the 2020 Stack Overflow
Developer Survey.
Furthermore, over 60% of professional Android developers use Kotlin, and over 70%
of the top 1000 Android apps contain Kotlin code.
Resources:
● Kotlin 1.0 released
● Kotlin Evolution
● Developer Stories
Here are some key benefits on why to use Kotlin for Android.
Expressive and concise: With Kotlin, you can express your ideas with less lines of
code. There is less boilerplate code. This means development time can be quicker
and maintenance is easier. Kotlin also has type inference, so you can omit data types
if the Kotlin compiler can infer it, which makes the code more concise.
Safer code: Kotlin also has language features to help you avoid common
programming errors. For example, the type system in Kotlin helps you avoid
NullPointerExceptions in your code, which can lead to less crashes in an app.
Resources:
● Android's Kotlin-first approach
● Null Safety
● Interoperability
● Kotlin coroutines on Android
Resource:
● Idioms
To build Android apps in Kotlin, we will first focus on learning the essentials of the
Kotlin programming language. We’ll cover a range of basic Kotlin language features
in the first 3 weeks of the course. Once you become familiar with Kotlin, you will learn
about Android development for the remaining 10 weeks of the course.
Note to instructors:
The schedule is for a proposed 13-week curriculum, which can be adjusted to be
longer or shorter depending on semester length at your university, and the material
you’d like to cover.
During class, we’ll be going over important Kotlin and Android topics for each lesson.
While there is a lot of content to cover, the important thing to remember is that you’ll
get hands-on practice via learning pathways to apply what you learned.
After each class, you’ll get a link to a learning pathway for you to complete on your
own. After you complete the learning activities within the pathway, be sure to
complete the quiz to earn a badge.
This is how you will access the course on the Android Developers website and the
pathways within them
https://developer.android.com/courses/android-development-with-kotlin/course
What is a pathway? It’s an ordered sequence of activities to learn a specific skill. An
activity can be a video, hands-on coding tutorial (known as a codelab), an article, or a
quiz. You can see three activities in this first pathway. All of these activities are meant
to help you reach specific learning objectives by the end of this pathway.
What is a codelab? It’s a hands-on coding tutorial that provides practical instructions
for implementing the concepts presented in the preceding lecture.
At the end of each pathway, there is a quiz to test what you have learned so far. Once
you complete the quiz, you earn a badge that can be saved to your Google Developer
Profile. Access your profile directly using google.dev/u/me.
You'll need to install IntelliJ IDEA to be able to use Kotlin REPL (Read-Eval-Print-
Loop) and to run Kotlin programs.