Friday, 13 August 2010

Smartphone Market

I saw today the Gartner chart with the smartphone market shares for the Q2 2010. What really impressed me was the "jump" Android did:

What it is interesting is that the iOS won 1% which I think it's the 1% RIM lost but everyone else lost market shares in favor of Google. Looks like it doesn't matter if you have the best OS on the market today(iOs) , but it's better to be "open" - good adoption from the hardware makers, a lot of developers/fans porting/improving/updating Android OS on hardware already on the market (almost every WM owner hopes for an Android port for their devices), wide range of prices for the hardware and developers that have almost everything that they need (multitasking, access to all the resources of the device, error reporting of the applications).
In fact I still don't understand why Microsoft "blocked" the multitasking in favor of battery life. Let full multitasking and then implement a mechanism inside the OS which warns/reports to the user how much an application "eats" in terms of processor/battery. The user can than decide if he sacrifices or not battery life for a certain application. It's always better to warn and let the owner decide than to decide for them. A lot of developers at WP7 Lab in Milano did not agreed with the new tombstoning mechanism but developers obey the rules which might not the case for the owners.
I expected/wanted so bad WP 7 to be perfect, complete from the beginning to have every functionality that it had but with the new UI/programming model instead now it has what it was missing before and misses what it already had. There is still much to be done to get back Microsoft back do to where it was two years ago in the smartphone market.

NAMASTE!

Friday, 6 August 2010

WP7 Device Tests

No I didn't got lucky to have a dev device of my own. Last Wednesday I attended the WP7 Lab event in Milano and everyone wanted a dev device. We even tried to bribe Lorenzo to "forget" some devices in the bar, but as there was only 3 devices available and he had the same event the next day in Rome we didn't got lucky. Anyway I've spent some quality time meeting new people and testing the Samsung and LG dev. phones.

The first project that I've tested was the SqliteClient. Could be my impression, but there is a big difference between how an application looks&feels on the device and on the emulator (it looks a lot better on the device). On the speed part I did some tests on insert (the select/delete work almost identically) and here are some results:

Inserting 2200 Rows with transaction:
Emulator: 0.622 sec
L.G.: 3.35 sec
SAMSUNG: 3.244 sec

Inserting 600 Rows without transaction
Emulator: 7.067 sec
L.G.: 29.054 sec
SAMSUNG: 21.676 sec

On the beta release the device it's 4-5 times slower than the emulator. The Samsung it's faster as it has the storage on a microSd compared to the LG that has it on internal flash.

The other project that I've tested was the barcode reader. On both devices the test samples worked the same as on the emulator. When it comes to the integrated camera this is where the things get a little complicated. The camera app is one of those apps that the hardware manufacture will customize. None of the drivers had a macro function. The Samsung device had no settings to set, and the focus was pretty bad. The LG had the settings menu implemented and a better focus. Without the macro function it was hard to take a "clean" picture of a barcode but when the image was good the library works really fast and precise. I expect a lot on the camera part from HTC. I have to wait October and see.

One thing that got me thinking is when I've asked if Nokia is preparing a WP7 device they didn't say yes, but didn't say no also. It would be a nice achievement for both companies because Nokia does great hardware, but I've never liked Symbian and looking at the market shares they could take WP7 into consideration.

Namaste

Sunday, 1 August 2010

WP7 ZXing Barcode

First of all I want to express my regret that I am not one of the 3.000 developers that received a WP 7 developer device (I read somewhere that there are more than 3.000 users that use Facebook from WP7). I really hoped to have a "real" device, but that's the way the cookie crumbles...
This weekend I had two days of WP 7 fun. What I've wanted to see was the use of ZXing in WP 7. There is already a C# port of the library in the ZXing trunk. Porting it to Silverlight it is quite simple (just have to replace ArrayList with generics lists and HashTable with Dictionary) more details here. So I've downloaded the latest csharp source code from ZXing trunk and compiled the library. This was the simple part because I wanted a "nice" test project. I've used the test images from the ZXing source zip as embedded resources and the gesture recognizer from Clarity Consulting this way the user is able to flick both direction between the test images. It was a project based learning because I've used MVVM and the application was following the pattern till I've ruined it with the CameraCaptureTask and PhotoChooserTask (I was not able to get them in the View Model because I don't receive the notification after I choose/capture a photo but if anyone of you can do it please enlighten me how it's done )

