Monday, March 29, 2010

MacBook, Windows 7 & MonoTouch

Last Friday I got myself a MacBook (it is my first one) and I gotta say that I am pretty impressed with the performance. I made the investment after seeing that it's not good to "invest" everything in just one mobile platform (in a dynamic market it's important to adapt). The first two things that I've done was to install MonoTouch trial (for iPhone development) and Windows 7 (for WP7 and Silverlight development). In W7 with all the drivers installed I have a 5.2 rating which is far better than my 2 year old laptop that I've paid 1.200 Euro (the MacBook was 899 Euro). The iPhone will still have to wait till I finish porting our S.F.A. application. I like this phone but I consider it too expensive (paying 600 Euros for an iPhone and 899 Euro for a Macbook is not balanced)
With Monotouch writing the "classical" Hello World application was really simple and you can also watch this YouTube movie. There is a lot inside the MonoTouch WiKi : database, webservices, WCF, GPS, and much more.
I really like MonoTouch and they are also working on MonoDroid.

Thursday, March 25, 2010

Good strategy Microsoft

The more I think about it the more I am convinced that Microsoft intentionally let the "trace" in the registry so someone could easily restore the functionality (they are creating the links and then delete them but they could have just released the registry without any link inside). Imagine if Microsoft would have released the emulator with everything enabled the first instinct would have been to say that around 60% of the functionality is not implemented so bad publicity. Instead they lightly "obfuscate" the ROM and leave the key in a file that can be easily accessed. This way when the modified ROM is released everybody is so pleased to have more than 2 programs that will blog/talk only about the parts that work and also have feedback (let's not forget that we hear talking about Windows Phone 7 for more than two years in which they could have achieved much more - personal opinion). They say a lot that this is the first version but what happened to the teams that developed the other versions? When Apple or Google released their mobile OS's they had the right to say that is the first version, but Microsoft has 10 years of experience in the mobile world (Pocket PC 2000 was launched in April 2000) and a lot of feedback from the users so they cannot say it's the first version like an excuse (better just say we are working on the missing features). I agree it's a revolution in user experience and development and I like it.

I am quite sure that we will see some of the most requested features in the summer Beta (native SDK, copy/paste, database support) and everybody will be happy. Microsoft is on the right track, but there is still a lot to be done.

P.S. Do I watch too much Lost :) ?

Tuesday, March 23, 2010

WP7 Design - Application List

The second design aspect I want to talk about is the Application list. It is a functionality that was never "revolutionized" and in the CTP of WP 7 it is worst than the honeycomb interface in WM 6.5 (I am referring to functionality not design).

On the WM 6.5 there are 12 icons on a page and on WP 7 there are only 10 meaning almost 20% less icons. My Omnia II has 5 "pages"of icons without installing any program which would translate in 7 "pages" on WP 7.

Being a device focused on "consumer" we expect that on the Marketplace there will be a lot of applications that will be free or cost nothing. So the consumer will install a lot of applications and keep them on the device. From this point of view iPhone is better organized as it has 16 icons per page . 5 pages on the Iphone would translate in 8 pages for WP 7.

Another aspect which I consider not optimum is the scrolling. The "partial scrolling" (not going from one page to another) gives a nice visual effect, but it's not optimizing the search because:
1. if I am scrolling means that on the current page/screen I didn't found the application that I am looking for so I don't need to see those icons anymore.
2. using partial scrolling I will never know exactly where I am and I am gonna loose myself (it happens a lot to me on my phone).

The concept of "full pages" that Apple used it's more practical. This way I will always know exactly where I am and (using some gui links) I could also jump directly to the page I'm interested in.

