Archives For Windows phone

The essence of enterprise mobility is the secure extension of the critical data from an organization’s back end systems out to the mobile devices used by employees. Windows Phone is an enterprise-class smartphone with the capabilities needed to empower employees to create an agile, real-time enterprise.

At TechEd Europe, I walked the delegates through all the elements required to build an end-to-end mobile line of business solution. I demonstrated how to use SQL Server 2012 and IIS as mobile middleware where SSIS adapters facilitate the aggregation of data from multiple back end systems and the ASP.NET Web API exposes that data via wireless-friendly, REST + JSON web services. From there, I demonstrated how to securely publish that data out to the Internet without the need for a VPN using UAG. I wrapped things up by showing how Windows Phone apps can consume data and store it offline so employees can continue to be productive in the absence of network connectivity.

Chech out the video below to see how you can mobilize your enterprise with the Microsoft Mobile Enterprise Application Platform (MEAP):

 

As always, let me know how I can help you achieve your goals in the enterprise mobility space.

Best Regards,
Rob

Windows Phone 8 Emerges

June 20, 2012 — 5 Comments

The first glimpse of Windows Phone 8 emerged in San Francisco today.

Joe Belfiore, Terry Myerson, and Kevin Gallo took the world on a tour of Microsoft’s next smartphone.  I’m confident that Windows Phone 8 will leapfrog our smartphone competitors so dramatically that they’ll never catch up.  Before diving into the highlights of today’s Windows Phone Summit, just take a look at our beautiful new Start screen:

Windows Phone 8 Tiles

Windows Phone 8 is just Gorgeous!

I’m going to get you up to speed with our new phone as rapidly as possible, so hold on to your seat!

  1. Shares Windows 8 core > Kernel > Networking > Filesystem > Multimedia > Driver model > Security > Graphics
  2. Multi-core chipsets > Dual core coming this Fall
  3. More screen resolutions > WVGA > WXGA > 720p
  4. MicroSD cards > Removable storage for pictures, music > Sideload enterprise apps
  5. IE10 > Same as Windows 8 > 2x the HTML5 support and 4x JavaScript performance > App cache > IndexedDB > SmartScreen Filter
  6. Native Code > C/C++ for killer games with DirectX
  7. NFC > Sharing > Tap to pay
  8. Wallet > Credit cards > Coupons > Secure SIM > In-app purchasing
  9. Nokia Maps > Offline maps work without data connection > Turn by turn
  10. Enterprise > BitLocker > Secure boot > Device management > Private app distribution (on prem/cloud) > App sandboxing
  11. Start Screen > More tile sizes > S|M|L > More colors > More personal
  12. WP7/7.5 apps will run unchanged on WP8
  13. XAML/C#/VB apps > Compiled to machine code in the cloud to boost performance > Same for existing 7/7.5 apps
  14. SQLite open source libraries are available for Metro apps on W8 and WP8
  15. Multitasking > More things can run in the background > Location > Navigation
  16. Voice and Video > Integrated into platform > Just like traditional calls >  Accessible to developers
  17. Speech > Developers can add conversational speech to their apps
  18. Visual Studio 2012 > Single IDE to create Windows Phone 7/7.5/8 apps and games
  19. Hybrid apps > Browser control based on IE10
  20. Company Hub > Example of private app distribution > Self-service IT
  21. SDK > Available later this summer
  22. Launch partners > Nokia > Samsung > Huawei > HTC > Silicon from Qualcomm
  23. Global platform > 50 languages > Full RTL (Hebrew, Arabic)
  24. Software updates > Over the air (OTA) > No more tethering > Device updates for 18 months after launch
  25. Marketplace > 100,000 apps > 180 countries
  26. Upgrade > Existing WP7/7.5 devices are not upgradable to WP8 > Sorry > Next-Gen hardware needed
  27. Consolation Prize > Your existing WP7.5 device will get upgrade to WP7.8 > Gets  beautiful new Start Screen tiles
  28. Nokia > Updates to current Lumia devices > DLNA > Data/Voice usage counters > Music > Camera Extras > Nokia Drive

Let’s take one more look at our new Windows Phone 8 Start screen:

Windows Phone 8 Tiles

I hope you’re as thrilled as I am about Windows Phone 8!  Our journey begins today.  To learn more, join me and other members of the Windows Phone team in Amsterdam next week at TechEd Europe.

- Rob

