Skip to main content

Posts

Showing posts with the label WP7

Being featured in windows phone marketplace

I was looking at the download figures for FINDaPAD in the windows phone marketplace today and noticed another spike in downloads on the 26th of June, it had the  same pattern as the spike on the 20th of May. Why are we getting such high downloads on these days? Normally we get a much more modest download rate, 150 per month - not bad a for free app only targeting the UK marketplace: The only reason I can think of is - we've been featured twice in the windows phone marketplace. It would kind of make sense as the second peak is considerably smaller than the first indicating a subsequent placement in the marketplace. It would have been nice to get some heads-up before being featured, even if it's only for personal vanity :) So if you want to get your app featured in the marketplace make sure you complete all the artwork requirements. These can be updated at any time:

WP7 Advertising results for FINDaPAD

A previous post detailed how FINDaPAD was selected for the Nokia WP7 April ad campaign in the UK - more info can be found  here . For us the ad campaign has been very successful, we've doubled our total number of downloads in a month, okay we didn't have many in the first place but doubling the number of ' units sold ' in a month always sound good! The ad campaign ran for 4 weeks and started on or around the 1st of April. Before the campaign started we'd only had approximately 600 hundred downloads with the previous month showing 87 downloads: As I said the campaign had the affect of doubling our total number of downloads to approximately 1400: Interestingly the above graph has two peaks, the second is explained away as a patch release we did (2.1) -  a few bug fixes. The interesting factor about the second peak is there are about 200 users who had downloaded the update from the marketplace in the subsequent week. Does this figure represent ou

Getting free advertising for WP7 apps

If you've got apps in the WP7 UK marketplace you have the chance to be included in the Nokia and Microsoft ad campaign, more info can be found here . We ( Rich , Nick & I) had FINDaPAD put forward - thanks Matt . The ad campaign started a couple of days ago and we're being featured with an in-app banner and entry on the app highlights in the marketplace: We're already seeing great results, our daily download rates for the app have tripled in the first 2 days of the campaign :)

faking data in WP7 and other .Net platforms

I needed to fake some data for a WP7 app yesterday and I was about to write a couple of classes when I thought why not check out what's available out there already... There were already a couple of NuGet packages out there but I wanted to try out my forking skills on GitHub :) I had a quick conversation with Ben Smith about faker-cs   and producing a NuGet package.  Introducing Faker.Net on NuGet, with support for .Net 3.5 SP1, .Net 4.0, Silverlight & WP7. Faker.Net support loads of different ways to fake data - addresses, names, phones numbers and more: It's very simple to use, shown below is the code for the following WP7 apps: It could be used anywhere you need fake data - proof of concept, testing, demo apps...

Removing the 'Invalid Credentials... ' message from Bing Maps on WP7

I got asked a question by @mrlacey today about how to remove the overlay message you can get when using the Bing Maps control on WP7. Now I've only ever seen this appear for two scenarios - invalid credentials or when in flight mode. It just so happens the control uses the same set of controls to display these messages, example shown below: Now obviously they don't want you to hide\remove this message :) The obvious way to remove the ' Invalid credentials... ' message is to actual supply valid credentials, but what about if you want to remove the ' Unable to contact server.Please try again ' when using the map control in flight mode. Matt found a previous post that had done this , not sure how this guy was achieving this as the current build for the map control is sealed and access to the RootLayer property is not allowed... This didn't stop me :)  So XAML is all about composition - everything is built as layers of UI controls, known

Be careful of the culture when using Bing Maps REST API

When developing the Bing Maps Wrapper service for the WP7Contrib we weren't aware of the importance of the instance of the CultureInfo class used to format the geo-coordinate data when building the URL parameters. This was for the simple reason, being based in the UK we were relying on the default culture, which happens to be 'en-US'  and this culture formats decimal numbers in the required format for calls to the Bing Maps REST API. The documentation on MSDN does state this, but does not make it very clear. Show below is the formatting for a couple of different cultures, what you'll see is the formatting for the Lat & Long for the Netherlands & Russian cultures is different to the rest. They both use commas as the decimal point. When the Lat & Long are used to format the URL parameter they need to be in InvariantCulture so that your URL looks like the following: If I force the Bing Maps Service to use the Netherlands culture with the code shown b

Considerations when building a caching mechanism for WP7Contrib.

For anyone wanting to build a cache for an application, there are several guidelines(may be rules) you want to beware of and more than likely abid by. Firstly, more than likely you are going to have an in-memory representation of the cache as well as a persisted format if the cache is to survive application restarts. Now an in-memory representation is more than likely going to be a hash-table - especially if you want acceptable retrieval time. Now this is where 'GetHashCode' comes into play and the importance of this is explained perfectly by Eric Lippert , Secondly, and this follows on from a statement in Eric's post - 'the integer returned by GetHashCode should never change', if you're using the internal state of a class to calculate the hash code, you can't allow that state to change overtime. So this means you are more than likely going to have create a copy of the instance before using it as a 'key' when adding to the cache, because this wil

WP7Contrib: RESTful communications using HttpWebRequest & Rx extensions