Anyway even with a "full page" navigation if I have a lot of applications it will not be easy to find what I search (especially if i don't remember the exact name of the application). It would be really nice to have a "real time" searching of the application name/attributes (something like "Search programs and files" in Vista and Windows 7). This functionality could also be implemented inside the bing search engine that should give us the possibility to choose between local search, web search or both).

One thing that I liked in WM 6.1 and older was the possibility to access Settings in just 2 clicks (Start-Settings). In 6.5 Settings icon got mixed inside the application list generating some confusion. It would be nice if we could have the Settings icon instead of the back arrow in the application screen of WP 7 (the back arrow is redundant cause I get the same result by pressing the windows button)

The next screen is just a concept (I am not a good designer so don't laugh about it) but in my opinion it would be a more practical approach for the Applications list.

Monday, March 22, 2010

WP7 Design - Call & End Call buttons

This post and the next one will have nothing to do with development but will be about design choices that Microsoft made for WP 7 and I don't like.

The first one is the decision to eliminate Call and End call hardware buttons in favor of Back and Search buttons. It is a strange choice to me (maybe someone could explain to me why) because the buyer is mainly buying a phone so it will mainly use it for calling. Sure the iPhone has only one button and it's selling very well but this doesn't mean that it cannot be improved.

There are two important reasons why I think they should put back the Call & End call hardware buttons:

1. It is a phone and I want to access the phone immediately from anywhere in just one click. In this moment I need at least two clicks (Window button + Phone icon) which makes me slower.

2.Almost every phone user it's used to end the call with a button without even watching the screen.

The back and search buttons are also important, but why not put them on the sides?

Off topic: What happened between HTC and Microsoft? Why isn't HTC one of the first 3 manufacturers? It is very strange as HTC was the only company that really innovated in the Windows Mobile area. Could it be because there is not much space left for innovation on WP 7 (from the manufacturer point of view) as it is a really closed OS for OEM? This way HTC won't be able to distinguish his phones from the ones produced by the other manufacturers! For LG (one of the newest manufacturers of Windows Phones), Samsung (never really created a best seller Windows Phone) and Asus (which is an old Windows Phone maker but never really invested a lot in this area) won't be a big problem if they will "share" sells of WP 7 , but on the other side more than 70% of HTC business is based on Windows Phone so they need to create "unique" phones that sell. Indeed lately HTC is releasing more Android phones than Windows Phones.


Looks like I was terrible wrong about the drivers part. BlockDevice is a totally different thing So if you are playing around for making the SharedFolder work forget about my idea. Thanks Arktronic

Saturday, March 20, 2010

Net CF 3.5 .exe on WP 7

I asked myself: would it be possible to run an executable compiled with NETCF 3.5 run on WP 7?

The answer is very simple: NO for device applications MAYBE for console applications. The reason? There is no System.Windows.Forms library in .NETCF 3.7. Maybe a native application could run but you have to consider that's a new shell in WP 7 so some things changed. For netcf apps even if you could install the old NETCF it will still not work because the shell is different.

The only solution would be to install the old shell, but doesn't make any sense to do it.

So let's stick with Silverlight and XNA.

Friday, March 19, 2010

WP7 Emulator "Unlocked" - How to

As I promised I will explain shortly how I did it. It was simple. I began with the dump XDA member l2tp did. I mainly looked at the registry file default.hv (as you can see in my other posts) and found the section were they are blocking the applications.
So I eliminated the entries in the blacklist, but I also searched the guid presented in the list in the other registry files (.rgu) and also took it out from them.
Then there was the section HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Settings that got my attention: If you look at the entries that have SecureItems you will see that looks exactly like the menus from the pda (main menu, programs and settings) so looks like the other entries are missing. Searching in the .rgu registry files looking for one of the guid that has SecureItems (the parent) I found *BF218E964AA0.rgu which inside deletes the entries:

So I added manually the entries to default.hv and eliminated from the .rgu file. I understood then that the data values is the order of the item. After searching some more I also found the file where they add the entries (but did not modified the order that I used for inserting) The file is -D53AC5900244.rgu

For extracting the rom and put it back together I've used BOOFF posted by SonicFlare on xda. You will also need the dll compress.dll present in the Wince 6.0 Platform (this because some of the files in the rom are compressed, so you will have to decompress, modify and then compress it back.

Step 2: Make the sharedfolder work in the emulator

For whoever wants to have some fun with Step 2 this is what I've found out till now:
Looks like there is a similar mechanism to block the drivers also:

It is blocking MSFlash_NAND that in my opinion is used for the shared folder. I already tried to eliminate that but looks like there is something else missing. Maybe the section where you have to look is: HKEY_LOCAL_MACHINE\System\StorageManager

Have fun!

WP7 Emulator "Unlocked"

I still cannot believe it but I did it... After a good idea, 6 hours of work and a lot a lot of digging I've unlocked the ROM image in the emulator CTP. I will describe tomorrow the method but right now I will just post some screenshots, upload the bin somewhere so I can give you the link and go to sleep cause it's almost 2 o'clock in the morning.

I will also test it better tomorrow put I saw that it has a file explorer :) and a VERY nice task manager:

I have decided to take down the link because Microsoft could get upset and I don't really want that (if someone at Microsoft will tell me that it doesn't bother them I will put it back).