I cannot test CameraCaptureTask and PhotoChooserTask but maybe some of you, lucky enough to have a test device, can test it and let me know how/if it works (even in the beta dev tools the camera is poorly integrated with the apps - you will have to run again the app after selecting camera or photo and you should be able to see the selected photo in the central image of my app this way you can press the Decode button).

This is how the test project looks (don't forget to flick the image)


Here is the source code

Have a look also at this new post

NAMASTE

Friday, 23 July 2010

WP7 SqliteClient with transaction support

I've updated the preview and implemented the transaction-commit-rollback mechanism.
For 1050 rows the results are:

Without transaction: 13.088 sec
Using transaction: 0.474 sec

For more rows you will get even better results.

The link to the project is the one from the previous post

Enjoy the update

NAMASTE

Tuesday, 20 July 2010

WP7 SqliteClient Preview

WP7 developer devices are already out in the US and I still hope I will qualify for one here in Italy. I would really love to test one. Brandon PLEASE don't forget me :)
As my proposal was a better port of the Sqlite engine I did some optimizing on the engine and also implemented/adapted a SqliteClient that is easier to use than normal sqlite3 commands.
At the "engine" part I use the journal file persistent this way the engine doesn't delete and create the journal at each command. I've also eliminated SQLITE_DEBUG from conditional compilation symbols spares some temporary file access.
For the client at the beginning I've wanted to compile the System.Data and Sqlite class from Monotouch, but after looking a little bit at the source code I've realized that there are tons of things that doesn't make sense on WP7. I wanted to keep it simple and searching I've found the SqliteClient.cs written by Frank Krueger for Monotouch. I've adapted the class to run with our library and got a pretty nice result.
I've also improved the test project and now you are able to set how many rows will be inserted, select the inserted rows and see the elapsed times for insert/select commands. For the insert I've tested two methods: the first with prepare, step, finalize and the second one with sqlite3_exec (which should be the same) and the insert time are more or less the same.



Anyway it's only a preview as it was not intensively tested and because it can be improved. If some of you find ways to optimize the library please let me know and I will post it for everybody. Also let me know what you think.


Here you have the link to the source code

NAMASTE

Sunday, 18 July 2010

WP7 IsolatedStorage speed improvement



If you remember some time ago I did some tests on the IsolatedStorage and the speed was not very impressive (it was 127 slower than the FileStream). In the new beta version there is a TREMENDOUS improvement. I rerun the old test in the new emulator and these are the results:

Dividing the two values 0.0632/1.1866=0.0532 which is almost the same with FileStream. At this point it does make sense implementing/porting a database engine on IsolatedStorage. Well done WP 7 Team on this aspect.


NAMASTE

Thursday, 15 July 2010

Compact Framework Network Printing

As usual a lot of time without posting but I had no time. I am really excited about the beta tools of WP7 (2 days ago I felt asleep while installing the beta cause the only time I have is after 11 p.m.). I also did some improvements on the Sqlite port but I will post it as soon as it will be usable (I plan to compare the performance with Perst even if it's a different approach).
I am posting this because I lost almost two days and maybe someone that needs it will find it right away. My task was some labeling process using MC9090 devices and Zebra S4m printers. I decided to go for in-memory parameterized forms. The client application uses two method for connecting to the printer:
1) Some of the printers have ethernet port and it is quite simple to communicate with the printer as you will open a socket to 9100 port and send the commands to the printer. This is simple
2) Other printers are connected as shared printers from pc's. This one should also be simple but it gave me a lot of headaches and mainly from my fault. I have two approaches:

a. The classic one that you would also do on Windows applications is to invoke CreateFile with the UNC name of the shared printer. My mistake with this approach was that I set the main window as TopMost and when calling the CreateFile windows mobile it will pop up a networking window where you have to insert the user name and password to use for authentication (this even if Guest access is enabled on the shared printer). So this approach was working but as I did not see the pop up window I thought it doesn't work