20/03/2011 UPDATE: code samples after changes to WP7Contrib code base. Simply I want to show how we do communication with web services when using WP7Contrib. When using web services from WP7 devices you have several options on how you are going to communicate  with the service. What follows are the steps required to achieve this using the WP7Contrib. We show how to use a third party web service and how this pattern is very advantageous in this scenario. We aren't advocating this is a better approach than using WCF data services (or any of other implementation), we've just been burnt before by WCF and prefer to possibly go through the pain of hand crafting resources (DTOs) than deal with WCF configs and it's short comings in Silverlight. In Silverlight as we all know communication with web services has to be asynchronous, this in it's self is not a problem, but it can make the code ugly at best and difficult to understand. This is where Reactive Extensions  come

WP7Contrib: Why we use SilverlightSerializer instead of DataContractSerializer

Like all applications developed for WP7 devices we (WP7Contrib) want to get the best performance possible from any libraries or patterns we use and this applies to how we serialize and deserialize data inside the WP7Contrib. In several of the libraries which make up the WP7Contrib we require binary serialization support, specifically we use binary serialization for the isolated storage cache provider and the storage service in the services project. Simply after testing we found SilverightSerializer  gave better performance, shown below the results of serializing a collection of 1000 items compared to the  DataContractSerializer . It shows the tick count, the equivalent time in milliseconds and the size of the generated byte array . So you can see the SilverlightSerializer gives better performance from both a time and size perspective. These results were generated using the StopWatch class. The only downside I can see from using the SilverlightSerializer is the support for gener

WP7Contrib: Trickling data to a bound collection

Recently Rich & I've had problems with adding items to list control where the data template is chocked full of XAML goodies - triggers, opacity masks, images, overlay, loads of things I know little about... ;) The culmination of all this UI goodness when used with a bound list control is the blowing of the '90 mb limit' for WP7 devices. As I posted before , we knew the problem wasn't with the data model so we knew it was the data template, now there is plenty of coverage of issues with data templates in Silverlight and this post it not adding to this list, its about a technique to reduce the memory footprint once you've done as much as you can with the data template. So we're developing an app which exhibits high memory usage, now obviously we want to reduce the memory consumption for the app so we trimmed down the data template for the list control, but we're still seeing the 90 mb limit exceeded for relative few items. Our data set could in theory c

WP7Contrib: Isolated Storage Cache Provider

15/04/2001 - The code for this example has been updated - new WP7 build of SilverlightSerializer, this has removed the explicit implementation of ISerializeObject interface from the example model classes. WP7Contrib received it's first question on the discussions forum, it was about how to use the  IsolatedStorageCacheProvider . Rich & I have been using this for a while in development and the question highlighted the lack of examples on how to use some of the stuff we've pushed out. So I thought I would share some insight into the demo I produced to answer the question. You'll find the demo in the 'CacheProviderDemo' in the 'Spikes' directory in the  code-base . It demostrates how to add both value & reference types to the cache, how these gets persisted to isolated storage and how values are purged from the cache. Before I show some code snippets I'll give some background to our thinking about caching. As wikipedia states 'a cache

WP7: Thinking about performance implicitly

It's inevitable as the moon going around the earth - the performance of your Windows Phone 7 app will become an issue during your application development life cycle, hopefully you're using agile practices and therefore this won't happen to late in the process. There is one technique I believe you should always apply to the process and that is ' thinking about performance implicitly '. So I have 3 tips which help me achieve thinking about performance implicitly. The emulator is not your friend - You should as others have pointed out always be testing on a device and not the emulator - the emulator is great for spiking and unit testing but not as environment for building an application, it runs at the speed of the host and I haven't yet managed to find a WP7 phone to match the perf of my 4 * Quad Core machine :) Get the worst device possible -  Okay any device running WP7 will have been certified by MS as acceptable, but there are still great differences b

WP7Contrib: Location Push Model

Anyone who's tried to get your current location of a WP7 device will know this is not as simple as it first appears, the problems really revolve around the frequency at which the location information can be generated by the device (GeoCoordinateWatcher class) and the fact it is generated on the UI thread. Jaime Rodriguez has a very insightful post on the issues, you should read this first if you're not familiar with the issues. For the WP7Contrib we wanted to abstract away the issues and simplify the interface for any developer wanting to get location information. Following the pattern we used for Network Connectivity we use a push model using the MS Reactive Extensions for .Net. We use an observable sequence which returns the current location (latitude & longitude) in one of three ways - the current location, the location by time threshold (seconds or TimeSpan) and the location by distance threshold (metre). The interface for the location service is shown below: pub

WP7: Know your data

If you've been developing Windows Phone 7 apps you'll be aware of the '90 MB' memory limit guideline detailed in the application certification requirements , if not it says: 5.2.5 Memory Consumption An application must not exceed 90 MB of RAM usage, except on devices that have more than 256 MB of memory. You can use the DeviceExtendedProperties class to query the amount of memory that is available on the device and modify the application behavior at runtime to take advantage of additional memory. For more information, see the DeviceExtendedProperties class in MSDN . I've heard of apps exceeding this limit and still being approved for the app store, but that is not the point of this post , the point is as a developer working on a device you should have a cursory knowledge of the size of your data. The reason is simple because when you exceed the 90 Mb limit (and in all probability you will) you'll be able to identify where your memory problems are quicker an