Now that I’ve spent the last two articles helping you to get your Metro user experience foundation created with CSS3 and Media Queries, it’s time to jump into one of the features of HTML5Geolocation is perfectly suited for smartphones because location awareness is something they all have in common.  Most people are under the impression that only native mobile apps have the power to reach into the platform APIs and retrieve a device’s current location.  Luckily, with modern HTML5 browsers like Internet Explorer 9, web pages can use JavaScript to gather this same information.  This API finds your location via the following methods:

  • GPS:  This is the most accurate method but it requires you to be outdoors and has a reputation for draining batteries.
  • IP Address:  There’s a location database that maps IP addresses to locations which may or may not be accurate depending on how far away your DHCP server is from your current location.
  • Wi-Fi:  This also maps IP addresses to locations but also triangulates between Access Points.  It works indoors and may be relatively accurate.
  • Cell Tower Triangulation: This also works indoors and can be fairly accurate depending on how far apart the closest cellular towers are.

Let’s take a look at a simple page containing HTML and JavaScript:

<!DOCTYPE html>
<html lang=”en”>
<head>
    <meta charset=”utf-8″ />
    <meta name=”viewport” content=”width=device-width, initial-scale=1.0, user-scalable=yes” />
    <meta name=”MobileOptimized” content=”width” />
    <meta name=”HandheldFriendly” content=”true” />
    <link rel=”stylesheet” href=”MetroLight.css”>
    <title>Geolocation</title>
    </head>
<body>
<p>CONTOSO TRACKER</p>
<h4>Simple Geolocation</h4>
<form>
<fieldset>
<legend>Track</legend>
<button type=”button” id=”locationButton” onclick=”getPosition()”>Get Location</button>
</fieldset>
</form>
<script>
function getPosition() {
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(displayLocation);
}
else {
alert(“No Geolocation Support”);
}
}
function displayLocation(position) {
var latitude = position.coords.latitude;
var longitude = position.coords.longitude;
alert(“You’re at Latitude: ” + latitude + “, Longitude: ” + longitude);
}
</script>
</body>
</html>

As you can see, I’ve taken our HTML5 + Mobile Web boilerplate and included the Light Metro stylesheet to get started.  Beyond that, it’s just a simple button designed to call a JavaScript function via the onclick event.  For the sake of this example, I’ve done the unthinkable and have included the JavaScript inside the web page.  Please never to this in production.

The onclick event calls the getPosition() function.  The first thing you should notice is a bit of defensive coding where I test to see if the navigator.geolocation capability exists.  If the target browser allows me to pass that test, I then call the getCurrentPosition() method and pass in a single arguement for the successCallback parameter.  Don’t worry, I’ll dive into the other two parameters in the next article.

The displayLocation callback function is called once the device passes the coordinates back to the web page.  After that, it’s a simple matter of retrieving the latitude and longitude values.

This first image below shows you what the mobile web page should look like when you run it on Windows Phone 7.5:

Geolocation Page

You should see the now-familair Light Metro UX.  When you click the Get Location button, IE9 will popup a dialog asking your permission to allow the web page to access your location from Windows Phone as shown below:

Geolocation Allow

This should give you comfort in knowing the Big Brother cannot anonymously track you.  You can say Yes or No for each Geolocation request and you can check the checkbox to remember your choice for this particular web page.  Once you’ve said Yes, the device will give you a lat/long as shown in the image below on the left:

Geolocation Coordinates

In order to more easily test this on my PC with Visual Studio 2010 running, I used the Windows Phone emulator, plus the additional tools you get with the Windows Phone 7.1 SDK.  By clicking on the Location tab, you can then click on the Bing map to get a Pushpin in a particular location.  The coordinates for the pushpin are displayed in the Current Location section which should match what you see in the emulator.  That’s all there is to it!

Congratulations!  You can now get lat/long coordinates without building an app.

Keep coding,

-Rob

 

In my last article covering HTML5 and CSS3 on Windows Phone, I got you started with a simple boilerplate.  It just so happened that the style I presented you with was Dark.  Since we know that Windows Phone also has a light theme, I think it’s important that your mobile web site have one as well.  Below is an enhanced version of the boilerplate HTML5 file that displays many commonly used Form elements:

<!DOCTYPE html>
<html lang=”en”>
    <head>
        <meta charset=”utf-8″ />
        <meta name=”viewport” content=”width=device-width, initial-scale=1.0, user-scalable=yes” />
        <meta name=”MobileOptimized” content=”width” />
        <meta name=”HandheldFriendly” content=”true” />
        <link rel=”stylesheet” href=”MetroDark.css”>
        <title>Web Storage</title>
    </head>
    <body>
        <p>CONTOSO FRUIT COMPANY</p>
        <h4>Enter Products</h4>
        <form>
            <fieldset>
                <legend>Add</legend>
                <label id=”ValueLabel”>Product Name:</label>
                <br />
                <input id=’ValueInput’ type=’text’ />
                <br /><br />
                <label id=”StateLabel”>States:</label>
                <br />
                <select name=”states”>
                   <option value=”Washington”>Washington</option>
                   <option value=”Florida”>Florida</option>
                   <option value=”California”>California</option>
                </select>
                <br /><br />
                <label id=”RefLabel”>Refrigerate:</label>
                <br />
                <input type=”radio” name=”refrigerate” value=”yes” /> Yes
                <input type=”radio” name=”refrigerate” value=”no” /> No
                <br /><br /><br />
                <button id=’insertButton’>  Add Product  </button>
            </fieldset>
        </form>
    </body>
