Marketplace Test Kit: How To?
With Windows Phone 7.1 SDK you are equipped with a Marketplace Test Kit which allows you to test applications (XAP packages) for passing Marketplace certification requirements (iconography, XAP file size, etc), memory consumption, leakage and proper exception handling in an automated and monitored way. It also provides a list of manual tests which may further help mature you applications. Here’s how,
Step 1: Open Marketplace Test Kit Console
Note: If at the bottom you see a message that updated test cases are available please do so please do perform an update since Marketplace requirement will keep changing.
Step 2: Confirm Application package path points to Release version
Note: As it would be obvious since you are testing a XAP file in Release mode you can also test a .xap file even if the source is not available. Just make sure that XAP package name meets the same name given to current open visual studio project (or its corresponding XAP package).
And the four tabs on the left are all that you need to perform these tasks. If not, see this great video from Microsoft User Community,
Preview InputScope in Windows Phone 7
InputScope is a means in Windows Phone 7 applications to restrict user input to specific input scope by providing specific keyboard layout. For example, a text field designated to take input of cell phone number should differ in keyboard layout from the one that allows writing Url.
All you need to do is to instantiate a specific InputScopeName object by providing the concrete InputScopeNameValue value; add that object in InputScope Names collection which can then be assigned to the input text control. However since InputScopeNameValue enumeration allows many possible variations of keyboard inputs, here is a simple application that lists all enumeration values in a list picker control. Upon selecting a specific enumeration value it is set with relative text field to see difference in keyboard before choosing one that suits your needs.
Download Source : http://usmanahmed.info/downloads/windows-phone-input-scope-tester.rar
Windows Phone 7 ResolveHostNameAsync
The class DeviceNetworkInformation packaged within namespace Microsoft.Phone.Net.NetworkInformation provides two overloaded methods to resolve hostname asynchronously.
The overloads differ such that former allows you to specify the network interface using which hostname needs be resolved where as earlier will use the first avialable network interface in the list (If both WiFi and Ethernet are available then my understanding is that Ethernet will take precedence)
Here is a simple app demonstrating how to retrieve IPs against hostname.
Note: Since call to method (ResolveHostNameAsync) is asynchronous in nature, the foreground thread won’t let you interact with the UI interface in the callback method nameResolutionCallback(NameResolutionResult result). That's why you will see that interaction with UI is managed by call to dispatcher. However a more sophisticated approach will be to execute this call on the background thread.Code behind
private void btnResolveHostName_Click(object sender, RoutedEventArgs e)
{
if(!string.IsNullOrEmpty(txtHostName.Text))
{
DnsEndPoint endPoint = new DnsEndPoint(txtHostName.Text, 80);
Microsoft.Phone.Net.NetworkInformation.DeviceNetworkInformation.ResolveHostNameAsync(endPoint, nameResolutionCallback, new object());
}
}
{
if (result.NetworkErrorCode == NetworkError.Success)
{
List<string> items = new List<string>();
items.Add(string.Format("Network Interface Type : {0}", result.NetworkInterface.InterfaceType)); foreach (IPEndPoint ipEndPoint in result.IPEndPoints)
{
items.Add(string.Format("Resvoeld IP : {0}:{1}", ipEndPoint.Address.ToString(), ipEndPoint.Port.ToString()));
} Deployment.Current.Dispatcher.BeginInvoke(() =>
{
lstInfo.ItemsSource = items;
txtHostName.Focus();
});
}
else
{
Deployment.Current.Dispatcher.BeginInvoke(() =>
{
MessageBox.Show(result.NetworkErrorCode.ToString(), "Error", MessageBoxButton.OK);
txtHostName.Focus();
});
}
}
XAML
<!--LayoutRoot is the root grid where all page content is placed-->
<Grid x:Name="LayoutRoot" Background="Transparent">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
<TextBlock x:Name="ApplicationTitle" Text="Resolve Hostname" Style="{StaticResource PhoneTextNormalStyle}"/>
</StackPanel> <!--ContentPanel - place additional content here-->
<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
<TextBox Name="txtHostName" Width="300" Margin="6,-5,150,623" Text="google.com"></TextBox>
<Button Name="btnResolveHostName" Margin="300,-5,-5,623" Click="btnResolveHostName_Click">Resolve</Button>
<ListBox Name="lstInfo" Margin="12,79,6,39" BorderThickness="1" BorderBrush="Azure"></ListBox>
</Grid>
</Grid>