b. The second one is a little bit more complex. I am invoking WNetAddConnection3 to map the printer as a local resource (when using this method you can also pass the username and the password) and than using CreateFile on the local resource. After sending everything to the printer I call WNetCancelConnection2 to remove the resource (not really optimized but works). The second one seems more stable

The only annoying thing in this moment is the POCKET PC networking pop-up that tells me that the job has finished printing. I want to disable it (I think that it's something to do with the registry) but didn't find the way yet.

I am attaching 2 files Print.cs and Networking.cs. Print.cs has two methods one with authentication and another without.

Hope someone will find it useful


Namaste


Wednesday, 23 June 2010

WP7 Suggestions

Today at Remix I had the opportunity to play for the first time with a WP7 device (it was an LG flashed with a build from last week that includes the XBOX Live hub) . The device looks nice and pretty responsive.

Playing with the LG there are some suggestions that came me to mind and that could be implemented (improvements from my point of view):

  • In the call answer menu in the current build there is a big image and two small buttons (Answer and Deny I think) . There is a lot of space for more functionality. One would be the ability to deny a call using an SMS message (I am using it every day on my Omnia 2)

  • This one I've already posted on the WP7 forum. It is important for developers to receive error reporting from applications that they've posted on Marketplace (of course ask the phone user if he agrees to send that error). It would be a feature that would make WP7 Marketplace unique and more attractive.

  • At this moment (from what I've understood) silverlight applications can only intercept the Back button. It is important to be able to intercept/use also the Search button (I saw that this functionality is currently implemented into Marketplace). This way the developer doesn't have to put another button on the UI.

Namaste

WP7 Device Request

What better time to blog than during a conference (I am attending ReMIX in Milano). As every Windows Mobile developer out there I would love to have a test device before the official launch. So when I read the post of Brandon Watson about the availability of developer devices in July I've "spammed" him with a message on Facebook and he put me in contact with Microsoft Italia. Today I had the pleasure to talk with Lorenzo Barbieri which told me that it will be difficult (almost impossible) to have a test device without an application proposal that really requires a device (because in Italy there will not be many devices available and there are some "big names" in the queue to which Microsoft wants to "push" the new device to). Of course I started processing to find something that would justify a developer device. The bad thing is that all our end-user applications rely on "features" that are missing from the initial release of WP7: Wasabi (used internally by Maybelline Italia, Mediaset, Samsung, L'Oreal developed for DP&V) uses Sql Ce with replication so is definitely out, our s.f.a. solutions (Neomobile, Memo) are using printing so without socket they are also out (I have to look at HP WebPrinter which might be a solution for this part). The good thing is that I could finish (or at least make it usable) the Sqlite library for WP7 (my second post on the blog). I will definitely need a device to test :) this way I don't risk to develop/optimize something that isn't usable on a real device.

Hope my proposal qualifies

Namaste

Sunday, 20 June 2010

WP7 Marketplace Limit download size over 3G

I was looking at the Teched sessions and one of the aspects that cut my interest was the limit for application download using 3G network (maximum 20MB). It's a choice that Apple made and from my experience with the end user they are loosing clients for some applications. For example A friend of mine that owns an iPhone, uses it, loves it but is not able to connect it to a PC via iTunes. It's not said that somebody that will own a WP7 will also know how to connect it to a PC (it's a sad reality but it's like this). A lot of people will buy a "trendy" phone but don't know how to use a PC, or more are not interested in connecting the phone to the pc.
Another scenario would be that I am in a town, don't have a car navigator but I need to arrive in some place in town and I don't have an internet connection besides the one my WP7. In this case I would happily pay 40Euro to download TomTom with Italy map and I would wait 5-10 minutes to download it (download size around 400MB).
So why "block" the user buy applications that they are interested/need it? The price in Italy for unlimited data traffic it's really small (Tim Italy offers unlimited unlimited data transfer from for just 2 Euro/week but only from the phone)? Ericsson declared that the world wide data traffic over the cellular network surpassed the voice traffic.
If battery it's a problem wait for the user to connect the power plug. I personally would prefer not to power up my pc, connect the phone and download the application especially if it doesn't matter if I download using 3G or ADSL. You are also cutting off the users that don't have internet at home but have the latest phone on the market in their pockets and those are the users for which the price doesn't really matter.

