Sunday, December 23, 2012

Marketplace Dashboard upcoming update

I'm hard at work on v1.4!  I discovered a few bugs on background and live tile updates, and the app wasn't saving the number of days back to go.  My biggest addition is reading full download stats!  It can show you how many paid vs. trial per app now.  Also, lots and lots of stability and optimization fixes throughout.  Should be ready any day now!

UPDATE: Well, obviously this hasn't made it out yet.  I've had it through certification several times now and I'm waiting for it again.  They seem to have trouble testing it since it requires an active Marketplace account (you'd think they could manage!), and then my last submission somehow made a "forbidden" function call all of a sudden.  Grr...  Hopefully better news soon!

Saturday, December 22, 2012

Clearing the back stack in Windows Phone

With the new Windows Phone 8 Fast Resume feature (so cool!), I had a problem when launching the app from a secondary Live Tile.  Since the tile had a deep link, it would resume the app and open the deep link.  Sounds fine, but if the user then clicked the Back button, it wouldn't exit (as expected).  Rather, it would go back to where they were the last time they were viewing the app!  It turns out the quick fix is to run through the back stack items in NavigationService.  Of course, simply calling GoBack() is a bad idea since that would mess cause a flicker at the very least, so instead notice the new method: RemoveBackEntry().  This clears the last item from the back stack without showing anything!  A simple while loop can now remove all the back entries:

while( NavigationService.CanGoBack ) NavigationService.RemoveBackEntry();

Voila!

Monday, October 22, 2012

I'm going to Build!

Wow.  I had completely counted it out, but I just got an email confirming an opening for registration for Build.  I hopped right on and snagged a spot, assuming it would fill up again quickly!  I'm officially registered now, so I'm really looking forward to next week.

Anyone else I know going?  Let me know!  I'd love to hang out.

Great article about WinRT

If you haven't started WinRT development in earnest yet, you have only a partial notion of what it is and how it works.  If you've been working with it as a newer developer, you may not be aware of the overall context of the system.  If you are a more seasoned developer, primarily accustomed to .NET, you may not fully understand how it fits together in the broader Windows ecosystem.
WinRT is a brand new paradigm for developing apps due to its rethinking of the environment, but it's not a totally new product either.  Read this article by Peter Bright/Ars Technica to get an amazingly in-depth (and correspondingly long!) take on the evolution of Windows and how it leads to WinRT.  It's a great read!

Link: Turning to the past to power Windows' future

Monday, October 15, 2012

Finally published!

After working at it for over a month, the newest version of Marketplace Dashboard is finally live!  Download it now and give it a try!  It's a great way to monitor your app downloads and crashes.  Now with live tiles support!

Link: Marketpace

Friday, September 21, 2012

Limited Windows Phone 8 SDK Preview

I didn't make it.  So frustrating!  No one knows what the criteria really is.  I have 8 apps with a total of almost 120,000 downloads.  I'm sure there are many people with much higher numbers, but it's something!  I'd say that maybe it's only the high-profile studios, but it seems that MS would reach out to them privately then.  Such a tease!  They need to get people to sign NDA's and get it out there!

Sunday, September 16, 2012

Still Frustrated!

I'm still waiting to see if Marketplace Dashboard. I actually left a note for the reviewers -- something I haven't done yet. I begged them to let me know if there were challenges during testing! Since you need to have an active Marketplace account to use it, I imagine it's difficult for their testers. I hope they can find a way to certify it -- especially since they did it somehow with the original version!

Thursday, September 6, 2012

Windows Phone 8 SDK

I’m tired of waiting!  According to the Nokia press conference yesterday, developers may be able to get the SDK next week.  It seems that you must have apps in the marketplace already in order to qualify, but I’m not even sure if that’s the only requirement.  Considering the leak from a few months ago (which I never got) it seems like they must be close enough for developers to start working on their apps.  I want as much time as possible to get my apps updates, but also to write apps that use the new features.  Voice to text, text to voice, protocol handlers to invoke other apps, lenses, the Kid’s Corner, more available working memory, full Bluetooth integration, and greater platform access should combine to make an amazing developer experience (not to mention better apps for end-users!).  I really hope that I’ll qualify next week, and that I won’t have to then wait even longer until actually getting the bits!  Sound off if you are also excited, and what features you are most waiting for.

Tuesday, September 4, 2012

Low memory phone performance



So, the Marketplace Dashboard update almost made it through testing!  The biggest problem turned out to be it's performance on low-memory phones like the Nokia Lumia 610.  I was surprised since I knew that it ran fine, but it ended up being more subtle than that.

First of all, you should know that background agents won't run with 256MB phones.  For that reason I was already hiding the option for that on those devices (and feeling pretty smug about it!).

Lumia 610 (256MB RAM)
Second, with low memory, not as many things can run in parallel.  Due to the way apps are exposed on the Dev Center, I have to make a service call for each one.  On a 512MB device, I can run 10 threads concurrently and it goes pretty nicely.  On the 256MB device, the threads queued up the same way, but with them running in parallel they went so slowly that the timeout value often ended up being hit.  To make it worse, it ran just fast enough in the emulator.  We developers are supposed to keep in mind the difference between the emulator and a real device, but it's not necessarily obvious how to account for it.  Since I don't have a low-memory device, I had to trust the emulator.  Since it worked, I assumed the best!