Anyway I will explain later how I was able to do it (cause it was done for educational purposes only) and I think this won't cause me problems. Right? :)

Thursday, March 18, 2010

WP7 Black Listed Applications

Also in the registry there is an entry for a package manager (HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PackageManager) with a Blacklist key inside. Blacklist contains a lot of id's. I think this is the way Microsoft intends to block the applications.
I am starting to understand the reason why they want the device so closed. Imagine if you would have access at the file system you would be able to modify the registry and remove the entries in the blacklist.
Anyway combining this mechanism with the update service gives Microsoft the power to remotely block/blacklist an application running on your device (something like Apple is doing now)

Looks like there is already the list explained:
"{5B04B775-356B-4AA0-AAF8-6491FFEA5600}"=dword:0 ;Shortcut
"{5B04B775-356B-4AA0-AAF8-6491FFEA5602}"=dword:0 ;Say It
"{5B04B775-356B-4AA0-AAF8-6491FFEA5603}"=dword:0 ;Calculator
"{5B04B775-356B-4AA0-AAF8-6491FFEA5605}"=dword:0 ;~About
"{5B04B775-356B-4AA0-AAF8-6491FFEA5606}"=dword:0 ;~Date Time
"{5B04B775-356B-4AA0-AAF8-6491FFEA5607}"=dword:0 ;~Phone Lock Settings
"{5B04B775-356B-4AA0-AAF8-6491FFEA5609}"=dword:0 ;Speed Type
"{5B04B775-356B-4AA0-AAF8-6491FFEA5610}"=dword:0 ;Text
"{5B04B775-356B-4AA0-AAF8-6491FFEA5611}"=dword:0 ;Call History
"{5B04B775-356B-4AA0-AAF8-6491FFEA5612}"=dword:0 ;Calendar
"{5B04B775-356B-4AA0-AAF8-6491FFEA5614}"=dword:0 ;Email
"{5B04B775-356B-4AA0-AAF8-6491FFEA5615}"=dword:0 ;People
"{5B04B775-356B-4AA0-AAF8-6491FFEA5616}"=dword:0 ;AccountsManage
"{5B04B775-356B-4AA0-AAF8-6491FFEA5617}"=dword:0 ;Word Mobile
"{5B04B775-356B-4AA0-AAF8-6491FFEA5618}"=dword:0 ;Excel Mobile
"{5B04B775-356B-4AA0-AAF8-6491FFEA5619}"=dword:0 ;PowerPoint Mobile
"{5B04B775-356B-4AA0-AAF8-6491FFEA561A}"=dword:0 ;SharePoint Mobile
"{5B04B775-356B-4AA0-AAF8-6491FFEA561B}"=dword:0 ;OneNote Mobile
"{5B04B775-356B-4AA0-AAF8-6491FFEA561C}"=dword:0 ;~Call Settings
"{5B04B775-356B-4AA0-AAF8-6491FFEA561D}"=dword:0 ;~Contacts Settings
"{5B04B775-356B-4AA0-AAF8-6491FFEA561F}"=dword:0 ;~Cell Settings
"{5B04B775-356B-4AA0-AAF8-6491FFEA5620}"=dword:0 ;~Bluetooth Settings
"{5B04B775-356B-4AA0-AAF8-6491FFEA5621}"=dword:0 ;~Flightmode
"{5B04B775-356B-4AA0-AAF8-6491FFEA5622}"=dword:0 ;~Office Mobile Settings
"{5B04B775-356B-4AA0-AAF8-6491FFEA5623}"=dword:0 ;~Wifi Settings
"{5B04B775-356B-4AA0-AAF8-6491FFEA5624}"=dword:0 ;~OBExParser
"{5B04B775-356B-4AA0-AAF8-6491FFEA5625}"=dword:0 ;~Find My Phone
"{5B04B775-356B-4AA0-AAF8-6491FFEA5626}"=dword:0 ;~Backup Settings
"{5B04B775-356B-4AA0-AAF8-6491FFEA5630}"=dword:0 ;Zune
"{5B04B775-356B-4AA0-AAF8-6491FFEA5631}"=dword:0 ;Camera
"{5B04B775-356B-4AA0-AAF8-6491FFEA5632}"=dword:0 ;Pictures
"{5B04B775-356B-4AA0-AAF8-6491FFEA5633}"=dword:0 ;Marketplace
"{5B04B775-356B-4AA0-AAF8-6491FFEA5634}"=dword:0 ;Games
"{5B04B775-356B-4AA0-AAF8-6491FFEA5635}"=dword:0 ;Picture Camera CPL
"{5B04B775-356B-4AA0-AAF8-6491FFEA5640}"=dword:0 ;~Device Update Settings
"{5B04B775-356B-4AA0-AAF8-6491FFEA5641}"=dword:0 ;~Location Settings
"{5B04B775-356B-4AA0-AAF8-6491FFEA5642}"=dword:0 ;~Location Settings
"{5B04B775-356B-4AA0-AAF8-6491FFEA5661}"=dword:0 ;Maps
"{5B04B775-356B-4AA0-AAF8-6491FFEA5671}"=dword:0 ;Convert
"{5B04B775-356B-4AA0-AAF8-6491FFEA5672}"=dword:0 ;StartKITL
"{5687D2BD-E507-46ff-84FD-FBE296DAF170}"=dword:0 ;~brightness
"{4e466928-cdd9-438e-be16-3b2dfb18cbc9}"=dword:0 ;~sounds
"{eec1f6e1-c3b6-4da6-bbf6-0aaee694f7a1}"=dword:0 ;~about
"{3B1D7EA1-F8F2-434c-B09B-116589ED54AE}"=dword:0 ;Alarms
"{be937011-98b7-45d2-9735-6828d4c9a750}"=dword:0 ;SystemInfo
"{D76C40E0-616D-4e29-929C-B40697732696}"=dword:0 ;OfficeUrlStartToken
"{534c16be-a6d3-4560-a537-f5c9ccdb6ddc}"=dword:0 ;Microsoft Office

