1. This work is licensed under the Apache 2.0 License
Android Study Jams
Android Basics: Sessions 1 & 2
2. This work is licensed under the Apache 2.0 License
Android Study Jams
Android Basics: Session 1
3. 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
4. This work is licensed under the Apache 2.0 License
1. Why are you here?
2. What are you goals?
3. How do you plan to achieve them?
5. This work is licensed under the Apache 2.0 License
Who would like to share?
6. 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
० Discover resources to continue learning
7. This work is licensed under the Apache 2.0 License
TOPIC TIME
Presentation 12:00 - 12:15
Pathway 1: Introduction to Kotlin 12:15 - 1:15
Break 1:15 - 1:30
Pathway 2: First Android App 1:30 - 3:30
Pathway 3: Build a Basic Layout 3:30 - 4:30
Celebrate
Today’s Schedule
8. This work is licensed under the Apache 2.0 License
Android Basics
in Kotlin Course
9. This work is licensed under the Apache 2.0 License
Unit 1: Kotlin Basics
For Android
10. This work is licensed under the Apache 2.0 License
A Pathway
11. This work is licensed under the Apache 2.0 License
Take a Quiz
12. This work is licensed under the Apache 2.0 License
Earn badges!
13. This work is licensed under the Apache 2.0 License
Developer profile
Carrie Sawyer
Photo by Christopher Campbell on Unsplash
14. This work is licensed under the Apache 2.0 License
Concept Overview
15. This work is licensed under the Apache 2.0 License
Pathway 1 Pathway 2 Pathway 3
Use Kotlin to start writing Android apps
Kotlin helps developers be more productive
Kotlin Programming Language
16. This work is licensed under the Apache 2.0 License
Write and run Kotlin
code in the browser
Kotlin Playground
Pathway 1 Pathway 2 Pathway 3
17. This work is licensed under the Apache 2.0 License
Pathway 1 Pathway 2 Pathway 3
Official tool to build Android apps
Android Studio
18. 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
Pathway 1 Pathway 2 Pathway 3
19. This work is licensed under the Apache 2.0 License
The part of your app where
the user interacts with it
User Interface
Pathway 1 Pathway 2 Pathway 3
20. This work is licensed under the Apache 2.0 License
Aa
Button
Layouts
Views
Layouts
Pathway 1 Pathway 2 Pathway 3
21. This work is licensed under the Apache 2.0 License
Hello Android!
Views
TextView ImageView Button
Pathway 1 Pathway 2 Pathway 3
22. This work is licensed under the Apache 2.0 License
Let’s get started
23. This work is licensed under the Apache 2.0 License
Start here:
g.co/android/basics
24. This work is licensed under the Apache 2.0 License
25. This work is licensed under the Apache 2.0 License
Unit 1
26. This work is licensed under the Apache 2.0 License
Have a Question? Just ask
Go to g.co/android/basics
Start Android Basics in Kotlin Course
Work on Unit 1, Pathway 1
27. This work is licensed under the Apache 2.0 License
Break
28. This work is licensed under the Apache 2.0 License
Have a Question? Just ask
Work on Unit 1, Pathways 2 & 3
29. This work is licensed under the Apache 2.0 License
Welcome back
And congrats!
30. This work is licensed under the Apache 2.0 License
Share what you’ve
learned with
#AndroidStudyJams
31. This work is licensed under the Apache 2.0 License
Stay tuned for Session 2
32. This work is licensed under the Apache 2.0 License
Android Study Jams
Android Basics: Session 2
33. This work is licensed under the Apache 2.0 License
० Completed Pathways 1 - 3 in Unit 1 of Android Basics in Kotlin course
० Computer & headphones
० Android Studio installed
० Internet connection
० (Optional) Android device & USB cable
Prerequisites
34. This work is licensed under the Apache 2.0 License
Recap from last time
What did we learn?
35. This work is licensed under the Apache 2.0 License
Unit 1
Pathway 4
36. This work is licensed under the Apache 2.0 License
Earn a new badge!
37. This work is licensed under the Apache 2.0 License
TOPIC TIME
Presentation 12:00 - 12:15
Pathway 4: Add a button to an App 12:15 - 1:00
Break 1:00 - 1:15
Pathway 4 (continued) 1:15 - 2:00
Break 2:00 - 2:15
Pathway 4 (continued) 2:15 - 3:00
Celebrate
Today’s Schedule
38. This work is licensed under the Apache 2.0 License
Concept Overview
39. This work is licensed under the Apache 2.0 License
MainActivity
An activity provides the
window in which the app
draws its UI.
Activity
40. This work is licensed under the Apache 2.0 License
Class and object instances
A class is like a blueprint, which contains
instructions for how to create something.
An object instance is an actual Dice that’s
created from the blueprint.
Object instance
A second object instance
A third object instance
Dice class
41. This work is licensed under the Apache 2.0 License
42. This work is licensed under the Apache 2.0 License
Let’s get started
43. This work is licensed under the Apache 2.0 License
Stuck? Ask for help
Go to g.co/android/basics
Start Android Basics in Kotlin Course
Work on Unit 1, Pathway 4
44. This work is licensed under the Apache 2.0 License
Break
45. This work is licensed under the Apache 2.0 License
Stuck? Ask for help
Work on Unit 1, Pathway 4
46. This work is licensed under the Apache 2.0 License
Welcome back
And congrats!
47. This work is licensed under the Apache 2.0 License
Let’s Play!
48. This work is licensed under the Apache 2.0 License
Share what you’ve
learned with
#AndroidStudyJams
49. This work is licensed under the Apache 2.0 License
Learn More
50. This work is licensed under the Apache 2.0 License
Continue learning!
Keep coming back to Study Jams!
Learn on your own by going through Android Basics in Kotlin Course.
Modify your existing apps and add more features to them.
Additional resources to check out:
● Official Android Developers Site: developer.android.com
● Learn Kotlin By Example
● Official Android Developers Blog (for announcements)
● Android Developers Medium Blog (for more technical articles)
● Android Developers YouTube channel
● Follow @AndroidDev on Twitter
● Subscribe to the Android Developer Newsletter
Editor's Notes
Hi everyone! My name is <Insert Name> and welcome to Android Study Jams! This is session 1 of Android Basics.
This is for people with little to no programming experience, we start at the beginning and you’ll learn how to build simple Android apps in Kotlin!
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.
Before we dive into the content, I want to get to know you better and what brought you here. Please take out a piece of paper. Take a moment to think about your answers to these questions and write them down.
[Give 2-3 minutes to work and when most people have put down their pencils, proceed.]
So what did everyone come up with? Who would like to share?
[If there is a whiteboard or easel board, write down some answers. If not, simply discuss the answers that people give. After 1-2 people share for each question, continue...]
Great, thank you for sharing! Well I encourage all of you to remember these answers throughout the session.
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.
Let’s look at the schedule for this session. [Please update this schedule accordingly before your event. If attendees install Android Studio beforehand, then you can shorten the time allowed for Pathway 2.]
First, we have a short presentation, which we’re doing right now. We’re covering some logistics and a high-level introduction to the concepts, to help you with the hands-on portion of the session later.
Once I’m done talking, you’ll be able to dive into the course. You’ll be working independently on 3 pathways in the first unit of the course. This is just a suggested schedule. You can work through the pathways at your own pace and let me or any of the other facilitators know if you have questions. We’ll also have a short break in between. At the end of the session, I’ll bring everyone together and we can recap what we learned today and celebrate your progress!!
You’ll be working through the Android Basics in Kotlin course. This is a free online training course developed by Google for people like yourself to learn how to build basic Android apps.
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.]
You may be wondering, 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 quiz. You can see at least 4 activities in this first pathway. All these activities are meant to help you reach specific learning objectives by the end of this pathway.
There’s a quiz at the end of each pathway to check your understanding of what you just learned. Here’s what a sample quiz looks like. There are no limits to the number of retries for a quiz. But if you get a question wrong, try to understand what the concept is (even if you need to look back at the source material), before answering again.
After you pass the quiz, you earn a badge like this one!
The badges you earn can be saved to your developer profile. When you are taking the course, be sure to sign in (in the top right corner) and create a developer profile if you haven’t already. It’s very quick to create. As you earn more badges, you can see them on your developer profile and favorite them, as shown here.
[Read more on the Google developer profile]
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.
In this course, you’ll be learning how to code in Kotlin. Kotlin is a programming language that you’ll use to build Android apps. Kotlin is a modern and popular programming language, known for helping developers be more productive. Kotlin allows you to be more concise when writing your code, and you can write safer code that’s less prone to errors.
As a result of many great language features, Kotlin has quickly gained momentum in industry. It is reportedly one of the fastest growing programming languages, according to GitHub.
Pathway 1 of the course is focused on helping you understand the basics of Kotlin.
[Read about Android’s Kotlin-first approach]
To make it easier for you to learn, you’ll be writing your code in the Kotlin Playground which you can access via the web browser. The site looks something like this. You can write your code in this window and hit the green arrow to run it. The result of your code (known as the output) will show up at the bottom of the window (where it says “Hello, world!”).
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.
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.
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.
Okay that’s it! In a moment, I’ll let you get started on the course. Work at your own pace. If you get stuck, you can ask me or the other facilitators who will be available. [Introduce facilitators if applicable.]
We’re here to answer whatever questions you have, for example, if you need help installing Android Studio or getting your app to run on your Android device. Also feel free to ask each other for help and work together to find solutions.
Open the course page with the link we provided you.
Then, click the green button to start Unit 1 of the Android Basics course.
We will be going over pathways 1-3 today. Start by working on the first pathway.
Alright, go ahead and get started on Unit 1, Pathway 1 of the Android Basics in Kotlin course. [You can give them about an hour to work on this]
If you finish early, you can move onto Pathways 2 and 3. We will be taking a break at <Insert Time>.
[You can give them about an 1.5 - 2 hours to work on this, with another break as needed.]
Alright everyone welcome back! How was it?
Were you able to create a birthday card? Does anyone want to share what your app looks like?
Great job everyone on your progress!
You can post photos or highlights from today’s session on social media using #AndroidStudyJams. [Include your own developer community and chapter hashtags (i.e. #developerstudentclubs #dsccmu)]
We encourage you to share a screenshot of your birthday card app!
Stay tuned for our next session -- you’ll be learning more about Android and Kotlin to build an interactive app! Thank you for coming and see you soon.
[Insert details for Session 2 if it will start later in the day or on another day.]
Welcome back to Android Study Jams! My name is <Insert Name> and today we’ll be completing session 2 of Android Basics. As a reminder, these sessions are designed for people with no prior programming experience to learn how to build basic Android apps in Kotlin.
The prerequisite knowledge is that you have completed session 1 of Android Basics with us. Or on your own, you could have completed the first three pathways of Unit 1, from the Android Basics in Kotlin course. We’ll be picking up from there.
You’ll also need a computer, headphones, and access to the internet to take the course. [Mention WiFi instructions if necessary.]
It’s also helpful if you have an Android device, but if not, you can still use the emulator on the computer.
Let’s start off by recapping what we did last time. Can you remember what you learned in Session 1?
[Ask the group and create a list of everything that people recall. If people forget any of the following, be sure to remind them:
How to write and run a program in Kotlin
How to set up Android Studio on their computer
How to start a project from a template in Android Studio
How to run an Android app on the emulator (and a physical device, if applicable)
Add text and images to a layout
Modify attributes on a TextView or ImageView]
In this session, you’ll complete Unit 1 of the Android Basics in Kotlin course by finishing Pathway 4: Add a button to an app. In this pathway, you’ll be building an interactive app called the Dice Roller app. It rolls a dice when the button is pressed and updates the screen with the result.
At the end of the pathway, if you pass the quiz successfully, you earn this badge for your developer profile!
So what will today look like? [Please update this schedule accordingly before your event.]
First, we have this presentation like we did last time to cover logistics and high-level concepts. Then, I’ll let you go off to work on the pathway individually with a short break after an hour.
Let’s dive into some of the high-level concepts you’ll be learning.
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
As you write Kotin code for your app, you’ll need to understand what classes and objects are. You can think of a class like a blueprint. It contains instructions for how to create something. From the Dice blueprint, you can create actual Dice.
More specifically, the Dice class contains details like what properties a Dice has (e.g. number of sides) and how it behaves (e.g. it can be rolled). The great advantage of having the Dice class is now you can create as many Dice object instances as you want, as shown in the diagram. It saves time from having to write all the same code over and over again. This makes your code more organized and easier to maintain.
[Optional: You could also use this analogy. A blueprint of a house contains the instructions of how to create the house. But the blueprint is not the house itself. The actual house is the object instance, and you can create multiple house object instances from the same blueprint.]
[Optional slide. If you choose to use this, right click on the slide and unselect “Skip slide”]
[Full screen the video when you play it.]
As you continue to learn more about programming in this pathway and beyond, you will run into challenges that you may feel overwhelmed or intimidated by. That is a normal feeling and it’s known as Imposter Syndrome, which many folks in the industry deal with. We want you to be aware of it because there are small actions you can take to overcome it, as the video talks about.
[Additional blog post on why learning to code is so hard]
That’s all we’ll cover for today -- let’s get started!
[This pathway will take about 3 hours so you can give them breaks in between.]
[This pathway will take about 3 hours so you can give them breaks in between.]
Alright everyone welcome back and congratulations on your hard work! How did it go?
[Here are some questions that can spark discussion:
Were any of you able to complete the Dice Roller app with images?
How about the Dice Roller app with text?
What did you learn?
What did you find challenging?
How did you overcome those challenges?]
[This activity is designed for in-person meetings.]
Let’s play a game where you get to use the Dice Roller app you just created! This is a twist on a group rock paper scissors game you may have played.
Pair up and hit the Roll button on your own app at the same time.
Whoever has a higher roll, wins.
Whoever loses cheers on the winner, as they play against their next component.
If you tie, play against the same person again.
The game keeps going until there are only 2 people in the room left to play each other, with everyone else cheering each side on, until a grand winner is declared!
[If some people didn’t finish the app, that’s totally okay. They can Google “Random number between 1 and 6” and it will do the same thing.]
[If you’re meeting virtually, instead of playing the game, you can have folks share how they would extend the app by adding additional features. Or you can have them share if they thought of any future app ideas from building this one.]
Hope you all enjoyed the game and learning to create the Dice Roller app!
On social media, remember to post photos or highlights from today using #AndroidStudyJams. [Include your own developer community and chapter hashtags (i.e. #developerstudentclubs #dsccmu)]
If you liked creating your first Android apps and want to continue learning more on your own, here are some resources.
First, you can keep coming to Study Jams as we cover more topics to make you a full fledged Android developer.
Second, you can continue learning on your own with the Android Basics in Kotlin course.
Third, you can modify the apps we built together and learn by adding more features to them. You can use Google search or look at existing code samples and videos online for how to add additional features to your app.
To stay connected, check out these additional resources, which professional developers use to stay up to date on Android. As you get into more advanced features, you will likely need to learn more programming concepts. You can check out the Learn Kotlin By Example resource for that.
Thank you so much for being a part of Android Study Jams! Good luck on the beginning of your Android developer journey!