Hello this is Martez or Corti.
And in this story I'm going to show you how we can create your own Android emulator and run your app
on the Android emulator.
So in order to actually run your app on the treadmill later at the top you just need to click on the
play button here.
And so it can actually show you what this window and then you just click on Create new virtual device
or key.
There is another way to create a new virtual.
So if I click on the spot and here it's going to open this window for you.
So let's close this window here.
You can actually at the top you can click on Tools and then here we have this for Android.
And we have Android.
We have DVD manager DVDs stands for Android's virtual device manager.
So just click on this.
So now it is your virtual devices at the bottom it is create a virtual device Driskel you can create
virtual device.
So here you want to create a phone.
OK.
So just click on a phone.
And here we can actually specify the type of the phone that we want to create.
So I'm going to create a nexus 6 p ok or Nexus One.
Whatever device that you want to create I'm going to create a nexus six p and here we can see the size
the ratio the density just character next.
And this is really important.
Now we want to target the Android or you or eight if you want to run our app on the Android or you so
here choose or you if you want to target not get you need to actually download the system image for
it and not get to download it but just clicking on this link all you can.
We have also the API 27.
So we just want to use API 26 or you select this one or Hopefully you have actually already downloaded
the audio system image in the Android as the case manager that I showed you in the previous tutorials.
So choose or you.
And then click on next.
So here we have some configuration.
So first we can actually here we can change the emulator name we can say Odeo emulator or you emulator.
We have the nexus s.p.
So here here is going to actually show you that it is actually x x.
It is a very high quality screen.
You can't change it if you want by just clicking on change.
But we already clicked on a nexus is set in Texas a sex P Actually the operating system is Android 8.
The startup orientation portrayed we can't change we can change the landscape leader by just actually
clicking on some options that are provided with a pro emulator.
I wanted to show you that later but for now just use portrait and we have to emulated performance choose
a graphic automatic device frame enable device frame to Tools district post records show at fan settings.
So all of these attributes all of these cities are already done for you you don't have to change any
field.
You can see that the camera or front back.
Emulate your speed fool latency none.
And here you can see that for example the RAM is disvalue we heap two hundred and fifty six internal
storage.
Eight hundred.
So these bodies are already created for me I don't have to change anything.
And here I just have to click click and finish.
So now the emulator is actually created for me.
Right.
And here it is the emulator or your emulator.
And I just need to run this emulator by just clicking on this play button.
So now I just need to you can see now I can read so that the simulator runs in order to make this bigger
I can just click on this handler and just make it bigger.
So let me close this window.
Let me show you the emulator.
So whenever that you want to create an applications.
Make sure to run your emulator first because it's going to take some time to run.
So now I can see my emulator is now ready.
This is my emulator.
So let's go back to our studio and here I just need to click on Play button at the top.
And here I can choose audio you emulator emulator it has connected devices we have this audio emulator.
Just click on OK.
Now it's going to run the app on this or you emulator.
So now we can see that our application is running on the simulator.
We have the spot.
I can interact with this button we have.
Hello world Hi world takes you.
You have enter a name this eddy takes.
We have these buttons.
We have this floating action button here we have this menu.
So what works on a simulator.
So in the next story all you're going to learn how to run your Android app on a real Android device.
But I just opened a new Web page here for you so you can actually just enter this you are well inside
the search part of your web browser developer at that and red dot com slash training slash basics.
So that first app slash running app that DML or you can just in google if I click on dispatch button
here in Google search for how to run Android app on a real Android device and just click on this link
that is actually related to the tree.
They will have heard that and it does come at this link.
And then you will be guided to this page.
So here it is run on the road and with the Weiss set up your device as follows.
Connect your device to your development machine with a USP cable so first you need to disconnect your
device to your machine whether it is a Mac or a Linux or Windows.
If you are developing on windows you might need to install the appropriate USP driver for your device
so this is very important.
In other words you must install the US video driver.
So let me just open it in another tap so you need to actually install the driver you initiated read
the documentation here and here you can see the types of and the voices of different companies.
You can just click on them and then download the specific driver of your specific Android device.
So here you can see that it has enabled us to be debugging in developer options as follows.
First you must enable the developer options open the settings app of your device and it is only on Android
8 or higher.
Select system.
So this second step is for devices that run Android 8 and then you need to go to the first step.
Scroll to the bottom and select about 4.
Scroll to the bottom and tap and tap beat number bit number 7 times.
You need to tap the number 7 times and then the developer options is going to be enabled return to the
previous screen to find the will of options near the bottom.
Open the will of the options and then scroll down to find and enable us debugging option the checkbox
and then you can't run the app on your device as follow.
In Android studio click the app module in the project window and then select Run or you just click on
the play button at the top.
You already know how to do that and that in the select deployment target window select your device and
click ok by selecting the deployment target.
It means this one select deployment target that you will see that day connected device and then you
can run your app and then be connected.
So it says and with studio installs the installs you up on your connected device and started.
You should now see Hello World displayed in the app running your device.
So you already know how to run your app on an emulator.
So that's it.
Thank you very much for watching and I look forward to seeing you in the next tutorial in the next tutorial
you're going to learn how to just download a specific uSwitch driver.
If you cannot find it here inside is a web page and you're going to learn some tricks and tips in order
to run your app on an actual device.
So thank you very much for watching and I look forward to seeing you in the next tutorial.