Mat Velloso's Blog

Anything about Azure, Windows 8, XAML, Windows Phone, Visual Studio, .Net, Office 365, HTML5, SQL Server, well... you got the idea

October, 2010

Posts
  • Mat Velloso's Blog

    Free ebook: Programming Windows Phone 7, by Charles Petzold

    • 0 Comments

    In case you didn't see this, it's a free downloadable pdf format ebook, including source code samples:

    http://blogs.msdn.com/b/microsoft_press/archive/2010/10/28/free-ebook-programming-windows-phone-7-by-charles-petzold.aspx

     

  • Mat Velloso's Blog

    Love Windows Phone 7? Got a Mac? Then read this

    • 0 Comments

    The beta of the Windows Phone 7 connector for Mac is available to download here:

    http://www.microsoft.com/downloads/en/details.aspx?FamilyID=1fe7ea0f-3ad6-4137-8397-d412a3792c33

    It basically allows synchronization music, videos, podcasts and photos from iTunes and iPhoto to your phone.

    I'm sure this will make some people quite happy :)

  • Mat Velloso's Blog

    Professional Developers Conference – Live from the Microsoft Redmond Campus this Friday!

    • 0 Comments

    The Microsoft Professional Developers Conference (PDC) kicks off this Friday (29 October) morning and we would like to invite you to participate in this year conference LIVE in New Zealand. This year's PDC online event will include live streaming of the keynote, as well as concurrent live streaming of all sessions. No registration is required. Join the live streaming and on demand sessions from the 29th October. You can join us on the web or with the MS Communities User Group starting this Friday.

    Since 1991, the Microsoft PDC has been the centre of Microsoft's biggest platform announcements. This year will be no exception. So, make sure you join your local user group or on the web to watch the latest PDC announcements.

    URL Links

  • Mat Velloso's Blog

    Windows Phone 7 Challenge: Nearly finished!

    • 0 Comments

    And I'm very keen to see what people have been building. Feel free to drop me an e-mail with your phone app details, videos, comments or questions: mateusv@microsoft.com

    Good luck! :)

  • Mat Velloso's Blog

    Important correction about ordering your WP7 on internet, please read.

    • 0 Comments

    Hi,

    An important correction since lots of people asked this specific question:

    If you want to be one of the first buyers in the world, you can order it from the internet from 12:01, BUT the phone will be shipped to you, not delivered right away in that case. Please keep that in mind.

    Now what you can do is going to the truck tomorrow and ordering it right here. There will be devices available.

    I understand that not everyone lives in Auckland :) and for more information about availability in other cities, please check with Vodafone.

  • Mat Velloso's Blog

    Kiwis will be the first in the world to be able to buy Windows Phone 7!

    • 4 Comments

    If you didn't know that yet, it's now confirmed!

    So if you want to be one of the first in the world, the day is tomorrow (Thursday, 21st of October) and the time is 12:01am. You can do it from Vodafone website (www.vodafone.co.nz). If you do so, the phone will be shipped to you. The option 2 is to go to the Auckland’s Aotea Square at 8am and order it right here so you can have it!

    Actually we will be there earlier but the phones will only be available from 8am on. I’ll be there too so if you want to bring your app development related questions, I’ll be happy to help.

    See, New Zealand? This odd time zone has its advantages! :)

  • Mat Velloso's Blog

    Help! Can't unlock my Windows Phone 7, can't deploy my XAP file, or can't run my app!

    • 22 Comments

    Don't panic! Usually these issues are very easy to fix: 

    1-Zune software isn't installed or wrong version:

    Usually if this is the case, when you plug your phone's USB cable, Windows won't recognize it. Check if your Zune software is 04.07.1404.00 or above that.

    2-Zune software detects the phone but it says it can't connect to it:

    Look at windows device manager. If you find an "unknown device", right-click on it and try updating the driver. If this relates to Windows Phone 7, the driver can be found online and will be automatically downloaded.

    3-Zune software detects my phone but I can't deploy my XAP from Visual Studio:

    Remember you first need to register it using the "Windows Phone Developer Registration tool" (Start menu/Windows Phone Developer Tools).

    4-Trying to use the Windows Phone Developer Registration Tool but doesn't connect to my Windows Phone 7:

    Again, check the items 1 and 2. You need the right version of the Zune software and the USB driver must be right. Also remember the phone must be on and unlocked (the screen must not be asking for the password or off).

    5-Windows Phone Developer Registration tool detects my phone but doesn't proceed after I put my Live ID information:

    Likely scenario is that your Live ID isn't configured as a developer on http://create.msdn.com

    Also check if there isn't a firewall blocking your internet access.

    6-Visual Studio says I've reached an application limit and can't deploy my app:

    There is a limit for how many apps you can sideload as a developer to a single device. If you reach this limit, just uninstall one of these apps from your phone and try again.

    7-I don't have the source code, just the XAP and I need to sideload on my testing windows phone 7. How can I do it?

    If you did install and configure everything as mentioned in the previous items, you can use the "Application Deployment" tool on Start Menu/Windows Phone  Development Tools.

    8-My application runs fine on the emulator but when I run it on the device, it shuts down suddenly without any warnings. Why's that happening?

    The most likely scenario is memory. Keep in mind the OS will shut down your app if it doesn't handle memory very well. Monitor when debugging and check the RAM usage. See if you are freeing up memory accordingly. Second most likely scenario is a .Net Exception not being handled. Try debugging it.

    9-My application can't play any mp3 files. When I try it, it just fails:

    Disconnect your phone from Zune. If it is connected, it won't play. Also check if the audio file is DRMed.

    10-When my application uses the XNA library's media player to play a background music, it just quits unexpectedly:

    If you build a Silverlight app and try to use XNA to play an audio file, you have to consider a few things. First, you'll have to deal with XNA's FrameworkDispatcher.Update method, like mentioned in this article: http://www.silverlightshow.net/items/Exploring-Silverlight-XNA-integration-on-Windows-Phone-7.aspx

    Second, there are differences between DRMed and non DRMed songs. As a guideline, always call your play method within a try catch block and show a message to the user if you can't play the song explaining what is going on. Your application probably won't pass the certification if you don't do that!

    Hope that helps :)

     

  • Mat Velloso's Blog

    First kiwi application on MarketPlace!

    • 0 Comments

    Record this date: 14th of October, 2010. A (not so) small step for a team, and a huge step for New Zealand: The first kiwi made app is just there, and free!

    The application is "The official all blacks app" and you can download to your Windows Phone 7 for free (well, when you have your Windows Phone 7, I mean!).

    It looks so good that I think I'll have to start learning about Rugby.

    I’ve put some screenshots below. (By the way, I know other NZ people have been submitting their apps but the time for the certification varies depending on several factors, so watch this space!)

    Congratulations to all people at Provoke, incuding Brendon Ford, Mason Pratt, Phil Whitehead, Pablo Garcia (If I'm missing people here, I'm very sorry, you guys are all awesome!)

     

  • Mat Velloso's Blog

    Why my Trade Me application can't update the watch list?

    • 1 Comments

    Shame on me for not reading the API documentation. In my defense, I didn't have much time anyway! (Will keep using this excuse until the end of the days) :)

    If you downloaded my sample application, you found that my request token URL was looking like this:

    public static string RequestToken = "https://secure.trademe.co.nz/Oauth/RequestToken";

    It turns out that, by default, this URL won't request for writing access to anything. So you will keep getting errors every time you attempt to update the watch list unless you change this URL into something like this:

    public static string RequestToken = "https://secure.trademe.co.nz/Oauth/RequestToken?scope=MyTradeMeWrite,MyTradeMeRead,BiddingAndBuying";

    Where did I learn about this stuff? Good and old API documentation! http://developer.trademe.co.nz/api-documentation/authentication-methods/request-token/

    You will notice that once you authenticate, you'll be able to see what permissions this app is requesting from TradeMe:

     

    There you go, have fun!

  • Mat Velloso's Blog

    Building localized applications for Windows Phone

    • 0 Comments

    If you are building localized applications for Windows Phone you should read this article before submitting your app to Marketplace:

    http://msdn.microsoft.com/en-us/library/ff967550(v=VS.92).aspx

    Basically there are things to keep in mind when it comes to using the AppRes.DLL and MUI files, so avoid further issues with app certification by preparing your application according to the article's guidance (only if you are building a localized application).

     

  • Mat Velloso's Blog

    Windows Phone 7 challenge: How are you doing so far?

    • 0 Comments

    If you have 1 minute (it will probably be 5 seconds), please respond to this question: http://twtpoll.com/udd9wj

  • Mat Velloso's Blog

    My little music app

    • 0 Comments

    I always wanted to create a way of making it very easy for someone with very little music knowledge to play blues with their phones. Either a solo or with a background music or other phones.

    This is the first concept of what I had in mind:

    http://www.youtube.com/watch?v=eS7mYW1OVQA

    Now that I've built this it is pretty much obvious what the next steps should be. I'll soon build the v2.0 with quite a few interesting features. Go blues!

     

  • Mat Velloso's Blog

    SoundEffect and SoundEffectInstance classes: Performance does matter

    • 0 Comments

    An important lesson from using the SoundEffect and the SoundEffectInstance classes is how you load the wav files.

    The following code takes a while to run, so you shouldn't run it every time you want to play the same effect. Instead, load it once and only once:

     

    SoundEffect effect= SoundEffect.FromStream(TitleContainer.OpenStream("effect.wav"));

     

    Then, whenever you want to play it, all you have to do is creating an instance:

     

    SoundEffectInstance soundEffectInstance = effect.CreateInstance();

    soundEffectInstance.IsLooped = false;

    soundEffectInstance.Play();

     

    If you are doing this within a game or something where the audio response has to be very quick, it will make the whole difference. 

  • Mat Velloso's Blog

    Windows Phone 7 New Zealand challenge: Is Microsoft going to steal my application?

    • 0 Comments

    No, we won't!

    Someone asked me this question after reading the terms and conditions of the competition, more specifically this part:

    "Microsoft will judge the entries and in its sole discretion select 10 finalists who will be announced on 8 November 2010.  If you are one of the finalists, Microsoft will contact you by phone for a telephone interview.  You will also be asked to send a copy of your application (XAP file) to Microsoft for Microsoft to test on a Windows Phone 7 device. You grant Microsoft a royalty-free right to use, reproduce, modify and adapt you application for this purpose."

    http://msdn.microsoft.com/en-nz/gg232536.aspx

    Let me clarify something: The only reason we will want your XAP file is so we can test it, see if you've actually built something and that it works fine. The app is yours and will always be yours to publish to Marketplace and profit with that, being the competition winner or not. If you read the paragraph above, you will see it finishes with "for this purpose". All we want is to be able to test it, that's all.

    So go ahead, download the Windows Phone Development Tools and join the competition. :)

  • Mat Velloso's Blog

    Marketplace registration for Windows Phone 7: Double check these test cases

    • 6 Comments

    I received this e-mail today about things you should be double-checking before publishing your app at Marketplace:


    1) READ the docs!!!  Understand the application policies that represent the requirements all applications need to meet in order to pass certification testing. The Windows Phone 7 application certification requirements are posted at http://developer.windowsphone.com.   We’ve documented all the policies and requirements is detail.    Taking the 30 minutes to read this will save developers a lot of time.


    2) Know your iconography.

    Test Case 4.6 - Screen shots should encompass the full 480  x 800 dimension, must be a direct capture of the phone screen or emulator and needs to represent the correct aspect ratio.
    Test Case 4.5 – Avoid using the default Windows Mobile icons.
    Including a panorama background image is optional, but recommended. This will enable Microsoft to potentially feature your panorama image on the Marketplace catalog to help improve your application’s visibility with the likely result of more downloads.

    3) Support Information – Test Case 5.6.

    Until 10/31/2010, it is recommended that applications include the version number or support information (for example a URL or email), which is easily discoverable by end-users.
    Modify your applications now to help plan for 11/1/2010 when this test case will be enforced.

    4) Toast Notification – Test Case 6.2

    There must be the ability for the user to disable toast notification.
    On first use of HttpNotificationChannel.BindtoShellToast method, the application must ask the user for explicit permission to receive a toast notification.

    5) Applications Running Under a Locked Screen – Test Case 6.3

    This only applies to applications that continue to execute when running under the locked screen and does not apply to applications in a suspended state.
    Prompt the user for explicit permission to run under a locked screen upon first use of ApplicationIdleDetectionMode.

    6) Back Button – Test Case 5.2.4

    Back button behavior is one of the most typical failures.
    A common failure is pressing the back button during application runtime exits the application, instead of returning the application to a previous page or closing the presented menu or dialog.

    7) Themes – Test Case 5.1.1. Avoid controls and text washing-out by testing applications with the Theme Background set to “light”.


    8) Languages.  Be sure that the application description and the text the application displays to end users is localized appropriately in the target language.


    9) Failures upon Upload to the Marketplace.  There is a validation tool that assesses your application upon upload to the Marketplace. Some common failures are:

    Error 1029 – Your XAP in missing an interop manifest. Make sure the interop syntax is specified in the manifest file. If the account does not have permissions to run interop, this error message will also be generated.

    10) Windows Phone Developer Tools. Be sure to use the RTM version of the Windows Phone Developer Tools as applications built on previous tool versions will fail testing.
     

  • Mat Velloso's Blog

    Developing Windows Phone 7 Applications for SharePoint

    • 0 Comments

    Mr. Paul Stubbs posted a great article about writting apps on Windows Phone 7 for SharePoint integration:

    http://blogs.msdn.com/b/pstubbs/archive/2010/10/04/developing-windows-phone-7-applications-for-sharepoint-2010.aspx

     

  • Mat Velloso's Blog

    Game is on! The New Zealand Windows Phone 7 application competition

    • 3 Comments

    Yes! All ready to go.

    You can read more about our competition here:

    www.microsoft.co.nz/wp7challenge

    Basically we have two competition categories: A Trade Me application or a "Free Style" one.

    For the Trade Me application, I've recorded a video explaining the basics of building a Windows Phone 7 app for Trade Me.

    You can download this sample source code from here: http://tinyurl.com/trademeApp (http://tinyurl.com.au/w44)

    Also, you can read more about the new Trade Me APIs here: http://developer.trademe.co.nz/

    Please also check Trade Me's Trade mark's guidelines here:  http://www.trademe.co.nz/help/722/using-trade-mes-trade-marks-in-applications

    And also check Trade Me's terms and conditions here: http://www.trademe.co.nz/help/721/api-terms-and-conditions

    Good luck and let me know if you have any problems!

     

Page 1 of 1 (17 items)