</html>

Here is the Dark CSS file that accompanies the above HTML5 file:

@media screen and (max-width:480px) {
    body {
        font-family: “Segoe WP”, Tahoma, Geneva, Verdana;
        background-color: #000000;
        color: #ffffff;
        padding: 5px;
    }
    h1, h2, h3, h4, h5, h6 {
    font-family:”Segoe WP Semibold”;
    margin-bottom:5px;
    }
    h1 {
    font-size: 48pt;
    }
    h2 {
    font-size: 40pt;
    }
    h3 {
    font-size:32pt;
    }
    h4{
    font-size:24pt;
    }
    h5 {
    font-size:20pt;
    }
    h6 {
    font-size:18pt;
    }
    p {
    font-size: 14pt;
    }
    input, select, button {
        color: #ffffff;
        background-color: #000000;
        border: 2px solid white;
        vertical-align: baseline;
        font-size: 17pt;
        min-width: 40px;
        min-height: 40px;
    }
    label {
    vertical-align:baseline;
    font-size:17pt;
    }
    input.hasfocus {
    background-color:white;
    color:black
    }
    fieldset, legend {
    font-family:”Segoe UI Semibold”;
    font-size:12pt;
    }
    fieldset {
    padding:12pt;
    border: 1px solid white;
    }
    legend {
        color: #ffffff;
    }
}

The combination of a mobile-optimized HTML5 page and a Dark Metro CSS3 stylesheet results in a familiar UX designed for AMOLED displays:

But what if you want to display a light mobile website?  Luckily, you get to use the same HTML5 page and just point to a new, Light Metro CSS stylesheet as shown below:

<link rel=”stylesheet” href=”MetroLight.css”>

So what does this new CSS file look like?  A lot like the dark one with some subtle changes:

@media screen and (max-width:480px) {
    body {
        font-family: “Segoe WP”, Tahoma, Geneva, Verdana;
        background-color: #ffffff;
        color: #000000;
        padding: 5px;
    }
    h1, h2, h3, h4, h5, h6 {
    font-family:”Segoe WP Semibold”;
    margin-bottom:5px;
    }
    h1 {
    font-size: 48pt;
    }
    h2 {
    font-size: 40pt;
    }
    h3 {
    font-size:32pt;
    }
    h4{
    font-size:24pt;
    }
    h5 {
    font-size:20pt;
    }
    h6 {
    font-size:18pt;
    }
    p {
    font-size: 14pt;
    }
    input, select, button {
        color: #000000;
        background-color: #ffffff;
        border: 2px solid black;
        vertical-align: baseline;
        font-size: 17pt;
        min-width: 40px;
        min-height: 40px;
    }
    label {
    vertical-align:baseline;
    font-size:17pt;
    }
    input.hasfocus {
    background-color:white;
    color:black
    }
    fieldset, legend {
    font-family:”Segoe UI Semibold”;
    font-size:12pt;
    }
    fieldset {
    padding:12pt;
    border: 1px solid black;
    }
    legend {
        color: #000000;
    }
}

With the Light Metro stylesheet, you now have a look and feel that’s reminiscent of the Outlook experience on Windows Phone.  With the black and white colors reversed, you get the following:

So there you have it!  You started with a simple HTML5/CSS3 boilerplate and now you’re building mobile web apps with both a Dark and Light Metro UI.  All the touchable elements are large enough for big fingers and the separation between controls ensures that users won’t hit two at the same time.  Consider this your foundation for a new HTML5 journey that you’ll be taking with Me, Internet Explorer, and Windows Phone.

Keep coding!

Rob

 

 

I’m excited to pass along the great news that our very own Windows Phone 7.5 is a 2012 Interaction Award winner!  In a field of over 300 entries from 33 countries, the compelling UX of Windows Phone stood out.  Our elegant integration of social networks, the Metro design language of color and typography, and the minimalist concept of fierce reduction won the day.

The Interaction Awards is an initiative of the Interaction Design Association (IxDA), which is a global network of over 25,000 members worldwide dedicated to the professional practice of Interaction Design.

Well done Windows Phone!

-Rob