Advertisement
English transcript
MALE SPEAKER: Developing apps for Android
is an exciting opportunity to change the world.
I'm going to step you through the process of getting started
with Android using Android Studio, while also sharing
some pro tips based on the experiences of a real Android
start-up.
Before we even install Android Studio,
you should start thinking about the app you plan to build.
Start by looking at the challenges
you, your friends, or family face.
Could you build an app to solve one of those problems.
Let's take a look at our start-up
and see where their idea came from.
[VIDEO PLAYBACK]
-There's somebody in there. [INAUDIBLE] Open up.
[DOOR KNOCKING] [INAUDIBLE]
-Hurry.
Get it open.
-Get something in there.
-Just kick it open.
Come on.
[INTERPOSING VOICES]
[DOOR CRASHES]
[MUSIC PLAYING]
-Well that was unexpected.
-What the hell was that?
What's going on?
-Zombies.
Obviously those were zombies.
I don't know how but, I bet the bald guy is somehow to blame.
-Oh sure.
Solve one problem with the Android [? D'nomicon ?]
and suddenly this is my fault.
-How are we going to survive a zombie apocalypse?
We don't have any training.
It's not like we can go to Google Play
and download an App.
[MUSIC PLAYING]
[END PLAYBACK]
MALE SPEAKER: Like our start-up team,
you have a problem to solve.
So it's time to start developing.
First, check that you have version 7 or later of the Java
Development Kit installed.
Open a terminal window or a command prompt and type Java
dash version.
I'm doing this on a Mac but it should look very similar
on Linux or Windows.
The Java version number is showing after the one.
So here you can see.
I've got JDK version 8 installed.
If you see an error or the version is less than 7,
you'll need to download and install the JDK.
From this download page, find the Java platform Standard
Edition.
Select download and then select the right bundle
for your operating system.
I'm on a Mac so I'll accept the license agreement
and download the Mac OSX x64 installer from the Java SE
development kit.
Once that's downloaded, locate the file
and double click it to begin the installation process.
Once that's completed, go back to your terminal
and confirm that it's installed correctly.
Now you're ready install Android Studio.
We'll start by navigating to the Android Studio home page
on developer.android.com/sdk.
There's a big button at the top that
says download Android Studio.
Click that.
Now carefully read the terms and conditions.
Select the check box confirming that you've read them
and agree with them.
And then press the download Android Studio button
to begin the transfer.
It's a pretty big file, so while you're
waiting for that to complete, you've
got a great opportunity to start thinking about the APIs
you'll be using to build an app that solves your problem.
This early in the product life cycle
it's worth exploring some of the options made possible using
new versions or even early access beta versions
of the Android platform.
Here we're looking at the new APIs
available from the Marshmallow release of Android.
Let's take a look at our start-up team exploring
possibilities for their app.
[VIDEO PLAYBACK]
-Ian.
What's our status?
How are we doing?
-Well I'm sure glad we got this Duel Booted
Chromebook on the way out.
Google's got APIs for location based services and mapping.
-What about a fitness API.
And we should make sure it works with Android Wear.
-Hey.
Hey.
Focus.
Zombies.
Is there like a zombie killing or zombie protection
API or something?
-Well location apps are pretty hot right now.
-I'm not finding anything in here.
-Check the Android Zed preview release.
-The what?
-The Android Zed.
The preview.
-What?
-Zee.
Zee.
Like zee as in zebra.
-Oh.
Australians.
-Americans.
-Oh, yeah.
Here it is.
There's even a method is user a zombie in the framework now.
That would've been nice to have in the support library.
[END PLAYBACK]
MALE SPEAKER: Now that your download is finished,
you're ready to install Android Studio.
If you're on a Mac like me, double
click the file to open it.
Then drag the Android icon into applications.
Now double click the icon to start Android Studio
for the first time.
If you're on Windows, double clicking the download
will launch an installation similar to what
I'm about to show you here for the Mac.
We'll then select a standard installation
for Android Studio.
Hit finish to complete the installation.
That's going to start downloading two
to three gigs, which includes the Android SDK.
That's going to take awhile so it's the perfect opportunity
to take a break, make a cup of tea,
and think about things like how to monetize your app.
[VIDEO PLAYBACK]
-What do you think we should do about monetization?
Because I feel like in-app billing
would be great for all the extra skills and defenses
but subscription would be so consistent.
-Maybe we could try A/B testing both of them.
See which one turns out to be more effective.
-That's true.
That's a good idea.
-Hey.
Should we worry about performance this early?
I mean if you're being chased by a zombie,
it seems like we'd want to be responsive.
Right?
-Right.
So, clearly, we can't use any eNoms in our app.
-I don't know.
Is that risking premature optimization?
-Hey now, listen here, we've talked--
-All right.
[RECORD SCRATCHING]
-Download's done.
[MUSIC PLAYING]
[END PLAYBACK]
MALE SPEAKER: OK.
The download is complete.
So hit Finish and your installation is done.
Now you're ready to start coding.
We'll start by creating a new Hello World project
that you can build from.
Now, keep in mind that Android Studio is constantly
being updated and improved.
As a result, the process for your particular version
may look a little different to what I'm showing on screen.
Don't be alarmed.
The options presented in the general flow
should still be very similar.
Start by choosing to start a new Android Studio project.
Give it a name and enter a domain.
These two will be used together to form your app's package
name.
Package names must be unique.
So, ideally, you'll own a domain and you can use it here.
Even if you don't, try and select
something that's unlikely to collide with another developer.
I happen to own a domain so I'll enter that here.
I'm happy to use the default project location.
So let's hit Next to continue.
Now we can select the devices we plan to target with our app.
Eventually we'll want to make our app
available on all possible form factors.
But for our first ever application,
let's keep it simple and target only phones and tablets.
Next we can choose the minimum SDK we plan to support.
Selecting a min SDK lets you choose your app's level
of backwards compatibility.
A lower value will make your app available to a larger
number of devices.
But in turn, will require you to do more work
to ensure compatibility with devices
that may not support all the features added in newer Android
releases.
You can check to see what proportion of Android devices
are running on each platform release
by clicking this help me choose link.
When we filmed this video in October of 2015,
supporting back to Android 4.0 or Ice Cream Sandwich,
let us reach around 90% of devices.
Now you're prompted to select a new activity or user interface
screen type to add to your project.
To get started, we'll choose a blank activity.
Give it a name and a title.
The other files, layout, and menu resources
will be automatically generated for you.
And you can keep the default names.
Then hit Finish.
Read some tips and wait for your new project to be created.
This may take a little while the very first time you run it.
So here's one we prepared earlier.
Your Hello World app is now ready to run.
You can see it running on the emulator
by hitting the green Run button like this
and selecting the emulator.
But it's much more fun to run it on a real Android device.
Enable USB debugging by navigating to the Settings
and going down to About Phone.
Then scroll down and press the build number seven times.
This will enable developer options.
Navigate back.
Select Developer options and enable US
bugging from within there.
If you're running Windows, you'll
also need to download a driver for your phone.
You can find drivers and installation instructions
for them here on the Android developer site
at developer.androi d.com/tools/extra/oem-usb.
Now plug your phone into your computer and if prompted,
choose to allow USB debugging.
Hit the Run button in Android Studio but this time,
select your real device.
Congratulations.
You are running your first app on a real phone.
With that, you're ready to start building a real app.
Unlike this example, you need to spend
a lot of time working on a delightful, responsive, and
intuitive user experience.
Speaking of which, let's see how our start-up is getting on.
[VIDEO PLAYBACK]
-So I've got the app running but,
how do I know if it's working?
-It's not working.
-Have you enabled real time location in the settings?
-Wait, is that the brain icon or the celery stick?
-Celery stick.
Then you scroll to the bottom and hit the version number
seven times.
-Joanna, are you getting any of this?
-Hmm.
Oh.
I'm sorry.
I meant to tell you guys.
I decided to join a different start-up called Meatr, which
will connect zombies with host humans
and make sure that they're fresh juicy brains on demand.
So it's going to be great.
But I guess I should probably go.
Good luck, you guys.
[MUSIC PLAYING]
-She could have left the shovel.
[END PLAYBACK]
MALE SPEAKER: Unfortunately, for our courageous start-up,
they were late to market.
And they had some serious issues with their UX design.
You can avoid mistakes using our resources
to learn how to build and design great Android apps.
Good luck.
[VIDEO PLAYBACK]
[MUSIC PLAYING]
-Meatr delivery.
-Hey.
Oh.
-Hi you guys.
-How are you doing?
You know, Colt, we definitely used an eNom
to get to market faster.
[YELLING]
[MUSIC PLAYING]
[END PLAYBACK]
is an exciting opportunity to change the world.
I'm going to step you through the process of getting started
with Android using Android Studio, while also sharing
some pro tips based on the experiences of a real Android
start-up.
Before we even install Android Studio,
you should start thinking about the app you plan to build.
Start by looking at the challenges
you, your friends, or family face.
Could you build an app to solve one of those problems.
Let's take a look at our start-up
and see where their idea came from.
[VIDEO PLAYBACK]
-There's somebody in there. [INAUDIBLE] Open up.
[DOOR KNOCKING] [INAUDIBLE]
-Hurry.
Get it open.
-Get something in there.
-Just kick it open.
Come on.
[INTERPOSING VOICES]
[DOOR CRASHES]
[MUSIC PLAYING]
-Well that was unexpected.
-What the hell was that?
What's going on?
-Zombies.
Obviously those were zombies.
I don't know how but, I bet the bald guy is somehow to blame.
-Oh sure.
Solve one problem with the Android [? D'nomicon ?]
and suddenly this is my fault.
-How are we going to survive a zombie apocalypse?
We don't have any training.
It's not like we can go to Google Play
and download an App.
[MUSIC PLAYING]
[END PLAYBACK]
MALE SPEAKER: Like our start-up team,
you have a problem to solve.
So it's time to start developing.
First, check that you have version 7 or later of the Java
Development Kit installed.
Open a terminal window or a command prompt and type Java
dash version.
I'm doing this on a Mac but it should look very similar
on Linux or Windows.
The Java version number is showing after the one.
So here you can see.
I've got JDK version 8 installed.
If you see an error or the version is less than 7,
you'll need to download and install the JDK.
From this download page, find the Java platform Standard
Edition.
Select download and then select the right bundle
for your operating system.
I'm on a Mac so I'll accept the license agreement
and download the Mac OSX x64 installer from the Java SE
development kit.
Once that's downloaded, locate the file
and double click it to begin the installation process.
Once that's completed, go back to your terminal
and confirm that it's installed correctly.
Now you're ready install Android Studio.
We'll start by navigating to the Android Studio home page
on developer.android.com/sdk.
There's a big button at the top that
says download Android Studio.
Click that.
Now carefully read the terms and conditions.
Select the check box confirming that you've read them
and agree with them.
And then press the download Android Studio button
to begin the transfer.
It's a pretty big file, so while you're
waiting for that to complete, you've
got a great opportunity to start thinking about the APIs
you'll be using to build an app that solves your problem.
This early in the product life cycle
it's worth exploring some of the options made possible using
new versions or even early access beta versions
of the Android platform.
Here we're looking at the new APIs
available from the Marshmallow release of Android.
Let's take a look at our start-up team exploring
possibilities for their app.
[VIDEO PLAYBACK]
-Ian.
What's our status?
How are we doing?
-Well I'm sure glad we got this Duel Booted
Chromebook on the way out.
Google's got APIs for location based services and mapping.
-What about a fitness API.
And we should make sure it works with Android Wear.
-Hey.
Hey.
Focus.
Zombies.
Is there like a zombie killing or zombie protection
API or something?
-Well location apps are pretty hot right now.
-I'm not finding anything in here.
-Check the Android Zed preview release.
-The what?
-The Android Zed.
The preview.
-What?
-Zee.
Zee.
Like zee as in zebra.
-Oh.
Australians.
-Americans.
-Oh, yeah.
Here it is.
There's even a method is user a zombie in the framework now.
That would've been nice to have in the support library.
[END PLAYBACK]
MALE SPEAKER: Now that your download is finished,
you're ready to install Android Studio.
If you're on a Mac like me, double
click the file to open it.
Then drag the Android icon into applications.
Now double click the icon to start Android Studio
for the first time.
If you're on Windows, double clicking the download
will launch an installation similar to what
I'm about to show you here for the Mac.
We'll then select a standard installation
for Android Studio.
Hit finish to complete the installation.
That's going to start downloading two
to three gigs, which includes the Android SDK.
That's going to take awhile so it's the perfect opportunity
to take a break, make a cup of tea,
and think about things like how to monetize your app.
[VIDEO PLAYBACK]
-What do you think we should do about monetization?
Because I feel like in-app billing
would be great for all the extra skills and defenses
but subscription would be so consistent.
-Maybe we could try A/B testing both of them.
See which one turns out to be more effective.
-That's true.
That's a good idea.
-Hey.
Should we worry about performance this early?
I mean if you're being chased by a zombie,
it seems like we'd want to be responsive.
Right?
-Right.
So, clearly, we can't use any eNoms in our app.
-I don't know.
Is that risking premature optimization?
-Hey now, listen here, we've talked--
-All right.
[RECORD SCRATCHING]
-Download's done.
[MUSIC PLAYING]
[END PLAYBACK]
MALE SPEAKER: OK.
The download is complete.
So hit Finish and your installation is done.
Now you're ready to start coding.
We'll start by creating a new Hello World project
that you can build from.
Now, keep in mind that Android Studio is constantly
being updated and improved.
As a result, the process for your particular version
may look a little different to what I'm showing on screen.
Don't be alarmed.
The options presented in the general flow
should still be very similar.
Start by choosing to start a new Android Studio project.
Give it a name and enter a domain.
These two will be used together to form your app's package
name.
Package names must be unique.
So, ideally, you'll own a domain and you can use it here.
Even if you don't, try and select
something that's unlikely to collide with another developer.
I happen to own a domain so I'll enter that here.
I'm happy to use the default project location.
So let's hit Next to continue.
Now we can select the devices we plan to target with our app.
Eventually we'll want to make our app
available on all possible form factors.
But for our first ever application,
let's keep it simple and target only phones and tablets.
Next we can choose the minimum SDK we plan to support.
Selecting a min SDK lets you choose your app's level
of backwards compatibility.
A lower value will make your app available to a larger
number of devices.
But in turn, will require you to do more work
to ensure compatibility with devices
that may not support all the features added in newer Android
releases.
You can check to see what proportion of Android devices
are running on each platform release
by clicking this help me choose link.
When we filmed this video in October of 2015,
supporting back to Android 4.0 or Ice Cream Sandwich,
let us reach around 90% of devices.
Now you're prompted to select a new activity or user interface
screen type to add to your project.
To get started, we'll choose a blank activity.
Give it a name and a title.
The other files, layout, and menu resources
will be automatically generated for you.
And you can keep the default names.
Then hit Finish.
Read some tips and wait for your new project to be created.
This may take a little while the very first time you run it.
So here's one we prepared earlier.
Your Hello World app is now ready to run.
You can see it running on the emulator
by hitting the green Run button like this
and selecting the emulator.
But it's much more fun to run it on a real Android device.
Enable USB debugging by navigating to the Settings
and going down to About Phone.
Then scroll down and press the build number seven times.
This will enable developer options.
Navigate back.
Select Developer options and enable US
bugging from within there.
If you're running Windows, you'll
also need to download a driver for your phone.
You can find drivers and installation instructions
for them here on the Android developer site
at developer.androi d.com/tools/extra/oem-usb.
Now plug your phone into your computer and if prompted,
choose to allow USB debugging.
Hit the Run button in Android Studio but this time,
select your real device.
Congratulations.
You are running your first app on a real phone.
With that, you're ready to start building a real app.
Unlike this example, you need to spend
a lot of time working on a delightful, responsive, and
intuitive user experience.
Speaking of which, let's see how our start-up is getting on.
[VIDEO PLAYBACK]
-So I've got the app running but,
how do I know if it's working?
-It's not working.
-Have you enabled real time location in the settings?
-Wait, is that the brain icon or the celery stick?
-Celery stick.
Then you scroll to the bottom and hit the version number
seven times.
-Joanna, are you getting any of this?
-Hmm.
Oh.
I'm sorry.
I meant to tell you guys.
I decided to join a different start-up called Meatr, which
will connect zombies with host humans
and make sure that they're fresh juicy brains on demand.
So it's going to be great.
But I guess I should probably go.
Good luck, you guys.
[MUSIC PLAYING]
-She could have left the shovel.
[END PLAYBACK]
MALE SPEAKER: Unfortunately, for our courageous start-up,
they were late to market.
And they had some serious issues with their UX design.
You can avoid mistakes using our resources
to learn how to build and design great Android apps.
Good luck.
[VIDEO PLAYBACK]
[MUSIC PLAYING]
-Meatr delivery.
-Hey.
Oh.
-Hi you guys.
-How are you doing?
You know, Colt, we definitely used an eNom
to get to market faster.
[YELLING]
[MUSIC PLAYING]
[END PLAYBACK]