1. This work is licensed under the Apache 2.0 License
Android Study Jams
Session 1
T R Sai Rakshith
Technical Team Member
2. This work is licensed under the Apache 2.0 License
Unit 1: Kotlin Basics
For Android
3. This work is licensed under the Apache 2.0 License
Let’s get started
4. This work is licensed under the Apache 2.0 License
What are Android Study Jams?
Android Study Jams are community-organized study groups
for people to do hands-on learning for Android app development.
Android Basics is a series of sessions focused specifically on learning
how to build Android apps without prior Android experience.
5. This work is licensed under the Apache 2.0 License
Equipment needed for each student
० Computer
० Internet connection
० (Optional) Android device & USB cable
० Android Studio
6. This work is licensed under the Apache 2.0 License
Official tool to build Android apps
Android Studio
7. This work is licensed under the Apache 2.0 License
Android Emulator
Emulate an Android device on your computer.
Run your app on the emulator
8. This work is licensed under the Apache 2.0 License
The part of your app where
the user interacts with it
User Interface
9. This work is licensed under the Apache 2.0 License
० Basic computer literacy
० Basic math skills
० Computer & headphones
० Internet connection
० (Optional) Android device & USB cable
Prerequisites
10. This work is licensed under the Apache 2.0 License
Learning Objectives
० Build your first Android apps
० Set up Android Studio on your computer
० Learn the basics of the Kotlin programming language
11. This work is licensed under the Apache 2.0 License
What will you learn?
2
3
4
1 Introduction to Kotlin
Create your first
Android app
Build a basic layout
Add a button to an app
Learn to code in Kotlin, a modern programming
language that helps developers be more productive.
Learn to create and run your first Android app in
Android Studio.
Learn the basics of layouts in Android by creating your
very own birthday card app!
Learn how to use classes, objects, and conditionals to
create an interactive dice roller app.
Badges
Earn badges
at the end of each
pathway!
Android Basics
12. This work is licensed under the Apache 2.0 License
What will you learn?
6
5 Get user input
Display a scrollable
list
Learn how to get user input within an app by building a
tip calculator app.
Learn how to display a list of text and images in an
app.
Badges
Android Basics
7
Navigate between
screens
Add another screen to your app by adding a second
activity.
8
Intro to Navigation
Component
Learn how the Jetpack Navigation component makes
it easier to manage navigation within your app.
13. This work is licensed under the Apache 2.0 License
What will you learn?
10
9 Architecture
Components
Advanced
navigation examples
Learn good app architecture principles by building a
game app to unscramble words.
Combine what you’ve learned so far in a more
advanced app that demonstrates navigating
between multiple screens.
Badges
Android Basics
11 Coroutines Write code for more advanced and complex
Android apps.
12 Get and display data from
the internet
Retrieve and display images over the internet with
HTTP and REST.
14. This work is licensed under the Apache 2.0 License
What will you learn?
14
13 Introduction to SQL,
Room, and Flow
Use Room for data
persistence
Learn the basics of reading and manipulating data with
SQL, and how to create and use relational databases in
an Android app with the Room library.
Use the Room library to allow your apps to read
and write from a database.
Badges
Android Basics
15
Learn when and how to use WorkManager, an API that
handles background work that needs to run regardless
of whether the application process is still running.
Schedule tasks with
WorkManager
15. This work is licensed under the Apache 2.0 License
Concept Overview
16. This work is licensed under the Apache 2.0 License
० A layout defines the structure for a user interface in your app, such as in an
activity.
० All elements in the layout are built using a hierarchy of View and ViewGroup
objects.
० A View usually draws something the user can see and interact with. Whereas
a ViewGroup is an invisible container that defines the layout structure for
View and other ViewGroup objects.
Layouts
17. This work is licensed under the Apache 2.0 License
० The View objects are usually called "widgets" and can be one of many
subclasses, such as Button or TextView.
० The ViewGroup objects are usually called "layouts" can be one of many types
that provide a different layout structure, such as LinearLayout or
ConstraintLayout .
० Each subclass of the ViewGroup class provides a unique way to display the
views you nest within it. Below are some of the more common layout types
that are built into the Android platform.
Layouts
18. This work is licensed under the Apache 2.0 License
Aa
Button
Layouts
Views
Layouts
19. This work is licensed under the Apache 2.0 License
० A user interface element the user can tap or click to perform an action.
० Android Button is a push button used to perform events on its click. It is a UI
component comes under the android.widget.Button class.
० android:onClick is used to define the Kotlin function to be invoked in the
activity when the button is clicked. It is a click listener.
Buttons
20. This work is licensed under the Apache 2.0 License
MainActivity
An activity provides the
window in which the app
draws its UI.
Hands On Activity
21. This work is licensed under the Apache 2.0 License
Hello Android!
Views
TextView ImageView Button
22. This work is licensed under the Apache 2.0 License
० Many times for certain applications users have to type in a particular value
manually to perform operations.
० A calculator application is a good example for the same.
० The user expects certain determined output for the input users of a
particular application give.
Getting User Inputs in an App
23. This work is licensed under the Apache 2.0 License
० It's common to make lists for all sorts of situations in your everyday life such
as a list of things to do, a list of guests for an event, a wish list, or a grocery
list.
० Learning how to create and use lists is an important programming concept
to add to your toolbox, and it will enable you to create more sophisticated
apps.
० In programming, lists are also very useful. For example, there could be a list
of news articles, songs, calendar events, or social media posts within an
app.
Introduction to Scrollable Lists
24. This work is licensed under the Apache 2.0 License
THANK YOU
Editor's Notes
The course is made up of units, and units are composed of pathways.
First we’ll be focused on the first unit, which is shown here. It has made up of 4 pathways. In Session 1, you’ll work on the first 3 pathways: 1) Introduction to Kotlin, 2) Create your first app, and 3) Build a basic layout. In Session 2, you’ll work on the 4th pathway, which is a little longer. [Mention future sessions if your group will be meeting for longer.]
That’s all we’ll cover for today -- let’s get started!
Pathway 2 is where you create your first app! You will need to download and install Android Studio on your computer. This is the official tool that professional developers use for Android development. This is where you’ll be writing your Kotlin code and building your apps.
In Android Studio, you can also use the Android Emulator, which can emulate various Android devices on your computer. The emulator allows you to run your app and it provides almost all capabilities that a real Android device would have. If you do have a physical device and want to use it, there are also instructions in Pathway 2 to get you setup.
[Students can either use the emulator or a physical device to test their app, it’s up to personal preference.]
Lastly, in Pathway 3, you’ll learn the basic concepts of customizing the user interface of a simple app. The user interface (also known as UI) of your app includes what the app looks like and how the user interacts with it.
Here are some the prerequisites that will be helpful. Having basic computer literacy and basic math skills is recommended. You’ll also need a computer and access to the internet to take the online course. [Mention WiFi instructions if necessary.]
After this short presentation, we’ll all be working independently on the course. Use headphones to play the videos, so it doesn’t disrupt others around you.
It’s also helpful if you have an Android device so you can test your app. A USB cable will be needed for connecting your phone to the computer. If you don’t have an Android device, don’t worry, you can still use your computer to emulate an Android device.
Let’s talk about what you will learn as part of Android Basics. First and foremost, the goal is for you to build your first Android apps. To do this, you’ll install Android Studio on your computer, which is an application to build Android apps. Along the way, you will be exposed to programming concepts and the Kotlin language.
At the end, we’ll also talk about resources on how you can continue learning and building apps beyond this event.
Now that you’re familiar with the learning platform and how the course looks, let’s dive into some important concepts that you’ll be learning about.
The layout of an app is the design or arrangement of what the user sees on the screen. In Android, a layout is made up of Views.
To build this app, you’ll need to understand what an activity in Android is.
An Activity is the part of your app that presents a window that can display the app's content on the screen.
In the Dice Roller app you’ll be building, there is only one Activity called the MainActivity. When you open up the app, the MainActivity launches, the layout is drawn on the screen, and the user can start interacting with the app. You will be modifying the MainActivity by adding Kotlin code for what should happen when the user taps the button in the app.
Introduction to Activities
Activity class
Here are some examples of types of Views that are provided by Android: TextView for displaying text, ImageView for displaying images, and Button to perform some action when tapped.