Windows Phone 7 development

Archive for the ‘WP7’ Category

How to get MAC adress on Windows Phone 7 device.

There had been an issue with MAC adress on WP7 – the MAC wasn’t exposed. As a result, there phone can’t be connected to MAC-secure WIFI.

After March update, the MAC is in About page.

 

Go Setting -> About -> More info.

voila.

Advertisements

Changing namespaces in WP7 project

It seems that VS 2010 screws the project properties when namespaces are changed.

I posted it on SO.

And the solution is:

Check the “Startup Object” in the project properties page. The sometimes requires manually being set/corrected when the namespace of the app is changed.

Thx Matt ūüėČ

How to play music across pages.

Silverlight for Windows Phone 7 is based on the page  navigation system. Key point is the lifetime of pages Рeach page is deleted while you navigate to another. To have an object(singleton f.e.) during the whole application life it could be placed in App class (App.xaml.cs file). MediaElement is definitely an object that should be one (there must be only one music player). The best and simple solution is place the MediaElement in XAML(it needs to be a part of visual tree), I have used application resources:


<!--Application Resources-->
<Application.Resources>
   <MediaElement x:Name="mediaPlayer" Source="/Sound/horrorSong.mp3" AutoPlay="False"  />
</Application.Resources>

Then you can get it from any page:

MediaElement player = null; // get the media element from App resources
if (App.Current.Resources.Contains("mediaPlayer"))
{
   player = App.Current.Resources["mediaPlayer"] as MediaElement;
}
if (player != null)
{
   player.Play();
}

MediaElement can’t play the music while Zune is connect, it is good to prompt the user about it.

if (NetworkInterface.GetIsNetworkAvailable())
{
   if (NetworkInterface.NetworkInterfaceType == NetworkInterfaceType.Ethernet)
   {
      zuneTextBlock.Visibility = System.Windows.Visibility.Visible;
      return;
   }
}
zuneTextBlock.Visibility = System.Windows.Visibility.Collapsed;

This code does not guarantee if Zune is on (User sill can have the plugged phone) but is very likely that Zune is running(Zune starts while you connect the phone).

New versions of Apps

Spirit Level

Classic Metronome

Tip Calc

njoy!

WP7 constants

I have tried to gather some important ones. I will update this post when I spot something new ūüôā

Developing

  1. 3 – devices can be unlocked by one developer(one live ID)
  2. 3 – apps can be deployed by DearmSpark developer per one phone
  3. 5 – free apps per account (next one is 19.99$)
  4. 5 – seconds after launch the app must show something to the user(loading screen f.e.).
  5. 10 – apps can be deployed by developer(paid fee) per one phone
  6. 15 – push notification channels per device
  7. 20 MB – The maximum size of the OTA (over the air) installation file for the application.
  8. 30 – frames per seconds XNA updates the screen.
  9. 60 – frames per second Silverlight updates the screen
  10. 62 x 62 – icon size(PNG)
  11. 90 MB – memory usage for devices with 256 MB ( limit can go up for devices with more than 256MB)
  12. 99  x 99 РSmall mobile app tile (PNG)
  13. 173 x 173 – tile size(PNG)
  14. 200 x 200 – Large PC app tile(PNG)
  15. 225 MB – The maximum size of the XAP package file.
  16. 480 x 800 – screenshoot of an app.
  17. 1000 x 800 – Panaroama background for marketplace – not 1440 (PNG)

Money

  1. 0.99$ – mimimum price of an app
  2. 99$ – registration fee
  3. 200$ – payout threshold
  4. 499.99$ – maximum price of an app

The collection time of payment

  1. 15 to 30 days for credit card billing
  2. 90 to 120 days for mobile operator billing

Find WP7 apps using Bing Visual Search

How to find app using internet browser? Use bing Visual Search.

source

Finally!

%d bloggers like this: