What I Learned Building My First 4 Windows 8 Apps

This is a bit of a brain-dump, in no particular order, of things I learned building my first 4 Windows 8 (C# XAML) apps:

- Countdown To

- Big Screen Countdown

- BizBuzBingo

- Code Retreat Countdown

Adding Microsoft Ads to your App

  1. Sign up here: PubCenter
  2. Create a Windows 8 Ad Unit (note the different ad sizes)
  3. Install the Advertising SDK
  4. Add a reference to the ad assembly
  5. Ads the AdControl to your XAML, set the application ID and Ad Unit Id properties to those specified in you ad unit in PubCenter (for testing ads before publication see this DZone article)
  6. Ensure your ad unit control has it’s width and height set to that of your ad unit
  7. Ensure that the app capabilities have Internet enabled (otherwise you wont see any ads show up).

Certification Failure when your App has internet capability

If you app is capable of connecting to the Internet, you must have a Privacy Statement (or link to web based privacy policy) in your app – usually in a custom settings fly-out (from the Settings Charm). You must also have a web-based copy of this hosted somewhere on the Internet as you’ll need to provide the URL to it when you submit your app to the store. If your app has no Internet connectivity enabled, you don’t have to do this.

Easy creation of Custom Settings Flyout UI

Install Callisto. It enables you to easily create settings flyouts see tutorial. It also has some other goodies in the toolkit.

Give Blend a Chance

Expression Blend allows you to design your XAML. I’ve heard a lot of developers find it difficult to use, but it really does make life easier. Even though the XAML design surface in Visual Studio 2012 is so much better than previous versions, I still think investing time learning Blend will pay off.

Testing

Test on a Touch Screen

If you can, test your app on a touch screen or tablet to ensure you understand any usability differences.

Test at Different Resolutions

The Simulator makes it really easy to test what your app looks like at different resolutions.

Testing on an ARM device

Arm devices can’t run Visual Studio, you can however install the Remote Debugger Tools onto your ARM device, and from Visual Studio choose the Remote Machine option in the Debugger dropdown. If your dev PC and ARM device on on the same subnet, it should show up in Visual Studio, otherwise you may need to use an IP address. Make a mental note of any slower performing parts of your app to see if any performance optimisations are required.

Get Someone Else to Use your App

Watch someone who is new to your app (assume they know Windows 8 though) and observe what they do, and where they seem to pause or get stuck. Doing this revealed a usability problem with Countdown To that I will need to fix in a future release.

Respect the Microsoft Design Language (aka “Metro”)

For your first apps (unless your are an experienced designer, or have one helping you) you should stick to the basic UI. You will probably think it looks boring and be tempted to add some colours and gradients and borders and other awesome stuff: don’t. You can always do a future release add add some design pixie dust. I’m not saying never add colour or designed elements or break some of the design principles, but probably refrain from doing so for your first app.

Debug Your App When It’s Launched from a Secondary Tile

If you have secondary tiles and you want to debug how your app starts up when launched from one: open your app solution in Visual Studio, go to Debug Menu –> Debug Installed App Package and check the “Do not launch, but debug my code when it starts” box. Now go to your start menu and launch your app from a secondary tile, Visual Studio will now start debugging.

Lock Screen Badge PNG

If your app runs on locks screen and has a badge, make sure the badge.png (or whatever filename you choose) has only pure white or transparent pixels, e.g. no antialiasing, otherwise it will fail certification.

WACK It

Windows App Cert Kit (aka WACK) runs some of the same tests that get run when you submit your app to the Store. It will tell you early of any basic certification failures, rather than waiting to submit your app and wait days to find out there is a problem.

Don’t Use Blank Page Template

In Visual Studio, don’t use the Blank Page template as you will have to do loads of manual work for dealing with snapped, landscape etc. states. Instead use on e of the other templates such as Basic Page: although these templates have a lot in them and can be overwhelming at first, they will save you time in the long run. You also get a (albeit basic) View Model to bind to in your XAML if you wish to use it.

Executing a Background Agent When A User Logs On

If you need a background agent to run when a user logs on, for example to update some tiles, you can register your agent with a system trigger called UserPresent.

RegisterBackgroundTask("BackgroundTileUpdaterAGENT.SuperAgent2",
                    "CountdownToBackgroundAgentSystem",
                    new SystemTrigger(SystemTriggerType.UserPresent, false), 
                    null);

Setup Your Tax & Payment Info

Before submitting your first app, ensure your account is fully set up, otherwise when you submit your app it looks like it gets stuck in the “Pre-processing” phase until you do.

The Kitchen Sink Army Knife

Be mindful of trying to put too much in a single app or implement every single feature you can think of for release 1. Instead think of the best, most major features and implement those. If your app is popular then you can spend time and add the kitchen sink later.

 

(If you’re developing a Windows 8 app and you’d like to learn more about how to choose features for version one of your app, etc check out my Designing Windows 8 Apps Pluralsight course.)

SHARE:

Comments (3) -

  • Martin

    12/19/2012 9:46:03 PM | Reply

    Awesome article, bookmarked.

    To add to your last time about adding all your features in Release 1 ... also make sure when you release your minimum viable product in Release 1, if it fails certification, don't add any new code/features.  Just fix the issue and resubmit.  

    I submitted my first app, it failed because I didn't have a privacy policy, then I submitted again and added a sharing feature, it failed for not having the right age (if you allow sharing, it must be 12&over), then I resubmitted, and it failed the privacy policy again.

  • Michael L Perry

    1/21/2013 12:40:37 AM | Reply

    Thanks for posting this quick reference so others can learn these lessons without going through the pain.

    I use the blank template for my apps, because I don't use most of the extra stuff that the other templates add. But you make a good point about the orientation changes. I'd like to see a template that just solves that problem, but doesn't bring in all the cruft. Maybe I'll make a NuGet package for that.

Pingbacks and trackbacks (1)+

Add comment

Loading