Maybe if we could remove those entries and rebuild the ROM image we will be able to run all the built in applications.

WP7 Under the hood - Part 1

As you probably know from my previous post the guys at XDA already made a dump of the emulator binary file. Looking a little in the registry file default.hv (my main reason is to find a way to enable all the hubs as all the files are already in the image file). Some interesting facts from the registry:

1. The new shell program it's called telshell.exe (the old one was shell32.exe). This is how the init sequence looks for the emulator:

2. The second interesting fact is the presence of the program ssupdate.exe which I think it's the UpdateAgent. In fact looking at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows we find DeviceUpdate\Agent and inside Protocol we have:

So it seems like Microsoft will be able to update the devices using Windows Update Service. Of course right now none of the links works.

3. The Silverlight version currently running on the emulator is "Version"="3.0.41020.0"

4. There is explorer.exe inside the image file. It would be enought to change default.hv and inside the Init sequence put explorer.exe to launch. This way we would have access to the file system

Still digging.....

WP7 Emulator Build

Tonight I start looking how the new emulator is integrated in Visual Studio 2010. Using Process Explorer I saw that VS launches this command:
"C:\Program Files\Microsoft XDE\1.0\XDE.exe" "C:\Program Files\Microsoft SDKs\WindowsPhone\v7.0\Emulation\Images\WM70C1.bin"

So the new Device Emulator changed name in XDE (version 10.0.30128.39) and we have the bin file that contains the emulator image. I then remembered that you can extract the files from a bin image, but the guys at XDA were already ahead. They made a dump of the ROM files. A lot of people are digging up and we might see some interested things in the next couple of days.

This is what I've found out. The new OS, build, has NET CF 3.7 embedded. I then remembered that there was a CF 3.7 cab version that was running on WM 6.5 and I got this "crazy" idea that I have to try... What if we could run the Silverlight applications that we compile for WP 7 on WM 6.5? I'm gonna dig this up tomorrow.

Anyway in the dump files I could find the Silverlight assemblies:
GAC_System.Windows.Browser_v2_0_5_0_cneutral_1.dll 129.328
GAC_System.Windows.RuntimeHost_v2_0_5_0_cneutral_1.dll 35.120
GAC_System.Windows_v2_0_5_0_cneutral_1.dll 1.038.640
that might just work on WM 6.5

