Mar 10 2010

Why Haven't You Downloaded the XNA SDK Yet?

Category: Mobile | XNAJoel Ivory Johnson @ 11:50

On a podcast the other day one of the members was a little upset that a Windows Phone 7 Series SDK isn't yet available. While the SDK will be welcomed I'm not completly convinced that its curreny lack of availability is a road block for developers

XNA Game Studio 3.1 is available right now and if you download it you can start getting used to the SDK on your PC. If you have a ZuneHD or an Xbox 360 you can use those too. The SDK is really easy to use. You can grab it from http://creators.xna.com

While you are at it check out the 800+ games that are currently available that were written in XNA. There are some pretty cool looking games in the catalogue.

Tags: ,

Mar 9 2010

Coming Soon, XNA Game Studio 4.0

Category: Mobile | XNAJoel Ivory Johnson @ 11:08

Today Microsoft announced XNA Game Studio 4.0. New to XNA Game Studio is support for Windows Phone 7 Series, the Xbox Live APIs, access to the WAVE devices, and the notion of a managed and non-managed developer.

Where Microsoft technologies are concerned I'm used to managed being almost synonymous with developers targetting the .Net CLR. It means something different in this context. A managed developer is one with which Microsoft has partnered. Developers with Managed status have access to the Xbox Live APIs. non-managed developers would include hobiest and any one else not partnered with Microsoft.

Tags: ,

Mar 8 2010

I Was in Episode 323 of MSMobiles.com

Category: Mobile | PodcastJoel Ivory Johnson @ 08:51

This past week MSMobiles.com invited me to participate in their podcast (episode 322 ). He wanted a developer's perspective over the next few weeks so I'll also be on the podcast in the forthcoming episodes 323 on March 15 and 324

Tags: , ,

Mar 8 2010

Atlanta Mobile Developer's Group

Category: Community | MobileJoel Ivory Johnson @ 08:39

