Posts mit dem Label Mobile werden angezeigt. Alle Posts anzeigen
Posts mit dem Label Mobile werden angezeigt. Alle Posts anzeigen

Mittwoch, 13. März 2013

Checking for a new version from your Windows Phone 8 App with Azure Web Sites


HomeScreenPhoneAre you as surprised as I am when it comes to discoverability of available app updates on Windows Phone? As you read this blog I assume you know all available updates are announced through the marketplace app on the phone. When you pinned the marketplace app on your start screen or you are opening the app fairly often you will notice when an update is available. Imagine though you are one of the – you know – normal consumer. I bet only a tiny portion of all users have pinned the app on the start screen. So it’s damn hard for those people to even recognize an update being available. They will never – or only very unregularly – update your app.
iOSAppStoreWithUpdateOn iOS it all looks a bit brighter. “Notification marker” are displayed regardless of the icon size, although we have to admit there is only one size on iOS anyway. On the other hand that makes the story easier. A consumer does not need to know that an app can only show some sort of news/notification/update when it is pinned as a tile to the home screen. Do you get the idea? On iOS you can always tell by looking at the App Store icon if there are updates available. On Windows Phone you need to have the Marketplace App pinned to the home screen.
How can we fix that you may ask. We can improve the discoverability of available updates for actual users of your app through actions a developer can take when the app starts. All it needs is to check somehow if a newer version of the app is available, preferably when the app starts. If a newer version is available the user should be asked if he wants to go straight to the marketplace to obtain the update.
One place to check for the latest version is a plain text file stored somewhere on the interwebs that holds the current version number to check against. You may ask where to store that file. Well the easiest and cheapest way is a Windows Azure Web Site. Remember you get up to 10 web sites for free. A perfect place to store just a single txt file.

Setup a Web Site on Windows Azure

Sign up for a pay-as-you-go subscription on Windows Azure. That plan allows you to create 10 web sites for free. As this web site will only contain a single file, we don’t need any database setup.
AddWebSite1
On the details –> dashboard page for that just created web site, you’ll find the ftp hostname. For most users that use that tool for the first time, it is usually necessary to reset the deployment credentials in order to create a deployment / ftp user. Just click on the “Reset deployment credentials” and choose a username and password. Those are not related to your azure account.
In order to upload a file to the web site, open your ftp tool of choice (I use filezilla), enter the ftp hostname as server and your deployment / ftp user and password accordingly. Create a version.txt file that contains just the latest version number of your app and put that under root in order to access it under [yourwebsitename].azurewebsites.net/version.txt. Try in a browser to see if the file is reachable.

Check for the latest version from your app

UpdatePopupAs you’ve now setup an accessible file that contains just the latest version number as plain text, it’s time to check from your application to see if the currently running app is the latest version. To make things easy enough, I’ve created a component called “UpdateReminder” that you can use in your app that does exactly that. It’s open source and on GitHub. For ease of use I’ve created a nuget Package that you can pull into your app from nuget by the name WPUpdateReminder.
What it basically does, is retrieving a file from a specified location on the web and check whether the content is the same as a provided string. If they differ it’ll ask the user to go straight to the app page in the marketplace to update the app or dismiss the dialog. To avoid to have too much traffic on the site and bothering the user too much, you can specify after how many app usages it rechecks for a new version.


The setup is a peace of cake and only requires a couple of lines of code in your Main page.


You may ask how the app knows how many times it ran in past. That is done via a XML file. Every time the app runs that number is increased and saved in that particular xml file on the phone. Have a look at GitHub to see the implementation and please give feedback about what you (dis-)liked about the solution.

Mittwoch, 10. Oktober 2012

What is the current state of mobile app development as of 2012?

Mobile apps are the new kids in town when it comes to software development. Most of us - including myself - come from a corporate business background. We know how to design, build, test, deploy line of business apps. They usually get paid reasonably and we don't see ourself in discussions around the way and art of selling the software, designing it or choosing a platform. The mayority either builds web application, where your platform choice does not affect your end user, since all web server spit out HTML and Javascript, or desktop application, where Windows is the dominant platform that rules them all.

With the introduction of the mobile apps store concept, we are being handed a hot, new opportunity to get our hands dirty and a lot of questions that comes with them. In this post I am trying to paint a picture of the current state of mobile app development as of 2012 and will try to find some possible opportunities or duties for us as an industry to work on in the near future.

Let's start with the complexity about deciding for which platform you are going to build apps. There are basically two alleys you can take; either create native or browser apps. The native approach leads to another  even more religiously debated question: which app store do you choose.

Native app development

To make a reasonable decision for which platform to develop, each of us has to decide for itself what are her or his goals. If you love your platform your are currently on, go ahead and stick to it. If you want to try something new, go the other way - invest a bit in hardware if that is necessary - and pick the platform you would like to try. For all the rest, I would say it is save to go with the figures and decide based on the numbers what the most attractive platform is right now. No one wants to see his investment going down the sink, because the platform has died away - as Blackberry as of 2012 is appearing.

The IDC [1] has a pretty compelling statistic about market share and sold units - which I find even more interesting as those numbers seem to predict the market share for the next 6 - 12 months going forward.

Operating System Q2 2012 Shipments (Million units) Q2 2012 Market Share Q2 2011 Shipments (Million units) Q2 2011 Market Share Year-over-year Change
Android 104,8 68.1% 50,8 46.9% 106.5%
iOS 26 16.9% 20,4 18.8% 27.5%
BlackBerry OS 7,4 4.8% 12,5 11.5% -40.9%
Symbian 6,8 4.4% 18,3 16.9% -62.9%
Windows Phone 7 / Windows Mobile 5,4 3.5% 2,5 2.3% 115.3%
Linux 3,5 2.3% 3,3 3.0% 6.3%
Others 0,1 0.1% 0,6 0.5% -80.0%
Grand Total 154 100.0% 108,3 100.0% 42.2%

If we break that out into the market share as of Q2 2012 and the Year-over-Year change from 2011 to 2012 in percentage, we can see 3 main platforms coming out of that: Android, iOS and Windows Phone.


Especially the year-over-year change from 2011 to 2012 creates a clear statement that Blackberry, Symbian and all the rest is just dying out at the moment and Android, iOS and Windows Phone gain a lot of traction.


It is a pretty good bet to go with either Android, iOS or Windows Phone, although the latter only has a good prospective as growth is high. The market share still lacks behind Android and iOS.

All stores platforms take for a revenue cap care of payment, infrastructure, marketing and - arguably - discoverability.

Browser app development

The story of browser apps is told very quickly. They are ubiquitous as all laptops and smartphones come with a browser to run HTML and Javascript. Since there is no store concept for browser apps, we as a developer have to do the heavy lifting ourself and don't get the features of a common app store like payment, infrastructure, marketing and discoverability.

This is an ongoing series of posts about the current state of mobile app development. The following articles will cover topics including revenue model, app marketing, lack of current app stores and resulting possibilities for developers and regional differences.

[1] http://www.idc.com/getdoc.jsp?containerId=prUS23638712