and also the XNA assemblies:
GAC_Microsoft.Xna.Framework.GamerServices_v4_0_0_0_cneutral_1.dll 112.088
GAC_Microsoft.Xna.Framework.Game_v4_0_0_0_cneutral_1.dll 71.128
GAC_Microsoft.Xna.Framework.Graphics_v4_0_0_0_cneutral_1.dll 189.912
GAC_Microsoft.Xna.Framework.Input.Touch_v4_0_0_0_cneutral_1.dll 34.264
GAC_Microsoft.Xna.Framework_v4_0_0_0_cneutral_1.dll 382.424
XnaFrameworkCore.dll 357.848

XnaFrameworkCore.dll it's a native file so I think we would need one from a real device not emulator.

There is also SQL Ce Compact 3.5
GAC_System.Data.SqlServerCe_v3_5_1_0_cneutral_1.dll the version is 3.5.5722.1

And more managed assemblies:

It's a start...We can look a little under the hood of WP 7 and see how it is designed. Pretty interesting, right?

Wednesday, March 17, 2010

WP7 Series - Phone Interface

Back in February I was really upset when they didn't show the phone interface of the new WP7. For me it is still the most important part of a Phone. Today, when I saw the videos published on Engadget I understood why... Not only that it looks unfinished, but it's like they didn't really start developing that part. Why did they invest a lot of work in the XBox Live hub (avatar movements with the accelerometer) and they didn't developed a decent CTP phone interface ? (it could be my impression but they focused too much on Zune aspects - Joe Belfiore was on the Zune team right? - I once said that it looks more like iPod Touch for the iPhone instead of the iPhone itself). Don't understand me wrong... I like a lot the new WP7 but it lacks so many things that it seems a step backward. I was disappointed when Microsoft launched WM 6.5 from a developer point of view (a year after the release of 6.1 there were not many new things added) but I always thought that they were investing everything on WM7. I think a lot of developers hoped for more as they are investing time and resources developing on Microsoft mobile platform (I don't think Microsoft can afford loosing developers on the mobile platform)

But let's go back to the phone interface. I always thought that Microsoft will learn from the mistakes he made and will get a decent phone interface. Let's start with Windows Mobile 6.1:

It is a really ugly phone interface (useless to say that it was released after WM 5 phone interface which was the same). Really small buttons that usually you will have to use the pen to dial a number, a lot of space used without being optimized, informations missing.
HTC understood that this interface was a real problem for selling massmarket devices so they rewrote the interface:

they used bigger buttons, better phone dial-pad, but still a lot of space was not optimized (also because of the OS that didn't let them to)
After they saw the "decent" phone interface developed by HTC Microsoft didn't learned too much and released in 6.5 a better interface than the standard in 6.1 but worse than the one created by HTC

Why don't they learn from the iPhone or even Android? In my opinion the phone interface of the iPhone is the most usable one.

Really nice big buttons that you can press easily, essential information (I can always see the clock cause I want to know if it's not too late when I am dialing someone, or if someone calls me), the battery power and also the power of my radio signal. Nice modern UI. Anyway I think both iPhone and Android interface could be improved.

Let's see a little the WP 7 Phone interface as it is today:

The button size is ridiculous, a lot of unused space, essentially information missing. The only thing that I like is the dial-pad buttons. Remember that your potential client is buying a phone and after that everything that comes with it. If it isn't a decent phone he won't buy it.

I hope someone from Microsoft will read this post and start treating the phone interface as one of the most important pieces of the device (especially now that the OEM will not be able to personalize it). You got the background right (with silverlight you can develop awesome UI), so don't ruin it. We, developers, need that you get WP7 right as some of our work depend on it.

P.S. Going home to watch episode 8 from Lost - The final season Simplified by Windows 7 :)

Sqlite for WP 7 Series - Proof of concept

I was really excited a month ago when they announced Windows Phone 7 Series, but also disappointed because it looked unfinished. Yesterday when they released a CTP for Windows Phone development I was surprised that there is no local database support (in my opinion a step backward from Windows Mobile 6.5 and an essential feature for developing business applications).
What I've developed is a proof of concept application that implements Sqlite db engine inside Windows Phone 7 series. I've used csharp-sqlite developed by noah.hart and modified it to work with IsolatedStorage and WP7 Phone Tools CTP.
After some initial struggle with the library I wrote a simple test program:

Hope you will find it useful...

My first post

This is my first post... I intend to focus on mobile development so let's write a second post more interesting...