Is that an android phone in your pocket, or are you just happy to see me? Probably both? Welcome to the CodeBabes Android virgin course, we’re gonna get hot and heavy with Android and show you how to build your own app, even if you’re a complete NEWB, plus we’ll introduce you to basic concepts of programming in Java, the language native android apps are written in. So get off Tinder and let’s get busy. I would totally swipe right on all of you, girls included. The app is called pickup line and let’s you pick clean or dirty, then displays a clean or dirty pickup line for you to use. Let’s get started, I promise to be gentle.
Let’s talk about Android for a hot minute. Android powers over a billion devices and people have downloaded like a Bajillion apps for it. It’s built by Google and based on Linux. Plus it’s open source so anyone can download the source code, that’s why we have awesome mods and Amazon can build their own flavor of Android. Google develops Android in private then releases major versions under delicious Code Names like Jelly Bean, KitKat and the latest version 5.0 Lollipop.
To be an uber bad ass Android programmer you need to know Java, the language native android apps are written in. Java is an old school, super stable programming language that is used all over the place. Java is a statically typed object oriented language. Say what? Statically typed means we always have to tell Java what’s in a variable or what your code is going to return, we’ll explain more later. Object oriented means everything is an object. Object oriented programming, or OOP let’s you separate your code into objects, or chunks of code that do specific things. When you first start learning OOP it’s gonna be hard. But remember, it’s like that super babe in school, you have to be persistent, really invest a lot of time and effort, but when you get it, it’s awesome. We highly recommend reading up on OOP before diving in, but we’ll do our best to introduce some concepts.
The program we’ll use to develop Android apps is Android Studio, it’s free to download from Google. Just Google Android studio, the first result will be the download site, which also has tons of documentation. Android Studio is an IDE or integrated development environment built specifically for android. Basically a super fancy bad ass text editor with a bajillion features to make programming easier with stuff like debugging and code completion.
Here are some links to setup guides for Android Studio. If you don't have it, go get that shit! If you’re on a mac just download and install, if you’re on a PC you might need the Java JDK too.
Let’s open Android Studio and start a new project. I’ll hold your hand while we go through these screens. The first thing that pops up is a welcome screen. If you’re just starting let’s do something first, go to configure then SDK manager and install everything checked there. Your app talks to the API, which Talks to the SDK which makes your app run. Next just click back and click start new project.
Now we name our application, Pickup Line, then your company domain can be whatever you want. It makes your app unique when its in the Google play store making cash money! It also makes the package name. I'm sure you all name your packages too. And then at the bottom you see where the project is located on your computer.
Let’s click next. On this screen we choose what devices we want our app to run on. Nice try google, nobody wants to use Google Glass!
We’ll go with Android 4.4 Kitkat. If you click “help me choose” you’ll see a breakdown of API usage in all android devices, which is pretty cool. These jelly bean people need to get their shit together.
Ok click next. On this screen we choose our ‘activity’. You’ll hear this term a lot as we progress. Activity is just how android refers to the different screens in your app, like the home screen or login screen. Let’s choose blank activity, but definitely come back and get busy with some of these.
Click next and we are prompted to customize our activity. We’ll leave it as Main Activity. We don’t need to worry about the menu resource name for this project. Then click finish. It might take a few seconds for android studio to set up everything, so just be patient. The Guns N’ Roses song Patience should be the Android developer theme song. Android is still a very young Operating system so things change rapidly, which means sometimes things don’t work. Facebook is worth like $100 billion and their android app blew for like ever, so yeah it’s tough.
And boom, your project is created and your senses are more overloaded than if I ripped my shirt off right now. There are buttons everywhere! If you haven't worked with an IDE before it’s a little overwhelming, but take a deep breath and we’ll walk through the most important parts together in the next lesson. And you'll see what's under this sweater.