Free eBook: Location Intelligence for Windows Store Apps (with code samples)

http://www.lulu.com/shop/ricky-brundritt/location-intelligence-for-windows-store-apps/ebook/product-21468807.html

Table of Contents

  • Chapter 1: Getting Started
  • Chapter 2: The Sensor and Location Platform
  • Chapter 3: Bing Maps JavaScript API
  • Chapter 4: Bing Maps Native API
  • Chapter 5: Bing Maps REST Services
  • Chapter 6: Bing Spatial Data Services
  • Chapter 7: Working with Spatial Data
  • Chapter 8: Drawing on the Map
  • Chapter 9: Creating an Augmented Reality App
  • Chapter 10: Creating a Templatable Compass Control
  • Chapter 11: Cross Platform Development

Microsoft: More than 200 million Windows 8 licenses sold | ZDNet

“Windows 8 has surpassed 200 million licenses sold, and we continue to see momentum. This number includes Windows licenses that ship on a new tablet or PC, as well as upgrades to Windows 8. The figure does not include volume license sales to enterprise. Windows is a central part of life for more than 1.5 billion people around the world, and we are looking forward to the future.”

via Microsoft: More than 200 million Windows 8 licenses sold | ZDNet.

Windows 8 rockets to 7.41% market share as Windows XP falls below 35% mark – The Next Web

Already a few weeks old (data end of August)…

The latest market share data from Net Applications shows that August 2013 was a massive one for Windows 8, which gained 2.01 percentage points (from 5.40 percent to 7.41 percent) while Windows 7 recovered 1.14 percentage points (from 44.49 percent to 45.63 percent).

via Windows 8 rockets to 7.41% market share as Windows XP falls below 35% mark – The Next Web.

How to get more ratings for your apps

(Good) Ratings and Reviews are key success factors for your apps and business.

The quality of the ratings is closely bound to the quality of the services that you are offering and how well and freshly are you offering them. This is a very vast topic that I won’t cover within this post. The aim of this post is to help you increasing the number of ratings/reviews of your apps.

Here 3 simple hints:

  • Few users rate/review apps spontaneously. For this reason, you should ensure that your app stimulates the user to rate it. Implementing such a feature is quite easy: At the end of the post, you will find some demo code for this.
  • If your app make use of “in-app-purchase” mechanisms, you can offer free or discounted goods in exchange of ratings.
  • Use your other assets (web page, blog, social network,…) to request ratings.
Code Sample – Rating Feature

NB: This code is provided as it is: You can use it and change it upon your need. Be aware that I cannot offer you a “bug-free” certification, so test it smartly within your own context.

In this case, I work with a UserControl that I place on my app main page within a fully blown, hidden ViewBox, as latest/highest control within the main Grid of the main page:

<Viewbox Grid.RowSpan="2" Grid.ColumnSpan="2">
            <Controls:RateMe x:Name="ucRateMe" Height="766" Width="1366" Visibility="Collapsed"/>
        </Viewbox>

On the constructor of the main page, I then initialize my UserControl:

         public MainPage()
         {
             this.InitializeComponent();
             ucRateMe.Check(3, 14, 3);
         }

The parameters are:

  • Number of times the app is run before the rating screen appears
  • Number of days to wait before showing the rating screen again, in the case the user has chosen the “remind me later” option
  • Max Number of times the rating screen will appear (we don’t want to be too tedious).

The UserControl (nothing fancy) XAML looks like this:

<UserControl
    x:Class="Controls.RateMe"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:Controls"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    d:DesignHeight="768"
    d:DesignWidth="1366">

    <Border BorderBrush="#33000000" BorderThickness="0" Margin="0" Background="#CC000000">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="4*"/>
                <RowDefinition Height="8*"/>
                <RowDefinition Height="60"/>
                <RowDefinition Height="1*"/>
            </Grid.RowDefinitions>
            <StackPanel Height="60" Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Right">
                <Button x:Name="btnDontBotherMeAgain" Content="Do not bother me again" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" BorderThickness="2" Margin="0,0,20,0" Tapped="btnDontBotherMeAgain_Tapped"/>
                <Button x:Name="btnRemindMe" Content="Remind me later" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" BorderThickness="2" Margin="0,0,20,0" Tapped="btnRemindMe_Tapped"/>
                <Button x:Name="btnRateMeNow" Content="I'll rate you now" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" BorderThickness="2" Margin="0,0,20,0" Background="Red" Tapped="btnRateMeNow_Tapped"/>
            </StackPanel>
            <TextBlock HorizontalAlignment="Center" Margin="173,62,166,107" Grid.Row="1" TextWrapping="Wrap" VerticalAlignment="Center" Height="267" Width="1027" FontSize="22">
            	<Run Text="Dear User, "/>
            	<LineBreak/>
            	<Run/>
            	<LineBreak/>
            	<Run Text="Your feedback is key to my success an evolution: I really hope that you really me and I would very much appreciate if you could please rate me and maybe write a short review, if you have suggestions on how make me better!"/>
            	<LineBreak/>
            	<Run/>
            	<LineBreak/>
            	<Run Text="Thank you very much in advance."/>
            	<LineBreak/>
            	<Run/>
            	<LineBreak/>
            	<Run Text="Your App! "/>
            </TextBlock>
            <Image x:Name="imgLogo" HorizontalAlignment="Right" Height="100" VerticalAlignment="Top" Width="100" Source="ms-appx:///Assets/Logo.png" Margin="0,20,20,0" />

        </Grid>
    </Border>

</UserControl>

Which looks visually as follows:
rateme
And finally the necessary code behind is:

using Data;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.System;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;

// The User Control item template is documented at http://go.microsoft.com/fwlink/?LinkId=234236

namespace XXX.Controls
{
public sealed partial class RateMe : UserControl
{
private DateTime _refDate;

public RateMe()
{
this.InitializeComponent();
bool _fake = DateTime.TryParse(&quot;2000-01-01&quot;, out _refDate);
}

public void Check (int FirstTimeAppearanceAfter, int DaysBeforeShownNextTime, int MaxNoOfAppearence)
{
bool _ratedOrNoRatedWished = true ;
if (Utilities.LocalSettings.isLocalSettingStored(&quot;RatedOrNoRatedWished&quot;))
{
_ratedOrNoRatedWished = Utilities.LocalSettings.GetLocalSetting&lt;bool&gt;(&quot;RatedOrNoRatedWished&quot;);
}

if (!_ratedOrNoRatedWished)
{
#region getTheDataFromIS

int _nOfTimesAppHasBeenStarted = 0;
if (Utilities.LocalSettings.isLocalSettingStored(&quot;NoOfTimesAppHasBeenStarted&quot;))
{
_nOfTimesAppHasBeenStarted = Utilities.LocalSettings.GetLocalSetting&lt;int&gt;(&quot;NoOfTimesAppHasBeenStarted&quot;);
}

DateTime _lastTimeShown = _refDate;
if (Utilities.LocalSettings.isLocalSettingStored(&quot;LastTimeTheRatingMessageWasShown&quot;))
{
string _sLastTimeShown = Utilities.LocalSettings.GetLocalSetting&lt;string&gt;(&quot;LastTimeTheRatingMessageWasShown&quot;);
bool _fake = DateTime.TryParse(_sLastTimeShown, out _lastTimeShown);
}

int _noOfTimesShown = 0;
if (Utilities.LocalSettings.isLocalSettingStored(&quot;NoOfTimesTheRatingMessageWasShown&quot;))
{
_noOfTimesShown = Utilities.LocalSettings.GetLocalSetting&lt;int&gt;(&quot;NoOfTimesTheRatingMessageWasShown&quot;);
}

#endregion

if (_nOfTimesAppHasBeenStarted &gt; FirstTimeAppearanceAfter)
{
if ((_lastTimeShown == _refDate) ||
((_lastTimeShown.AddDays(DaysBeforeShownNextTime) &lt; DateTime.Now) &amp;&amp; (_noOfTimesShown &lt; MaxNoOfAppearence)))
{
// ShowMe
this.Visibility = Visibility.Visible;
_noOfTimesShown++;
Utilities.LocalSettings.SetLocalSetting(&quot;NoOfTimesTheRatingMessageWasShown&quot;, _noOfTimesShown);
}
}
else
{
_nOfTimesAppHasBeenStarted++;
Utilities.LocalSettings.SetLocalSetting(&quot;NoOfTimesAppHasBeenStarted&quot;, _nOfTimesAppHasBeenStarted);
}
}
}

private async void btnRateMeNow_Tapped(object sender, TappedRoutedEventArgs e)
{
String uri = String.Format(&quot;ms-windows-store:REVIEW?PFN={0}&quot;, Windows.ApplicationModel.Package.Current.Id.FamilyName);
await Launcher.LaunchUriAsync(new Uri(uri));
Utilities.LocalSettings.SetLocalSetting(&quot;RatedOrNoRatedWished&quot;, true);
this.Visibility = Visibility.Collapsed;
}

private void btnRemindMe_Tapped(object sender, TappedRoutedEventArgs e)
{
Utilities.LocalSettings.SetLocalSetting(&quot;LastTimeTheRatingMessageWasShown&quot;, DateTime.Now.ToString());
this.Visibility = Visibility.Collapsed;
}

private void btnDontBotherMeAgain_Tapped(object sender, TappedRoutedEventArgs e)
{
Utilities.LocalSettings.SetLocalSetting(&quot;RatedOrNoRatedWished&quot;, true);
this.Visibility = Visibility.Collapsed;
}

public void ResetData()
{
if (Constants._ISDEBUG)
{
// RESET IS
Utilities.LocalSettings.SetLocalSetting(&quot;RatedOrNoRatedWished&quot;, false);
Utilities.LocalSettings.SetLocalSetting(&quot;LastTimeTheRatingMessageWasShown&quot;, _refDate.ToString());
Utilities.LocalSettings.SetLocalSetting(&quot;NoOfTimesAppHasBeenStarted&quot;, 0);
Utilities.LocalSettings.SetLocalSetting(&quot;NoOfTimesTheRatingMessageWasShown&quot;, 0);
}
}

}
}

Enjoy it and get some awesome ratings!

Creating a smooth extended splash screen experience

It’s common practice to implement an extended splash screen when your Windows Store app has a long or unpredictable start-up time, because it’s loading data off the web for instance. About 99% of the extended splash screens I’ve seen so far implement a page that looks like the default splash screen with the addition of a ProgressRing control to indicate it’s loading data.In this post I’d like to explain how to implement an extended splash screen that’s a bit more visually appealing and will transition into the main app experience without the jarring page navigation. My solution will be based off the excellent content available in the “How to extend the splash screen” MSDN article and accompanying Splash screen sample. The solution presented here is written in C#/XAML, but the same techniques can be applied to a JavaScript/HTML based app.

via Creating a smooth extended splash screen experience.