Monday, November 18, 2013

From concept to reality in 6 weeks - part 2

Now that I have a Windows 8.1 Pro machine setup with all of the patches, the next step is to get the Windows Phone 8 development environment up and running. Hopefully this is easier than the day I spent on get my new Windows laptop running.

First thing is to get the Windows Phone SDK 8.0. The first decision of the day is to figure out which Microsoft page to use. We have the main download center Windows Phone SDK 8.0. There is also the developer center for Windows Phone SDK 8.0. I choose the one on the development center page as it has an update to support new emulators since SDK 8.0 was released on 30-Oct-2012. I found that date on the main Microsoft download site and realized that it is a year old. That is good for me as that means I am not on the bleeding edge of Windows development, which for me is somewhere I never want to be. The download link is an installer, which was only 1 MB in side so it downloaded quickly. It comes with a Visual Studio Express 2012 Edition. On the developer site it states that the actual download is 1.6 GB, which is the size of the download that the install retrieves I assume. I immediately went ahead and downloaded the SDK 8.0 Update at the same time.

After getting Microsoft Visual Studio Express 2012 for Windows Phone (VSE) up and running, I decided to go ahead and sign up for a free developer account, since the initial download is free for 30 days and then you have to have a Microsoft account. I used the same Microsoft account I signed up for before purchasing the laptop and the same one I use to login to my laptop. To do this, when VSE came up I clicked on the "Joining the developer program" link on the Start Page. Guess what happens when you click that link? I got a Script Error! You have to be kidding me. That brings back bad memories of my past using Microsoft products. I quickly clicked on YES button for the question "Do you want to continue running scripts on this page?". I then see that VSE has loaded the register page in a tab within VSE that is actually an IE window that points to part of the developer Publish tab for the Join the program page.

Next up for me is to get example code as that for me is the best place to get started to learn what I can do. Last week I read up on the API and visual components to Windows Phone 8. It turns out that I can get all of the samples in C++, C# and JavaScript in one place. I need some Nokia map examples as that is the most important thing I must get working this week. I jump over the here.com and look for sample code there. Last week I learned that the big difference between Windows Phone 7 and 8 is the switch from bing.com maps to Nokia here.com maps. Finally some good news, when I see that Nokia here.com map sample source code is available on GitHub. I know how to do GitHub, but have never attempted it on Windows. Things are starting to look up as there is a GitHub client for Windows. The download and install was painless as I already had a GitHub account so I logged in using my personal account. I then skipped back over to the on the Nokia developer page and used the Git URL to download all of the maps samples. So now I have all of the Microsoft and Nokia example source code on my laptop. Now let me load a couple of them and see if I can run the emulator...

It has been around 10 years since I used Visual Studio, so this is going to be like starting all over again. I decided to go back to the Windows Phone 8 page and try to work thru an simple example before I get to crazy with the samples. Instead of a way too boring and overused Hello World example, Microsoft choose to show how easy it is to open a web browser in Windows Phone 8 as their first example. I am just going to reserve my comments on VSE as the initial shock is just going to be too great to want to compare it to the slow Eclipse for Java or Apple Xcode for iOS, which are the only two other IDEs that I have used in the last 10 years. These tools take a while to master and each is different and just takes a while to get used to. Maybe by the end of the week I can make a better judgement call on the differences.

In order to build my first Windows Phone 8 app, I just followed the steps on the page how to create your first app for Windows Phone. All went fine until I tried to run the app in the emulator. I got an error message that I did not have the emulator configured correctly. I guess I missed one of the BIOS settings that I was careful to make sure my laptop supported. Then I tried exit VSE and saw the most meaningful message that I have seen today, a big red (X) icon followed by "0x80131500". That was so helpful it hurts. When I clicked OK on the error dialog, I saw the same "0x80131500" in the Error List at the bottom of VSE. If all else fails, then click on the window close button and everything was magically fixed by closing VSE.