It's been about a year since the last time there was a Mobile Code Camp here in the Atlanta area. I was looking forward to getting together with some developers to talk about the recent news that Microsoft has had with Windows Phone 7 Series and didn't want to wait until the next code camp to talk with others (BTW: I have been communicating with developers online about WP7S but sometimes face-to-face contact is preferred.

I initially had no success in finding a group but I finally found the Atlanta Mobile Developer's Group on Meetup.com. My original plans were for this blogposting to be about my experience. Sadly the meeting this week had to be cancelled.

All the same I'm glad I found a group. Had I not found one I was prepared to start my own (I still might do so!).

If you are looking for a group in your area I encourage you to at the least open a meetup.com account and put something on your profile mentioning your interest in mobile development. Even if you don't start up a group when some one near you does they'll be able to find you based on common interest and invite you to join.

Tags:

Mar 7 2010

Silverlight base Applications on Windows Phones a Good Thing

Category: MobileJoel Ivory Johnson @ 05:54

Some one at MSMobiles.com gave me the top Silverlight on Windows Phone 7 Series is Good and asked me to write something to fit that topic. So I did, and now it is published. If you are interested go read it.. And remember whether you agree or disagree make your views known in the forums!

Tags: ,

Mar 7 2010

Counting Apps in Other Marketplaces

Category: MobileJoel Ivory Johnson @ 03:53

With the updates to the Windows Marketplace for Mobile one of the new capabilities added was the ability to view applications in other markets. With the new found capability I've seen that some users have tried to switch to the USA marketplace and are led to believe that the USA marketplace has a certain number of applications. The number that the user concludes is always less than the number of applications actually available in the USA marketplace.

Within the developer dashboard a developer can set the prie that customers in other markets see when viewing the application. These prices do not have to be the same after currency conversions, so I could set the price of an item in the USA market to be 1.99 USD for the SA market and free for some other market.

If I don't set the price for the application at all for a market then that Market won't be able to see the applcation. So this is another factor to consider if you are unable to see an application in the Marketplace.

Tags: ,

Mar 4 2010

Confirmed: Windws Phone 7 Series uses Silverlight and XNA

Category: MobileJoel Ivory Johnson @ 14:48

I was reading through the Q&A from @wp7sdev and saw confirmation that Silverlight and XNA are going to be the main development technologies for Windows Phone 7 Series. This information had been leaked by xda-developers.com a few weeks ago but I wanted to wait until I heard word through official channels before really talking about it. WP7S phones will not be backwards compatible with Windows Mobile 6.5 applications at all. It is entirely new.  So what does this mean for me?

I already play with XNA on my Zune and my Xbox and I work with Silverlight on a daily basis for my occupation. So I've already got a background with the technologies. Since it is relevant to Windows Mobile I'll be blogging about it here!  What does this mean for the Windows Mobile 6.x technologies and me?  Microsoft says they will still be investing in those technologies so I'll be blogging about them for as long as Microsoft is supporting them.

I did a few presentations on Silverlight a year and I still have the videos on them. They are actually on this site some where! (though only people at the presentation know the URL. Sorry, my bandwidth on this site is limited). I'llsee about updating them, re-recording them, and getting them uploaded to YouTube.com.

Tags: ,

Mar 3 2010

Submitting and Application to the Windows Marketplace for Mobile

Category: MobileJoel Ivory Johnson @ 12:18

In case you've never seen how to upload an application into the Windows Marketplace for Mobile I shot a video of the process last night and made it available on YouTube. Sorry, YouTube.com only allows me to upload videos up to 10 minutes in size and this was 15 minutes. So I had to upload it as two videos.

Tags: , , ,

Mar 2 2010

Answers for Common Questions in the Smart Device Forums

Category: MobileJoel Ivory Johnson @ 01:45

In what originally struck me as odd Chunsheng Tang of Microsoft posted questions in the MSDN Smart Device forums and then posted the answers to his own questions. He is one of the modorators for the MSDN forums and usually answers questions, but never asks questions. When I took a closer look at the threads it made sense. The questions he was posting are questions that are commonly asked by developers and he was posting reference material for when those questions come up in the future.

It's always nice to have a reference that can be brought up when users post some of these common questions. If you are active in the forums I encourage you to bookmark these threads so that you have quick access to them when users ask these questions.

Tags: ,

Feb 27 2010

Sharing Source Files Among Projects

Category: Desktop and Server | MobileJoel Ivory Johnson @ 06:01

There are times when you will want to share the same source code among several projects. A common way to do so is with a shared assembly; you put common functionality in one project and then share the output among several other projects. But at times this solution isn't suitable such as when you have functionality that you plan to share across more than one .Net runtime (ex: Desktop Framework, Compact Framework, and Silverlight Runtime). For these cases you can copy your source code to the projects for all three run times. But then you end up with three branches of code and may need to make sure thay are synced up with each other.

It is possible to use the same source file in different projects by adding a link for the file from another project so that each project is using the same runtime. Since it is the same physical files changes to the file done from one project are visible to all the projects using the same linked file. Adding a linked file is easy. To link to one file's project from another right-click on the project, select Add->Existing Item and navigate to the file. Once you've found the file click on it and then click on the down triangle on the Add button and select "Add as Link."

A potential problem from using this solution is you may have items in a class that you don't want to be visible in another class. You can selectivly hide sections of code using a few preprocessor directives. As a simple example let's say I made a Windows Form application and I have all of the files from it linked to a second project. I have code in a method that is setting the text on a label. But I want the text to be set differently depending on the project in which it is run. The preprocessor directives I will use are #if, #else, and #endif.

#if App1
            txtMyMessage.Text="Hello from App1";
#else
            txtMyMessage.Text = "Hello from App2";
#endif

In the above code only the C# code in the #else, block will be compiled. The code in the #if block will be ignore. For my first project I want to code in the #if block to be used. To accomplish this I need to add a Conditional Compilation Symbol. I right-click on the project and select Properties. Under the Build tab I can add conditional compilation symbols. I've done this for the first project and have added a symbol named App1. So now the first block of code will get compiled and the second block ignored.

While this solution has it's advantages it is not the end-all solution for sharing functionality across projects. If you find yourself using excessive conditional compilation blocks in your code then you may have reached a point at which it is better off having two seperate source files.

Tags:

Feb 25 2010

Avoid the Undocumented and Unsupported functions

Category: Desktop and Server | MobileJoel Ivory Johnson @ 11:53

Between the MSDN forums and some e-mails that I've received I am seeing a common theme among some of the questions; they deal with undocumented features of Windows phones. My advice when it comes to such features is that it is better to avoid them than to try an figure out how to make something work with an undocumented feature.

One might call me lazy for this, but it is not from laziness that I give this advice. Using undocumented features comes with some risks. One risk is that a program that uses an undocumented feature may have reduced compatibility across devices and firmware versions. My first encounter with this is when I was writing an article on Windows Mobile Power Management. During the time that I was writing it an update was made available for my TyTn II from Windows Mobile 6.0 to 6.1. After the update some of the code examples I had written no longer worked because of changes in the power manager.

If you look through the MSDN documentation on Windows Phones you'll see that it is mixed with the documentation on Windows Embedded CE (which makes since given that that Windows Phone operating systems are derived from Windows Embedded CE. On some of the pages you'll see that a certain feature is supported on Windows Embedded CE but not Supported on Windows Mobile. Sometimes when you will see a feature listed as supported on Windows Embedded CE but not on Windows Phones even though you can find Windows Phones that have the feature implemented. For items like this you'll find that the functionality may be optional (and thus not on all Windows phones) and/or the implementation may have a lot of dependencies on OEM decisions (and may not work the way that you would expect). Another example is customizing a notification icon that shows up in the task bar. Doing this was agains the Made for Windows Mobile guidelines. And if you take a look at Windows Mobile 6.5.3 you'll see that this old technique may not work on newer devices

The ramification of making programs that require functionality that may or may not be present and may or may not behave a certain way when present is that your program could end up with limited compatibility and inconsistent stability across devices.

The same functions are not undocumented and unsupported to every one. OEMs (who are implementing the device, drivers, and portions of the operating system) will have documentation and support for many of the low level functions available in Windows. Manu of these functions aren't mentioned in MSDN documentation. Application developers typically need higher level access to the device and generally less of these functions will be available to them.

I'm not labelling all instances of using undocumented and unsupported features as bad. There are actually quite a few scenarios in which this provides some pretty nice solutions. When applied with discipline everything has its place. So I'm stating this more as a general rule and thing that for the general case these areas of functionality are better left untouched for general development.

Tags:

Feb 25 2010

Windows Graphic and UI APIs

Category: Mobile | XNAJoel Ivory Johnson @ 06:14

After having another conversation in which I was explaining some of the various graphic APIs available to Windows I ended up pulling some information out of my personal notes to make a list of the most populate Windows graphic APIs and their availability on Windows Phones. I gave the information to some one at MSMobiles.com and he has posted it on his site.

That being said, I think that's the third reference to MSMobiles I've made in the past month or two. As you may guess I am a regular reader of that site and listener of the podcast. I'm not quite sure if I would classify it as a pro Windows or anti-Windows site yet though :-). Calling itself the "Fox News of Microsoft Mobile News" I have to say it's an interesting site and the primary author is talented at wording things in a way to invoke reactions.

Tags: , , ,

Feb 24 2010

Visual Studio 2010 Resources RC Resources

Category: Desktop and Server | MobileJoel Ivory Johnson @ 10:59

@MSDN_Forum posted some good resources on getting started with Visual Studio 2010 Release Candidate.

Tags:

Feb 20 2010

How Many Submission Credits do I have Left?

Category: MobileJoel Ivory Johnson @ 02:40

Currently in the Marketplace developer's portal there's no way to check and see how many submissions you have left. You see a count when submitting a submission but no where else. Mike Liu posted a suggestion on how to find out how many submissions you have left.

Hi All,

To check how many credits you have, you may create a dummy entry and enter sufficient data so it is in "Ready for certification".

Click "Submit for certification", check the count on the confirmation page, and cancel.

Though not ideal, it's a handy workaround I use myself.


Regards,


Mike, Microsoft

Tags: , ,

Feb 19 2010

Windows Phone Deployment Patterns Part 1 of n

Category: MobileJoel Ivory Johnson @ 15:47

One of the readers of this site contacted me via e-mail having read the first post in this series.  He wanted to know how to get one of the sharp looking icons in the start menu that you may have seen in Windows Mobile 6.5. We sent a few e-mails back and forth, identified a few obstacles, but got the icon on the start menu. The icons in the Windows Mobile 6.5 start menu are PNG files. You'll have to make a registry entry for your custom PNG icon to show up.  The registry location use is one that may be protected on devices with certain security settings. To ensure that an installation with a custom icon properly occurs the CAB will need to be signed. If you are distributing through the WindowsMarketplace for Mobile this will be done for you. Once security requirements are ment your CAB should have no problem registering the PNG. I'll cover two things in this post. (1) lowering the security requirements on your development device and (2) creating a deployment that will register the icon

Lowering the Security Requirements of your Development Device

There are two ways to lower/view the security settings on your device that I'll cover. One is using the Visual Studio Device Security Manager (Tools->Device Security Manager). If you are using a physical device connect it to your computer before you perform these steps. Once you start the Device Security Manager click on "Connect to Device" in it to select either the physical device connected to your computer or one of the emulators. After the the security tool connects select the "Security Off" profile and then click on "Deploy to Device" (I would love to discuss the meanings of the different profiles here but that strays to far from the set goal of this post).

The procedures for doing this with the Security Powertoy are pretty much the same. The one difference to note is that if you are running a 64-bit machine you'll find the Power Toy to be unusable unless you use the coreflags.exe tool.

What Needs to Occur for the Icon to Show?

By default Windows Mobile 6.5 will use your applications icon in the Windows Mobile 6.5 start menu. To use the PNG a registry entry needs to be made to associate your application's shortcut with the PNG file. The registry key must be created in [HKLM\Security\Shell\StartInfo\Start\MyShortCutName.lnk] where "MyShortCutName.lnk" is the name of the short cut icon for your application. You will need to create a new string key in this location named "Icon" that is set to the path to your PNG icon.

What do you need to do to make all of this happen? Start off with creating a deployment project as I described in part 0 of this series. In addition to the project output (executable) that you add to the deployment also add the PNG file for the icon you want to use. Right-click on the deployment project and select View->Registry to open the registry editor. The registry editor will show a series of folders representing the registry entries. Right-click on the HKEY_LOCAL_MACHINE folder and select "New Key." When prompted for the name of the key enter "Security". Continue to do this until you've created the full set of keys I've described above. After you create your "MyShortcutIcon.lnk" key you will need to create the string entry for it. Select your MyShortcutIconKey and then right-click in the pane to the right of the registry entried. Select New->String Value. Enter "Icon" for the name of the entry and "%InstallDir%\MyPngFileName.png" for the value (where MyPngFileName.png is the name of your PNG file).

If you compile your application and build your deployment you will have an installation that may or may not cause your custom icon to display. This is because of a race condition. The shortcut for the application is created before the registry entry is created. If the Sheel process happens to see the shortcut befor the registry entry is made then it will cache the shortcut icon instead of the PNG icon. If this happens your custom PNG icon will not show up until after the device resets. To avoid this problem you need to ensure that the registry entry is made before the shortcut icon is made. Unfortunatly there is no built-in support in Visual Studio to control the order of actions but all is not lost. To get around this problem I used a solution from Mike J. Francis. The solution that he provides consist of making an XML file that contains a set of install actions to create the shortcut icon instead of having the shortcut.lnk deployed through the file system editor.

 

Tags: , ,