The only reason I can think of is if the voice provider Vodafone, T-Mobile is imposing a maximum download size (it would be strange, but also in that case I cannot believe that all the providers have the same conditions).


So my way would be WARN THE USER but if he agrees DON'T LIMIT HIM

Namaste

Monday, 14 June 2010

WP7 Multilanguage App Proof Of Concept

For quite a while I wanted to write this post but always the same problem NO TIME. There is nothing innovative, but it's something that you might need/use in your apps. As you know I am romanian, I live in Italy and I usually develop in english :). So we usually add multilingual support to our solutions. The way we did it in previous version of Windows Mobile(Phone) is using xml files. I've implemented this mechanism slightly changed for WP7. I've added xml language files as resources to the solution. Each xml file has a tag which gives us the culture.
language name="English" culture="en-US"
I use it to set CurrentCulture and CurrentCultureUI of the current thread (it's just a proof of concept that can be improved).
Inside the language tag we have all the classes (xaml pages) with the various controls and properties that need to be set :

class name="MainPage" Title="Main Page"
control name="textBlockPageTitle" Text="MY APPLICATION"
Obviously it's easier to look at the code than to explain it. I also use a singleton class to share the XDoc, loaded from the xaml language, between various pages of the project and also to "translate" the pages.



There are still some problems with the ApplicationBar as there is no way to get a reference to the MenuItem using the name (when you debug the property doesn't even exist). I think it's a problem/missing feauture of the CTP. The solution I've adopted is to add a control name that doesn't exist on the page "AppBarMenuItem" that has 2 attributes Index and Text. This way I use the index to set the text of the MenuItem

control name="AppBarMenuItem" Index="1" Text="First"

The sample attached to this post is a project with 2 pages. If you need more details or you think it's useful please let me know

MultilanguageApp.rar

NAMASTE

Tuesday, 25 May 2010

WP7 Need for list with integrated search

A lot of time since my last post, but it's a really busy period. This is a small "inconvenient" when you own a small and have a lot of projects. I would love to have more time for blogging. This will be a small post...

Maybe you've already read about this on other blogs, but seem that there are some lucky developers that can already develop/test/debug on a real device.

First of all ... I WANT ONE TOO :) Maybe we will get lucky and the guys XDA (especially
DA_G) will be able to
port the leaked Mondrian ROM to other devices. It would be even nicer to have a developer device directly from Microsoft given/sold to developers registered on Windows Marketplace (I am not one of them yet). It will have to be a NoBrand device for development purpose which will have access to the beta versions of the WP7 OS (something like Apple does now) ?

But let me get to the post. When I watched the video posted with Windows Phone 7 startup/setup there are 2 aspects that I didn't like and I've already talked about both of them in my previous posts.

  • The first aspect is the "ugly" buttons that are a little too small for my taste.
  • The second one is the list where you have to choose the Time Zone. It's not
    practical and the user is very very slow to find/select what it needs (it's true that you won't set the Time Zone every day, but it's about the speed of finding what you need in a list with many items). Why not just put an embedded search option? It could be implemented on the properties of the ItemsSource. Wouldn't be easier to just pop up the keyboard and write +01 to filter the list to all items on GMT +01, or Rom and have Rome directly? Sure the developer could implement this functionality but I would love to have it already there and to have the possibility to enable/disable. They need to put this functionality on the Application list also otherwise the user will get "nuts" trying to find an application.

Microsoft Help Us to Help You


Namaste!





Tuesday, 11 May 2010

WP7 Memory Requirements

Finally some time for blogging. Let's go to the subject...

The new "unlocked" image gives the possibility to do some tests of how much memory does WP7 eat as OS and also how much memory the developed apps occupy.
The emulator starts with 77 MB occupied. To understand how much that changed in comparison to previous versions I started all the other emulators I have installed on my development system and this is the result:

Not so bad... The memory requirement only doubled (the same happened when they passed from PPC2003 to WM5).
As the apps don't offer the option to exit them programmatically I've started launching all included applications. Arriving at 160 MB of memory occupied the emulator doesn't work correctly anymore and you will get screens like these ones:
























This may be a bug of the RC emulator image, but I still prefer a GOOD OLD EXIT function for my apps.
I than run some tests to see how much memory a simple application occupies. The "empty" application generated by VS 2010 started with the debugging option occupies around 8 MB of memory and without debugging 6MB. I did the same test on Win32 and NET CF and grouped the results in a chart:


Let's say that an empty app that does nothing and occupies 6MB means that the framework is not yet optimized. It would be interesting to see how much memory requires a more complex application. Looking at this chart I think Microsoft should offer the possibility to develop natively or using NETCF on the WP7 platform.

Then there is the whole Running,Paused,Suspended,Resume mechanism that doesn't convince me 100%. If the OS decides when to suspend(kill) an application why doesn't the OS automatically save the state of the suspended application and then when the app resumes the OS could automatically reload the last state? The OS has access to the File System which is faster than IsolatedStorage accessible to the user. Personally I prefer the "old" way to work with the apps not this one that seems copied from the iPhone OS. In fact the whole OS looks like is developed taking iPhone as a model and not looking at what was good in the old OS. They erased not only what was bad but also what was good like the possibility to group the applications in folders which was implemented since Pocket PC , that misses in WP7 and which will be implemented in iPhone OS4.

In hope I will find more time for blogging.
In the meanwhile NAMASTE!

Friday, 30 April 2010

WP7 Build 6176 "Unlocked"

A long time without blogging but it was a really full period. I would love to have more time for writing and testing, but I have some "stressing" deadlines.
As you probably know Microsoft released the new version of the Windows Phone 7 Development tools and there is a new version of the emulator. The old "unlock method" still works and there is already an unlocked version on XDA Developers and you can download the image here. The new version of the bin doesn't work on the old XDE emulator because there seem to be some changes in XDE hardware emulation. The unlocked image pretty snappy and there are also some new programs.
The best thing is that the unlocked emulator image works for debbuging in VS 2010 on my newly installed Windows 7 x64 on myApple macbook (I've reinstalled 3 times the macbook last week cause I configured more partitions for windows and I finally managed to replace my old Asus notebook). One of the things I've noticed is that an "empty" application uses 12 MBytes of RAM which seems a lot for an app that does nothing.
Hope I will have more time for testing! Have fun with the new tools

Wednesday, 14 April 2010

WP7 IsolatedStorage Backup/Restore

One of the drawbacks of the WP7 Emulator is that it doesn't save the state between sessions and also it is difficult to deploy a file with your project and then use it. This means that every time you start a new session of the emulator you loose all the data on the IsolatedStorage.
I've developed a small solution (there is room for improvement) for backing-up and restoring the files (folder structure included) of the IsolatedStorage. It is using an WCF service that stores/sends file content from/to the IsolatedStorage in/from a folder named Backup located in the WCF project folder. For optimizing the communication the service uses binaryMessageEncoding. It also splits the files in 100Kbytes parts (you can modify this size from the source code if you want bigger parts- it will be faster) .
The solution is easy to use even if it took me a lot of time to make it work (especially the readerQuotas, maxBufferSize, maxStringContentLength). In fact I was having "fun" with it at 3 o'clock in the morning. If you want to backup your IsolatedStorage just hit backup and it will write the content of IsolateStorage in the Backup folder of the pc. If you want to restore/copy files to the IsolatedStorage copy the files/folders you want to the Backup folder of the PC and then hit Restore and it will copy all the data to the IsolatedStorage.

Hope you'll like it! Don't forget to modify the ServiceReferences.ClientConfig before you run the project



























As usual you can download the Source code

Monday, 12 April 2010

WP7 IsolatedStorage Speed

I was wondering if it makes any sense fully implementing SQLite on IsolatedStorage as the "quality" of the db support will depend a lot on the speed of of the storage. I read on some posts that the speed of IsolatedStorage was a problem, but I've wanted to compare it with the speed of the Filestream. The problem is that you cannot compare the two directly so I had the idea to compare both of them with another "item" that is available on both systems. I've chosen a MemoryStream test as a constant. I am not making the same test between MemoryStream and IsolatedStorage or between MemoryStream and FileStream as I am not interested on how much faster is MemoryStream (that's why on the real device FileStream seems faster then MemoryStream but it's not true as it is not the same amount of data). I run the test for 10 times and then make an average (to have a more precise result)

























Dividing IsolatedStorage/MemoryStreamSpeed=8.5991/1.2251=7.019 and FileStream/MemoryStream= 0.7/12.7=0.05511. To get an idea about the speed differences we devide the two results and we get 127.3634 which means that the IsolatedStorage is 127 times slower than FileStream. Of course this is not an exact result, but should reflect the speed difference. I might have some "glitches" in the tests but I cannot figure them out. If this result is at least near to the real one it doesn't make any sense to implement db engine on IsolatedStorage.

Another thing that I've noticed is that the x86 implementation of WP7 Emulator is much faster then the ARM emulation of 6.5 Emulator (at least MemoryStream implementation).

You can download the projects here

Wednesday, 7 April 2010

iPhone Printing using MonoTouch - Proof of concept

Printing from the iPhone (also iPad I presume) it's not an impossible task (as it is in WP7 for the moment). It can be done using a network printer connected to the device using wireless radio (infrastructure or Ad hoc mode). As there is no internal driver for printing developers will have to write an interface to the printer. The "task" is pretty big as there are many programming languages for printers: HP PCL5, Epson ESC/P, PostScript, Zebra Programming Language, ASCII printers and many more. Using socket programing available in MonoTouch it is possible to communicate/print to any network printer, but it would be easier to have a "unified" interface like the ones available on WinCE (PrinterCE, PrintCE), libraries that can be
ported to the iPhone.
The attached sample it's not simple line printing but implements a small part of the PCL5 interface. It will print two boxes and some text on any PCL5 compatible network printer (if you have such a printer you can try it). The only two parameters required are the IP of the printer and the port used for communication (usually 9100).
Let's hope that soon we will see PrinterTouch or PrintTouch library :). If you need more details or find this post useful please let me know.

I will continue my "quest" for developing a small S.F.A. application on the iPhone and/or iPad using MonoTouch.


SocketPrint

Thursday, 1 April 2010

WP7 CTP SDK or HOW TO GET THE DEVELOPERS FRUSTRATED

Initially this post was about WP7 Printing. Two days ago I thought that it would be nice to write about printing from WP 7 and iPhone and the only "compatible" that I could think of was using a WiFi printer (on the iPhone the bluetooth stack doesn't have implemented the SPP and you have to hack it ). It's something I've already did years ago in Compact Framework when I wasn't using PrinterCE or PrintCe and wanted to share it cause it is a new beginning and at some point in a small business application you will need to print something. (it was a proof of concept).
I got everything prepared and started writing the WP7 app when I saw that in the System.Net there is no socket support. I've started digging up, again, in the emulators files wanting to see if the System.Net file is the same on the emulator with the one in the SDK ("\Program Files\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0\Profile\WindowsPhone"). What I've found out using Reflector is that there is no System.Net in the emulator image, but all the functionality is implemented in mscorlib.dll and there is also the Socket class fully implemented. What Microsoft did is to "cripple" the assemblies in the OS for the SDK. They made the version to be 2.0.5 (for some of the files) which will make compiled programs run just fine on 3.7 which is the the version on the emulator. mscorlib for example in the development tools is 428kb and on the emulator is 1,18MB. Almost every assembly in the SDK is "crippled". If you want to compare the sizes just download this zip.
I wanted to see if I can pass this restriction but the answer is no because the classes that are not available in the SDK assemblies on the emulator are compiled with the tag [FrameworkVisibilitySilverlightInternal, SecuritySafeCritical] (there is more than one tag) which results in a MethodAccessException if you try to use it.
Printing just turned out into frustration. Sockets are there, database support it's there, Microsoft can use it but developers cannot. It's not that it is not implemented (like copy/paste), but somebody decided that it's not safe to use them. On WP7 forum somebody said that this functionality could compromise the user experience and it is not ready for prime time. It is strange cause we have being using sockets and database in NETCF programs for years and never influenced the user experience or seemed not ready.
WP7 is a nice platform but developers don't have what they need, and some of this it's because Microsoft decided that they don't need it. WebIS don't have what they need, Resco also, Mozilla stops development on WM and one week later they have an Android beta version, Skype don't have a WM version anymore should be enough reasons to change attitude.
Microsoft needs developers



Monday, 29 March 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.

Wednesday, 24 March 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, 23 March 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, 22 March 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.

Sunday, 21 March 2010

BlockDevice

Looks like I was terrible wrong about the drivers part. BlockDevice is a totally different thing http://en.wikipedia.org/wiki/Block_device#Block_devices So if you are playing around for making the SharedFolder work forget about my idea. Thanks Arktronic

Friday, 19 March 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.

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!

Thursday, 18 March 2010

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? :)

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:
REGEDIT4
[HKEY_LOCAL_MACHINE\Software\Microsoft\PackageManager\BlackList]
"{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:
"Launch20"="device.dll"
"Depend20"=hex:06,00
"Launch21"="coldinit.exe"
"Depend21"=hex:14,00
"Launch30"="gwes.dll"
"Depend30"=hex:15,00
"Launch35"="coreoslaunch.dll"
"Depend35"=hex:1E,00
"Launch40"="telshell.exe"
"Depend40"=hex:23,00
"Launch41"="ssupdate.exe"
"Depend41"=hex:28,00
"Launch55"="dmsrv.exe"
"Depend55"=hex:15,00
"Launch60"="servicesStart.exe"
"Depend60"=hex:14,00
"Launch61"="ciphase2.exe"
"Depend61"=hex:28,00,3C,00
"Launch95"="cprog.exe"
"Depend95"=hex:3D,00
"Launch98"="EmulatorStub.exe"
"Depend98"=hex:14,00
"Launch140"="k.mscoree3_7.dll"

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:
"MuReDirCabUrl1"="http://wm7dudftest/TestTrust/duredir.cab"
"MuReDirCabUrl2"="http://download.microsoft.com/WM/7/microsoftsupdate/redir/duredir.cab"
"MuReDirCabUrl3"="http://windows.update.microsoft.com/WM/7/microsoftsupdate/redir/duredir.cab"
"ReportingServerUrl"="http://test.stats.update.microsoft.com"

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.....

Wednesday, 17 March 2010

WP7 Emulator Build 7.0.0.6077

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 7.0.0.6077, 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:
GAC_Microsoft.Devices_v2_0_5_0_cneutral_1.dll
GAC_Microsoft.Phone.Controls.Navigation_v2_0_5_0_cneutral_1.dll
GAC_Microsoft.Phone.Controls.WebBrowserInterop_v2_0_5_0_cneutral_1.dll
GAC_Microsoft.Phone.Controls.WebBrowser_v1_0_0_0_cneutral_1.dll
GAC_Microsoft.Phone.Controls_v1_0_0_0_cneutral_1.dll
GAC_Microsoft.Phone.Execution_v1_0_0_0_cneutral_1.dll
GAC_Microsoft.Phone.Info_v1_0_0_0_cneutral_1.dll
GAC_Microsoft.Phone.License_v2_0_5_0_cneutral_1.dll
GAC_Microsoft.Phone.Notification_v2_0_5_0_cneutral_1.dll
GAC_Microsoft.Phone.Shell.Interop_v2_0_5_0_cneutral_1.dll
GAC_Microsoft.Phone.Shell_v1_0_0_0_cneutral_1.dll
GAC_Microsoft.Phone.TaskModel.Interop_v2_0_5_0_cneutral_1.dll
GAC_Microsoft.Phone.Tasks_v2_0_5_0_cneutral_1.dll
GAC_System.Device.Location_v2_0_5_0_cneutral_1.dll
GAC_CaptureApiManaged_v1_0_0_0_cneutral_1.dll


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






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 :)