Bottom line, it's not just peak memory that you need to worry about.  With less memory, things can run slower.  If you are using timeouts, you should probably increase those too.  Unfortunately, that part's going to be hard to test on the emulator.  You can only do your best though!  Being aware of this might save you some frustration later.

Friday, August 31, 2012

Bring a Windows 8 app idea to life!

Windows 8 will show up at retail pretty soon!  If you haven’t started developing apps for it, get a start on it now.  Get some help to guide you from concept to app.  They have lots of tips and tricks, access to an architect, and a design consultation.  Sign up now!

Link: Your idea. Your app.  30 days.

Weird icon glitch

How very strange!  I now see that Netflix is the secret host for SkyDrive, Slashdot owns my downloads, and Facebook knows my every recent place!  Scary world we live in…

image

Sunday, August 26, 2012

Marketplace submissions

I've submitted updates for both Marketplace Dashboard and Gallery Downloader:

Marketplace Dashboard now has full Mango support (finally!) so it will do fast resume, but also has a background agent for Live Tile updates and even notification when an app gets published.  In the app you can view number of downloads and crashes like before, but also see day-by-day downloads and crashes, and you can pin a live tile for specific apps to see updated info.  Secondary live tiles are only available on 512MB devices (shouldn't affect many devices yet...) and only to paid users.

Gallery Downloader has a bug fix update for some crashes that were occurring sporadically if you double-clicked the Back button by mistake after downloading images.  It's annoying how many safeguards are needed to prevent problems like that!

Both updates should be live in another day or two.  Enjoy!

Saturday, August 25, 2012

Will Windows Phone 7 Apps Run On Windows Phone 8?

I had been under the impression that the new Windows Phone 8 app model wouldn’t support “classic” Windows Phone 7 apps.  From various rumors, it seemed that it might be based on WinRT (which would be good) and Silverlight would no longer be an option (not as good).  This seemed like a dumb idea due to the zeroing out of the Marketplace, but I thought maybe it was the price to pay for moving forward.  Now I notice that when I submit an app update using current phone tools, I appear to get Windows Phone 8 compatibility for free!  Interesting, interesting…

 

image

Marketplace Dashboard Frustration

For any Windows Phone users out there reading this, I have a new version of Marketplace Dashboard ready to go, except I’m fighting some dumb issues for certification.  I knew that there were things that I couldn’t do in a scheduled agent, but it turned out that the scheduled agent can’t even reference an assembly that does banned things in it!  That means I need to do some refactoring to get this going.  Hopefully just a few more days to a fast-switching, background agent, secondary live tile enabled update!  Stay tuned…
Live tile demo

Friday, August 24, 2012

WinRT, Async, and .Net

I'm loving WinRT so far.  It's a beautiful way to develop modern apps.  It's the biggest and best change to come to developers in some time.  I won't talk about lock-down, the Windows Store, or Windows 8 paradigm shifts in general today, but I will talk about WinRT, Async, and .Net!

The Async Framework came before WinRT of course, but its amazing integration has come with the new framework.  I love the fact that all of the potentially blocking methods are now exposed as asyncronous methods.  The IAsyncOperation return type, which is returned from these methods, can be easily awaited to avoid the hassle of callbacks, and for .Net integration, you can always use the AsTask() extension method (though you'll often not need to).

Background operations often require two important things: the ability to cancel them from other threads, and the ability to report progress.  Both of these needs are easily addressed using the CancellationToken object and IProgress<> interface.  Strangely, from .Net you need to first get the Task adapter, but then you can just pass the CancellationToken to operations, and then call Cancel() method from another thread (often the UI thread).

Progress is a little bit trickier since most framework methods don't have direct support for it.  Adding progress reporting to your own methods is almost trivial though.  Instead of being limited to simple integer-based progress (like in the older BackgroundWorker class), you can use anything you want since you create your progress handler with a generic type.  You can simply return a string to directly display, a number out of 100, or a complex custom object that reports per-item, batch-level, and other information in each report, then write your own code for what to do when the reports come in.

Handling cancellation in your own methods works one of two ways: you can either check to see if cancellation has been cancelled and clean up before throwing the TaskCanceledException, or call the ThrowIfCancellationRequested() method if you don't have any last requests.

The await and async keywords are some amazing compiler trickery.  Having written callbacks for asynchronous code for years, it's so refreshing.  There's just a tiny bit of mind-bending the first time, but the picture becomes clear pretty quickly!  Basically, ignore the async part of it all unless you have special needs. You can always choose not to await, or to wait on more than one operation to complete, or to wait until the first of a group of operations completes, but even these special cases don't really mess things up.  Once you learn the new commands you'll be productive quickly.

It's funny.  Thinking through how the async features work with return values, exception handling, and the generated state machines, it's not that hard to imagine making it work from scratch.  Of course, things are always so much more obvious once you see how they work!

I have some videos coming out soon that walk through some async scenarios.  I'll post the links then.  In the meantime, grab Windows 8 and Visual Studio 2012 and start figuring it out!

Back again...

My blog has been down for over two weeks now.  I tried to update Orchard to the newest version, but it no longer accepts my data.  I just don't have time to worry about this!  I've decided to just use a hosted blogging engine, so here I am.  I need to get back into the blogging spirit now.  I also need to find a way to migrate my old content here, but that's not my immediate priority.  Thanks to everyone still reading!  I hope to get some interesting content up here soon.