Welcome again! Today I'll talk about the Windows Phone 8.1 Emulator. To test and run your application, the Windows Phone Emulator gives you a lot of flexibility and many cool features. I've seen other development environments but Visual Studio is the best Integrated Development Environment (IDE) in the Universe. The Windows Phone Emulator is a virtual mobile image inside your PC. It's really cool to work with it. So let's get cracking in Windows Phone Emulator.
Running the Emulator
If you open a new project or an existing project, you can run the application from here.
Figure 1
You can see that, there are various types of Emulator Images with varying resolutions. You can choose any of them and test your application to verify whether it works well or not.
If you look at the Emulator, it is just a full-featured Windows Phone 8.1 but it doesn't have some sensors or you can't make any call from it. But it gives a real demo of running your application in your Windows Phone.
Figure 2
Emulator Tools Options
You can see that, there is a menu bar at the right side of the emulator and if you press back, search and other buttons then it works just the same as your personal Windows Phone.
If you click on the double arrow at the bottom of the menu bar, another window will pop up.
Figure 3
Accelerometer
There're some tabs in this window, the first one is the “Accelerometer” tab. If you're working on a project that has the functionality of an “Accelerator” then you can test your application via this tool.
Figure 4
You can change the orientation of the device and see the changes depending on the coordinates.
Let's do some experiments on this. I'm just showing a simple example of this. Just have a look at the picture below.
Figure 6
By just changing the orientation of the “Accelerometer”, the application itself changes its orientation as well and here the example gives the acceleration data in the Alert Box. I've used a PhoneGap application here. You can find it in our PhoneGap (Cordova) Part 2 section.
You can also change the Orientation types from the Tools also.
Figure 7
You can see that, now the visual state has changed in the “Portrait Flat” mood.
Location
The second tab is the “Location” section. It's very important and helpful indeed. If you don't have any real device or Windows Phone and you're working on a Geo-locator, Map or any location based service then you can test your application via this control window. It has some features that will blow your mind and I myself find it very helpful when working on a location based project.
Figure 8
You can add a Pushpin from here and if you run the Map application, it assumes, this is your current location and if you change it then it'll update eventually.
You can also save your location from here.
Figure 9
And when you need, you can also load your saved location data from the right button of the “Save Map Points” buttons. It greats a “XML” file that contains the “Latitude” and “Longitude” of your location.
Figure 10
You can save it anywhere on your hard drive, but by default you can find it in Documents >> Windows Phone Emulator >> Location folder.
You can also test the direction between two points and test it when navigating if you use the navigation service in your application.
Figure 12
Put two Pushpins where you want and then hit the “Play” button and you can see like this.
Figure 12
You can see that a point is moving through the route, you can also set the speed limit from here.
Screen Capture
Another feature is taking a “Screen Shot”. It's really awesome and you must have to use it when submitting your application to the store. You need to take several screen shots to provide a proper view of your application to the users.
Figure 13
Save the image anywhere you want. By default it's a “png” format image and Windows Phone Store doesn't support “jpeg” format. So it's really helpful.
Network
The last important tab is the “Network” section. You can see your network information, the emulator's physical address and some other information that will help you to configure if you're using a wireless network or cable network.
Other Options
There are some other sections like “SD Cards”, “Notifications”, “Checkpoints” and “Sensors”. You can explore this section if you want, but the previosu four sections are the most important. I recommend you to test your application in your real device if you're using any sensors. Because then you can understand the performance of your application.
Emulator Tools Names and Functions
These are the basic options of the emulator.
Figure 14
You can fit your Emulator window as needed.
Figure 15
It'll help you if you're working on a big screen as well as a small screen.
Device Configuration from Visual Studio
Moreover you can test the theme of your application like “Dark” or “light” and also change the Accent Color.
Figure 16
You can find this option in the left side of the Visual Studio on the “Device” tab. You can also change the device resolution and orientation from here.
Summary
So, that's pretty much about Windows Phone Emulator. Working with the emulator and understand its functionality is important as well as designing your application. the Windows Phone emulator gives many features for testing your application. I hope you can find it helpful. I'll be here with a new topic soon. Until then good bye. Have a nice day.
Happy Coding!