Now I need to check the BIOS settings, so I bring up the instructions on my Mac laptop so I can read them when rebooting my Windows machine and need to check the BIOS settings. I then find the system requirements page and find the page that explains issues with setting up Hyper-V for emulator. Now I have a problem as I have to figure out how to access the BIOS on my Sony VAIO laptop, since the article mentions "", or "" or "" as typical ways to get to the BIOS on reboot. I would prefer not to try multiple times as that is just painful. I head over the Sony's site and find out the PS4 is now available. That is helpful but I don't care. I try "Support" at the top of the page and then select Electronics, since my only options are Playstation or Entertainment. I am clearly not in a playful mode nor do I feel entertained. The only clear choice on the next side pull menu is Product Support which leads me to a very confusing page. Thankfully I know to get the model number for my Sony laptop, so I enter SVF14N13CXB in the box in the middle of the page and hope for the best. At least I am taken to the correct page as I see my computer name at the top Fit 14A / Flip PC. There is a big search box on the right, so I entered BIOS and hope that something pops up that is useful. I click on the top most link and unfortunately for me I see a page with "Permission Denied" in big bold letters followed by "An illegal parameter was received" in small text below it. That was not helpful at all. I went back and clicked on the next link and the same think happened. Then in act of desperation I click on the link to chat with a Sony rep. It takes me to a form that looks simple on the surface, but then I have to enter my product and that is just as painful as it can get. I have a very small box that has tons of options. I search thru the whole list and then pick "Personal Computer", which opens a few choices. I select "Laptop PC" since that is what I believe I have but now computers are getting confusing as I have a laptop that pretends to be a tablet! I am so happy I know the model number as how I get to scroll thru a very large sorted list looking for it - problem is that the list is not sorted alphabetically so it makes it very hard to find. I cannot enter the number so I have to find it in the list, categorized in a way I don't understand. I finally find my model number at the bottom so it must be ordered historically. When I wait patiently for a bit, then I see a dialog popup with the same text repeated five times. I click on the top one and it takes me to something not useful at all as it is a patch to the BIOS and has a date of 10/21/2009, so something tells me that is not helpful since my computer was just released this year. I then decide to give up and chat with someone. I click on the live chat button and then I see a screen that tells me the product I entered does not exist which was a generic series of "SVF14N1SERIES". At least now I am presented with some choices that are close to what computer I have. I find my model number and enter into yet another chat. Hopefully the customer experience will get better now that I am chatting with a real person. I found help within one minute, so at least Sony got that part right. I was told to follow instructions on the BIOS page sent to me thru chat. The only thing I found in the BIOS menus related to the Hyper-V emulator settings was "Intel(R) Virtualization Technology" was disabled under the Advanced menu. I enabled it and then saved the settings and exited, hoping this was all I need to change.


Now that I have conquered changing the BIOS settings, I reboot the laptop and switch to Desktop view. I just cannot remember how to open programs in Desktop mode as I have to find the VSE program to start it again. Since the start menu is gone in Desktop mode and opening Windows Explorer required me to search for a file name, I am kind of hosed. I remembered where VSE saved my project file so I navigated to it and double clicked on the VSE project file in "C:\Users\Rick\Documents\Visual Studio 2012\Projects\MiniBrowser". When I tried to run the emulator it failed again.

I went back into the chat window and refreshed it so I did not have to wade thru their chat screens that prove usability matters and definitely leaves an impression when done incorrectly. I sent the Microsoft link to the SONY support person and he sent me instructions on how to enable Hyper-V on SONY laptops using Windows 8.1 Pro. I tried to following the instructions and found out they did not work as they were Windows 8 Pro instructions and I needed Windows 8.1 Pro instructions. At least the SONY support person waited for me to go thru the steps and the chat window did not expire like with other hardware sales people I chatted with on Friday. That is a good plus for them that is started to out weigh the bad chat screens I had to go thru. After following the instructions with some chat help and rebooting my laptop, I restarted VSE and this time I remembered that I needed to use the search charm and search for "VS E" and it comes right up. When I re-launched VSE, I saw a different error message about permission denied and when I clicked Retry button, a system prompt came up and when I accepted that message, the emulator ran and I see a Windows Phone on my laptop. Success and time to go home!

Day one - get computer working.
Day two - get Windows Phone app running in emulator.

No comments: