A Simple Way To Get To Get Your WP7 App Rated

One of the best ways to get your application development skills noticed is through self promotion.  One of the easiest ways to accomplish this is by having users who download your application rate your work.  This capability is available in Windows Phone 7′s marketplace yet it requires end users to discover the “tap and hold the application icon” sequence in order to rate your application.  What if you were able to simplfy the way your customers could rate your application?

Launchers available within Windows Phone 7′s OS allow for code to take your user to the marketplace page to rate your application.  An example of this can be found below.

MarketplaceReviewTask task = new MarketplaceReviewTask();
task.Show();

Adding these two lines of code could be an effective way to increase your number of rating and/or your rating score in general.  Remember, application discovery can be greatly enhanced through Marketplace promotion.  Simplifying a way for end users to rate your application through Marketplace will secure your application being promoted.

Another great tool for feedback is the ability for developers to be in contact with their customers to gain insight on how the applciation could be improved.  This too can be simply accomplished by adding the code below to your application.

EmailComposeTask task = new EmailComposeTask();
task.Subject = "Application Feedback";
task.Show();
 
 

Live Tile Creation Without Push Notification in Windows Phone 7 Mango

With the launch of Windows Phone 7 came “Live Tiles” which provided a glimpse as to what information was aggregating amidst the application it represented.  Information as to how many tweets or emails recieved would be represented my a numeric value found on the tile itself.  The challange to developers though was the fact that a Live Tile could only be created alongside push notification to update said tile.  This is no longer the case with the introduction of Mango update for Windows Phone.  The Mango update allows developers to update, create primary and secondary tiles without the requirement of push notification.

To create and update live tiles essentially you will need to work with the ShellTile and StandardTileData classes.

You can get the instance of current tile for your application as provided in the example below:

ShellTile currentTiles = ShellTile.ActiveTiles.First();

You can set the data for you tile as demonstrated below.

var tilesUpdateData = new StandardTileData
         {
                 Title = “Live Tiles “,
                 Count = 10,
                 BackTitle = “Back Title”
         };

StandardTileDataclass has following properties. You can set value of these properties to set the data of live tiles.

  1. public Uri BackBackgroundImage
  2. public string BackContent
  3. public Uri BackgroundImage
  4. public string BackTitle
  5. public int? Count

Updating a Live Tile

The code snippet below will update a live tile with a title and a numeric count.

using System.Linq;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;
using WindowsPhoneApplication3;

namespace liveTiles
{
    public partial class MainPage : PhoneApplicationPage
{
    // Constructor
        public MainPage()
        {
          InitializeComponent();
          UpdateLiveTiles();
        }      
          private void UpdateLiveTiles()
        {
            ShellTile currentTiles = ShellTile.ActiveTiles.First();
            vartiles UpdatedData = new StandardTileData
            {
                Title =“Live Tiles “,
                Count = 10,
                BackTitle = “Back Title” 
            };
            currentTiles.Update(tilesUpdatedData); 
        }       
    }
}

The Live Tile will now get updated as shown in the example below.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Creating a Live Tile

The below code snippet will create a new live tile. Creation of live tile is exactly same as updating of live tile but to call Create function.

        private void CreateLiveTile()
        {
            var newTile = new StandardTileData()
            {
                Title = “Blogs Update”,
                BackgroundImage = new Uri(“background.png”, UriKind.Relative),
                Count = 42,
            };
            var uri = “/LiveTileUserControl.xaml?state= Live Tile”;
            ShellTile.Create(new Uri(uri, UriKind.Relative), newTile);
        }

An important point to note in the above code snippet is the uri. On clicking on the created live tile the user will navigate to the given XAML.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Updating The Created Live Tile

First step is to fetch the tile with a query string to allow the update to occur as show in the following example.

        private void UpdatingCreatedTile()
        {
            var uri = new Uri(“/LiveTileUserControl.xaml?state= Live Tile”, UriKind.Relative);
            ShellTile  tileToUpdate = ShellTile.ActiveTiles.Where(t => t.NavigationUri == uri).FirstOrDefault();
            var tilesUpdatedData = new StandardTileData
            {
                Title =“Created Tiles Updated “,
                Count = 45,
                BackTitle = “Back Title”

            };

            tileToUpdate.Update(tilesUpdatedData);
        }

This will then result in the tile getting updated as show below.

System Tray Customization for Windows Phone 7

In Windows Phone 7, the System Tray is the small bar across the top of the screen and is currently used to display signal strength, current time and WiFi connection strength of your device.   This system tray can be hidden and show on command should you application require it to do so.  The following is a demonstration as to how to make this happen.

To begin, design a page with a CheckBox inside it.  This will enable the event to show or hide the System Tray. 

Here is the XAML code for your reference:

<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0" VerticalAlignment="Top">
<CheckBox Content="Show System Tray" Checked="ShowSystemTray" Unchecked="HideSystemTray"/> </Grid>

Here is the code implementation:

private void ShowSystemTray(object sender, RoutedEventArgs e)
{
 SystemTray.IsVisible = true;
}
private void HideSystemTray(object sender, RoutedEventArgs e)
{
 SystemTray.IsVisible = false;
}

When the “Show System Tray” is checked, you will see the System Tray bar at the top of the screen as shown in the first figure below:

 

 

 

 

Uncheck the “Show System Tray”. This will hide the System Tray bar from the screen.

 

 

 

 

As mentioned, this can be used to capitalize on screen real estate or can be used in situations were system notification is required.

Emma’s Back Porch Featuring Windows Phone 7 Brought To You By Silicon Halton

I have graciously been invited to speak at Silicon Halton’s 15th meetup tonight at 7pm located at Emma’s Back Porch.  Those of you in the Halton region should know the place and those of you who don’t should know that this Halton landmark serves up the best wings in Burlington.

As mentioned, tonight’s event is being hosted by Silicon Halton which is a grass roots networking group dedicated to connecting and creating strong  local relationships and business partnerships for hi tech entrepreneurs and leaders in Halton.

I will be presenting alongside my good friend Mark Arteaga on the topic of Windows Phone 7 from both an end user and an application development perspective.  I will also be bringing down goodies to give away to attendees already holstering a Windows Phone 7 device and will be showcasing live demos of the WP7 OS.

So come on down, enjoy a few wings and a beverage, and get to experience Windows Phone 7 first hand.

Register now as space is limited.

The Windows Phone User Group Meeting – November 16th

Have anything planned from 6PM till 9PM on November 16th?  Well you do now…

The inaugural Windows Phone User Group meeting takes place on November 16th and is being hosted by my two fellow MVPs Darren Humphries and Mike Temporale.  The magic will happen at the Microsoft campus located in Mississauga and will be a great source of information with regards to all things Windows Phone.  Mobility specialists such as Mark Arteaga, Joey DeVilla and myself will be attendance to answer all your questions around developement and deployment.  Live devices will be on hand as well for you to try out Microsoft’s latest mobile OS offering. Lastly, draws for prizing such as a, I don’t know, Windows Phone 7 device and other great prizes available to be won.

Attendance is free, there will be food and drinks to snack on and the first 100 attendees will recieve a free Windows Phone 7 t-shirt.  So come on by, take Windows Phone 7 for a test drive and possibly walk away with your very own Windows Phone 7 device.

Register here for the event. The team and I look forward to seeing you there.

 

This article also appears on Mark Arteaga’s blog and on Mobile Jaw

How To Set The Keyboard Input Scope For Windows Phone 7



Below is an instruction set to create a better input model for your Windows Phone 7 app by invoking the TextBox control. Enabling this capability will make the typing experience easier for your potential customers by using input scopes where appropriate.  It is a differentiator that can go a long way amidst similar Windows Phone 7 applications.

The on-screen keyboard can be used to input text on a Windows Phone, and it is deployed automatically when a TextBox control becomes active. Windows Phone has several context-specific on-screen keyboard layouts that you can use for application development including the keyboard types in the following table:

 

Keyboard Type Layout
Default Standard QWERTY layout
Text Standard layout with ASCII-based emoticons
E-mail Address Standard layout with .com and @ keys
Phone Number Typical 12-key layout
Web Address Standard layout with .com key and customized Enter key
Maps Standard layout with a customized Enter key
Search Semi-transparent layout with a Search and  .com key
SMS Address Standard layout with easy access to phone number layout

  
Here is how you would enhance that setting by assigning the keyboard input scope

To set the input scope

  1. Open any project and on MainPage.xaml, drag a TextBox control from the Toolbox onto the designer. You can also create a TextBox control directly using the following XAML code. You may position or scale the control based on your preference.
      
    <TextBox Height=”31″ HorizontalAlignment=”Left” Margin=”31,256,0,0″ Name=”textBox1″ Text=”TextBox” VerticalAlignment=”Top” Width=”423″ >
                   
    </TextBox>
      
  2. In the XAML code, between the <TextBox></TextBox> tags, add the following code to set the input scope. For this example, the “Url” keyboard layout is selected and a .com key is exposed.
      
    <TextBox.InputScope>
           <InputScope>
              <InputScopeName NameValue=”Url”/>
           </InputScope>
    </TextBox.InputScope>
Follow

Get every new post delivered to your Inbox.

Join 1,629 other followers