Welcome back everyone to
The Xamarin Show, Snack Pack edition.
I'm your host, James Montemagno,
and today I want to take a look at the brand
new Android Device Manager,
part of Visual Studio and Visual Studio for Mac.
Now in previous episodes of The Xamarin Show,
we've talked about Android SDKs,
device managers, emulators, simulators,
all this good stuff,
and we've built a brand new
Android Virtual Device Manager
for both Mac and PC.
This is going to enable you to use
the latest Android emulators
that have some brand new awesome technology,
that boot up instantly.
And also, it's super optimized for each platform and
directly integrated into
Visual Studio and Visual Studio for Mac.
So let's hop over to my machine and take a look.
So here I am inside of Visual Studio for Mac.
This also works in Visual Studio 2017.
Now the first thing that we're going to need
to do is download
the brand new Android Device Manager.
You can follow the link in the show notes below.
This is in preview today,
we just released it,
and this is a replacement for
the legacy Emulator Manager.
And what's great here is that it's
a one click install to help you
manage all of your existing system images for Android,
edit them, create new ones, and launch them.
But of course they integrate into the "Debug" menu
inside of Visual Studio and Visual Studio for Mac.
So here's a quick guide on just how to
install it and get it up and running.
Now, to use the brand new Android Device Manager,
we need to ensure that all of
our Android SDKs are up to date.
So I'm going to go into the Visual Studio
"Preferences," and under
"SDK Locations," we'll find "Apple" and then "Android."
Now what's important here is that you can
install all the different platforms,
such as Oreo and
the specific emulator system images here,
but we can also go into "Tools,"
and this is where it becomes really important.
Under the SDK Tooling,
we'll want to install the brand new 26.axa right now,
of today of recording, 26.1.1 SDK Tools.
That will switch over
Visual Studio and Visual Studio for Mac
to use these new tools
when building and compiling your application,
and when booting the emulator.
We'll also want to make sure that we have
the latest SDK tools,
so here I have 27.0.3,
and also upgrade our Android emulators.
So our Android Emulator as of today is at 27.0.2,
which adds a whole bunch of new features
to the actual Android Emulator.
So once we've updated
our SDK and platform and build tools and emulator,
we can then install the device manager.
So I'm going to go ahead and pop up
the new device manager here
and close some of these windows so you can
take a look and see what that looks like.
So here is our "Android Devices."
I'll zoom in here.
We're able to see all of our Android system images,
the CPU, memory, and resolution.
We can click to start one,
edit, duplicate, or even delete one.
But let's go ahead and create a brand new one.
So I'm going to create a new device,
and here we'll have all of the different properties
in the grid of
the specific properties for that emulator image.
I can select from installed images
or existing emulator images that can be downloaded.
So here I'll just go ahead and select
an Android Oreo and
select the device specific that I want.
So let's say a Nexus 5X here.
I could add additional properties,
but we attempt to add
all of the ones that you need by default,
and we can just hit "Create."
Now if you've already specified
that device name, we'll go ahead and change it.
So here I'll just say "5x" and hit "Create."
This will take a few seconds to create
that Android Emulator on disk,
but we can see the "New Device 5x"
with Google Play is there and I can hit "Play."
Now this will boot up
the Android Emulator extremely fast.
It's going to be using the brand
new Instant On snapshotting capability.
So we can see that it's performing
a clean boot here and it's going to take a few seconds
using the Android x86 image to
boot the actual emulator image.
So here it's going to boot it up the very first time.
It's essentially provisioning the Android Emulator
and all of the tools that I need.
We can see behind it here that it's updated,
so I could stop it,
I could still come in and see some of
the different options that I
have inside of the Android devices,
and we actually get the device Chrome of
the 5X since that is the device that we selected there.
So I'll give it a few more seconds to get into
the final boot mode.
And now we actually have
our Android Emulator up and running.
So let's go ahead and see we can slide around,
get all the features that we would expect.
Since we're using some of the latest emulator images,
we can of course emulate the network type,
"Battery," "Phone," "Microphone," "Fingerprint,"
and make sure that
our Google Play services are up to date.
If we close it down,
this is going to use the new saving state
of that Instant On feature,
so it's going to essentially snapshot it there.
And every single time that I go to load it,
it will now load near instantly.
Did you see that? It actually restored
my state near instantly there.
So it's going to save this image state off,
which takes a few seconds to boot down,
essentially kind of like booting down your phone.
But watch as I hit "Play,"
immediately up and I'm ready for development.
So this is really nice when
paired with the brand new Android Emulator
images and the brand
new Android Device Manager built into Visual Studio 2017.
You'll be super crazy productive.
So there you have it. You can follow
the show notes below to make sure you have all of
the tools and follow along in
this video to make sure you have
the latest Android and device manager,
which is super awesome.
So until next time,
I'm James Montemagno, this has been The Xamarin Show,
and don't forget to subscribe.
It's up over there, down over there,
up over there, who knows?
But when you hit "Subscribe" you'll get
the latest episodes of
The Xamarin Show right in your inbox.
So until next time, thanks for watching.