And this week, we're going to check out how we can set up the Abdeen 200 virtual device so that we
have something where we can test our applications on.
You can, of course, use your phone as well, which is probably going to be the better solution because
your phone is going to be faster, as any Abdeh usually should be.
So, yeah, I'm still going to show you how to do that, because if you have an iPhone, for example,
instead of an Android phone, it really makes sense to have at least one device, even if it's a virtual
one on which you can test your applications, because otherwise it's really not that easy to develop
something if you can test it.
So let's go ahead and configure the AVD manager.
All right.
So you will end up on the screen where you can set up a virtual device.
So you just click on create a virtual device and then you can select which phone you want to use for
this.
So, for example, the Nexus or pixel, something like that would be fine.
I'm going to use the pixel to what's important is I'm going to use the one with the store install,
which will make it easier to test certain parts of applications.
I generally recommend to use that.
And once you have selected the phone that you want to use and maybe also change the hardware profile
to what you need.
For example, if you want to change the memory, the RAM that you want to make available to the device,
you can set that up here.
That is something that will make sense if you have a very small ram.
So if you only have like four gigabytes of RAM, then you should really think about how much room you
want to give your device.
But other than that, the default will be fine.
So if you have eight gigs of RAM, that should be fine.
OK, then let's go next.
And here we can then select the latest Android version.
In my case, it's Android 11.
If it's Android 12, 13.
In your case, if you watched this in the future, then you can still select the older version.
If you want to still use Android 11, or of course, you can also use the latest version.
There is something about Android app development that is different in, for example, iOS app development,
and that is that usually developing for an older Android version is not that much of an issue because
most people don't have the latest Android version anyways.
So, for example, even the latest Samsung devices are just four or five months after the release of
Android basically getting the latest version of Android.
So it really takes a while until it's adopted throughout the space.
So usually.
Even using an older version and developing for an older version will still be superfine and not at all
a problem because it doesn't really make sense too often to develop specifically for the latest devices,
because you want to have as big of an audience as possible.
And usually having older Android versions is going to do the trick.
But we're still going to develop for the API level 30 in this video because that's the latest one available
for us.
OK, so select that.
Give your Android virtual device a name.
I'm going to leave the default, which is pixel two, API level 30.
So I know which version I'm using here.
You can change the start up orientation if you wanted to.
I'm going to leave it as it is.
And then you can, of course, also change a couple of advance settings here, such as how much ram
you make it available, how much internal storage you want to set up, and a couple more settings.
But I'm going to leave everything as the default and click finish in order to create this device.
And then once you have set it up, you can click this run button, which will then start your AVD.
So your Android virtual device, you can now change its size a little bit if you want to.
And there are a couple more buttons made available for you in this bar here on the side.
You can even add some changes to the settings, such as, for example, they run with a location in
order to fake the location as well as set up how good your Internet connection is, how much battery
the phone has and so forth.
OK, so this is our emulator now.
We have set it up, can now use it like a normal Android phone.
As you can see here, you even have the play store installed here.
So if you ever want to install an application on here, you can do so to, for example, test share
feature or something like that.
OK, now, at this point, what we can do is we can go over to Android studio and actually create a
new project.
OK, so let's create a new project real quick and I'm going to leave everything as default.
I'm going to even leave the name as default.
We just want to quickly check whether we can run this application on our AVD.
OK, so once the application is ready, we can go with it.
And once the application is ready, what you can do is you can select the device up here.
So, for example, in my case, you can just click on Pixel to apply 30 and click run and that will
then run the application on my iPhone.
And this case is just going to say something like the world.
And that's going to be it's really not too much going on here, but it's going to basically come to
create this layout for us or inflate that layout, which just says Hello world.
So here you can see really boring UI.
And there we are, we can see how the world so this is really useful to test our application.
You can check it out how it's going to look like on a pixel two.
But of course, you can also use a different device so you can set up another AVD any time going from
here at the top, there's this little icon with a little droid head and a phone you can click on there
and create a new virtual device any time to then test how it's going to look like on a different phone,
for example.
So maybe with a different resolution or a different format, this will help you out.
There is something to consider, however, is that it's going to take quite some space.
As you can see here, it's taking almost nine gigabytes of space on my PC.
And this is without doing anything specific on the device, really just the default features.
So it really takes quite some space.
That's something that you should definitely keep in mind when creating multiple virtual devices.
All right.
So that's it for this video.
Let's go over to the next one.