In this lesson, we learn how to run an app on our PC using Genymotion. Genymotion provides a simple UI that enables us to create and run virtual devices with a couple clicks. Once our virtual device is running, it is just a matter of a couple commands in the command prompt and we can view and test our app on our PC.
In this lesson, we are going to learn how to run ionic on a genymotion virtual device. The first thing we're going to do is to start up genymotion. We need to actually add a virtual device, so we'll go with the Motorola Droid Razr. We'll click "Next."
We'll just leave the default name. We'll click "Next." This is going to deploy the virtual device. We'll click "Finish." Now, we will actually start the virtual device. Now, while this is starting up, let's go ahead and prep our ionic project to actually run on this device.
We'll go into the command prompt. We'll navigate to the project directory, which is projects/ionic-starter. From here, we're going to type "ionic platform add android." This will actually add the Android platform to our Cordova project.
Now that we've installed Android, let's go ahead and check on our virtual device. It is running. Now, let's type in "ionic run android." Now, ionic is going to look for the first available device to run this project on. It's now installing the project on the device.
Once it has completed, we will be able to actually go to the virtual device and see it running. Let's hop over to the virtual machine. We can see here that our ionic project is running. We can actually click through it and interact with it. This is how you actually run ionic on a genymotion virtual device.