Saturday, 25 December 2010

WP7 Barcode Scanning using ZXing and Microsoft.Phone.Media.Extended

     When I first saw this blog post from Kevin Marshall it crossed my mind that it could be used for barcode scanning in order to get the same user experience you have on Android and iPhone. I've contacted Kevin to give me some details/source code for the project and a few days ago he sent me his project that is already posted on his blog here. Kevin also thought of the possibility to use it for barcode scanning, but his sample works only with QR codes. Looking at the project I saw that he was using VideoCamera class that has no Focus capability needed to take a "clean" picture of the barcode. The PhotoCamera class, on the other hand, has Focus  implemented so I simply changed the class from VideoCamera to Photocamera. In the Grab method I call the Focus method and then using the AutoFocusCompleted event I decode the barcode. For decoding I use my ZXing port. The results are pretty good as you can see in this video I've uploaded to YouTube. There are some optimizations that can be done like cropping the WritableBitmap at the dimensions of the red rectangle, but even with the full image (640x480) the speed was acceptable on my LG Optimus 7 .
     The source code and the xap of the app (that you can deploy if you have a developer/unlocked phone) are included in my latest release of the ZXing port available on CodePlex. To compile the source you will need to follow the steps Kevin indicated in this post and also you will find some hints/files here. If you start a new project you will also need to add   "ID_CAP_CAMERA" capability to WMAppManifest.xml. This, for the moment, is a hack and I don't think the application will pass Microsoft certification, but you can try. 
  "Reflecting" Microsoft.Phone.Media.Extended I saw no reason why Microsoft won't give access to developers to this assembly (put it in the SDK)! Why limit developers to do great apps when this is the first thing Microsoft needs for the Windows Phone Platform? 
     Special thanks to Kevin for the source code.


NAMASTE

Thursday, 23 December 2010

DropBox library for Windows Phone 7

    So here it is.... I finally published the DropBox client library on CodePlex. It is a fully functional Dropbox client library for Windows Phone 7 and it is the same I've used to build BoxFiles. The first version of BoxFiles received a pretty bad review from http://wmpoweruser.com as it was using only the official API that doesn't have any method for generating links to files (the only way to open a file in Windows Phone 7), but after some searching I've found the API and I think that the current version (1.3) is a pretty good app. I will keep my bad review as they asked 50$ to review the application again. In the following weeks I will publish a new version of the Backup/Restore IsolatedStorage project using Dropbox instead of WCF.
  I've put a lot of work in this library so if you use it please sustain my work by buying the application and please "try" not to publish a similar app to BoxFiles on the Marketplace. 
   I've also published the Sqlite and the ZXing projects on CodePlex so you can grab the source code directly from there.

  I wish you a Merry Christmas!


NAMASTE

Thursday, 16 December 2010

A phone lifetime: an epic battle between Microsoft and OEM

     Looking back at my blog it seems pretty dead, but I intend to catch up as I am on vacation traveling to Brazil and Bolivia so I have some spare time for writing. It's more than a month since I finished the Dropbox client library (that I will soon post on Codeplex) and also Boxfiles for Dropbox which is the application I am trying to publish on the Marketplace. The whole publishing process was (still is as the app is not yet certified) quite an adventure and even with the support of Microsoft Italy, which I thank, it can take up to one month to have a "functional" AppHub account.
    Getting back to the title of the post. I don't know if there is/will be a battle between Microsoft and the hardware OEM, but I really hope so. I am referring to updating your windows phone 7 device. There are already rumors on the web about the "Mango" release and also about Windows Phone 8. From this point of view Apple has a winning strategy. Buying an iPhone gives the owner the certainty that his device will be up-to-date for at least 2 years (2 major releases- the one installed on the phone and the next one). On the other side there is Google and Android where the majority of the OEM choose not to update the phone OS version even if it's a minor release like 2.1 to 2.2 so in less than 6 months you will have an outdated OS. In this moment having an updated iPhone costs less in two years than having an updated Android phone. So what will be Microsoft position for the new Windows Phone? In the previous version of their mobile platform users were usually left behind between OS version updates (or to be more precise left at the OEM mercy), but the releases of updates/new versions were not so frequent which lead to the "death" of the platform on the consumer side and focus on the enterprise side were having and updated device is not so important.  I hope that Microsoft will battle to bring updates to the OEM devices for at least 2 years which is a logical choice as almost every phone operator will give you a device at an affordable price if you sign-up for at least 24 months. That would be a big plus in the battle with Android platform. 
        So who will win? Microsoft or the OEM? Will Microsoft be interested to update the devices for 24 months and loose some earning from OS licenses but give the users more confidence with the platform and compensate with Marketplace earnings?  My feeling is that the devices out now will be obsolete in one year and won't get any updates.  Maybe this is one of the reasons why the sales are not as good as everyone expected them to be: it is the first version, things are still missing and if I buy a phone now it will not be updated to the next version. Will see...


NAMASTE

Tuesday, 9 November 2010

Telerik RadControls for Windows Phone 7

     I am really happy that Telerik decided to develop controls for WP7. I have been using their silverlight controls since 2007 and they always added great controls. You can already download and try the CTP from the following this link . Even if it's just a CTP there are already many useful controls (Animation, DatePicker, DockPanel, PhoneApplicationFrame, DockPanel, TimePicker, Transition Control, UniformGrid, Window, WrapPanel, LayoutTransform, PickerBox, InfiniteListBox) . I would love to see a ProgressIndicator also and a decent MessageBox (I really don't like the default one). Also if you present a friend that downloads the tools you have the opportunity to win one of the 5 Windows Phone 7.  

   As always it's been a crazy period and I have little (no) time for writing code for the blog. Anyway when I find some spare time (usually from 1 o'clock in the morning till 3) I work on a DropBox library for WP7 (My Greatest Work Almost Completed) that I hope to publish soon along with an updated version of the IsolatedStorage Backup/Restore solution using DropBox. Everything works great: upload, download , create/delete folders and I am pretty excited. It could be a good alternative to Skydrive support that won't be available till early 2011. 

     I've also added a PayPal donation link at the blog this way if you find the source code on this blog useful feel free to donate (the donation will be invested in a brand new Windows Phone 7).

P.S. Wish I could have attended TechEd Europe. I really envy all of you that are attending.

NAMASTE

Thursday, 4 November 2010

The Mobile Developer Journey



You have to look at the full size image

Wednesday, 3 November 2010

How to localize The Title in a WP7 Silverlight application

This is a really interesting post by Pietro Brambati. It combines C++ and Silverlight projects:

http://blogs.msdn.com/b/pietrobr/archive/2010/11/01/how-to-localize-the-title-in-a-wp7-silverlight-application.aspx

Friday, 8 October 2010

WP7 on HTC HD2

Looks like there is hope on getting WP7 running on HD2 thank to Cotulla (you can follow his progress on Twitter http://twitter.com/CotullaCode )

http://www.youtube.com/watch?v=8f_NJatLVQk

In this case HTC HD2 will become the first phone that runs WM 6.5, Android 2.2 and WP 7.


NAMASTE

Wednesday, 6 October 2010

25 years

It's impressive how things have changed in 25 years.


1983
http://www.youtube.com/watch?v=NVtxEA7AEHg

2007
http://www.youtube.com/watch?v=_5Z7eal4uXI

Monday, 4 October 2010

WP7 Multi-language v2

 While working on my WP7 app I had to improve the multi-language library I've posted earlier on my blog http://sviluppomobile.blogspot.com/2010/06/wp7-multilanguage-app-proof-of-concept.html.

What's new in v2:

  1. The LanguageSingleton class has now resources that can be accessed using an indexed property. In the published sample the Save messagebox uses the indexed property lang["MainPage.Messages.saved"] ) 
  2. The LanguageSingleton class implements LanguageChanged property so that every window could set the localized resources when the language changes (in this case is the ItemSource for the PickerBoxDialog developed by Alex Yakhnin)
  3. Implemented multi-language support for ApplicationBarIconButton (the same mechanism using button index as the one used for ApplicationBarMenuItem

I am still not sure if this is the easiest way to implement multi-language support (if someone has a better way to do it please send me a message and I will post it). There is also the M.V.V.M. way, but I think it would be more code to write to obtain the same result.


NAMASTE

Saturday, 2 October 2010

WP7 Device The End of the First Contact

            Today I got an email from Microsoft Italia telling me that I have to send back the test device :(. I think the main reason is that I was not able to deliver an App in short time, but it's not like I didn't tried. September was a crazy month with all my client coming back from holidays and start calling so the only time I had to develop was at night so the results were not as I expect them to be . Anyway I improved a lot the multi-language module (I will post later on the blog the new version) and the app for the Marketplace is UNDER CONSTRUCTION. I wish I had more time to test/improve the sqlite library, the barcode library, but guess I will have to wait and buy a device. 
             So this concludes my first contact with a Windows Phone 7 device. It was short (2 weeks), but intense :). I used it as a daily phone and the overall experience was good. There are some things that I would want them different:

  1. This is the one that bothered me the most: when you are in a call the End call window doesn't cover all the display and the End call button is almost at the bottom of it and too small. The bad part is that a lot of times (especially when I was driving) I pressed a region lower than the button so instead of ending the call it went to the background and had to bring it back by pressing the title
  2. When reading the emails (especially the unread ones) and delete a message the phone brings you back to the list with all the messages instead I would like to automatically go to the next email in the list.
  3. The right arrow in the main screen "eats" a lot of vertical space. That space is completely wasted. It would be much better to take it out and navigate from Home screen to Application List using the Windows button. Maybe three tiles in a row on the homescreen would not be a bad idea.
  4. I really miss the Call and End Call hardware buttons.It is true that you have the OnScreen buttons, but you have to look at the screen and then press End Call button which is not very "intuitive" for a person that did not used an iPhone (my mom left the phone opened for 20 minutes because she did not pressed the end call button)
  5. It would be nice to be able to enable/disable WiFi and Bluetooth from the Homescreen this way you won't have to go to Start->Applications->Settings->Wifi ->Enable/Disable or Start->Settings->WiFi->Enable/Disable if you pinned Settings to start screen. It's something I used a lot in order to save battery power.
  6. Bing doesn't search inside your contacts, emails or calendars. You can however use search inside People hub and inside each of the inboxes (using bing search on the phone it would enable to search emails on all your inboxes in only one search). You cannot search inside your calendar that would be pretty useful feature (let's say you don't remember someone's birthday date)
  7. I miss the possibility to search a contact using the phone keyboard and not the extended one (the t9 search). The keyboard is great but I was used to search contacts with the onscreen phone keyboard in Windows Mobile
  8. Still hate the application list. It is as unusable as I thought it would be. Everything is in alphabetical order without possibility to reorder items so if you are a developer you should use the first letters of the alphabet to name your app this way you have a good probability to have it in the first screen of the application list.
  9. Need to add pdf read capability to emails. This is a MUST but I think it will be available at launch as the email app already takes you to the marketplace to download the reader that, for the moment, it's not available.  
  10. Office is not a theme aware application. If you use light or dark themes it doesn't change and it is light :)
What are the 7 :) things  I loved about WP7:
  1. Touchscreen experience 
  2. Fluid user interface 
  3. Great keyboard and loved that you can use more than one language keyboard at the same time
  4. One tile for each email account
  5. One calendar to rule them all, one calendar to find them all, one calendar to bring them all and in the darkness bind them :) - depends if your theme is dark or light
  6. Notifications
  7. Great development tools 
What I didn't test and used:
  1. Music and video
  2. Xbox Live
  3. Pictures
The success of the platform will depend a lot on the apps in the Marketplace so if you are a developer try to be there from the start. 


NAMASTE

Monday, 27 September 2010

WP7 Ads

Definitely not the best way to promote Windows Phone 7:


The sad part it's that somebody (hope not Microsoft) paid for this ads when it's common sense that this is a crap.

Wednesday, 22 September 2010

WP7 Application Settings on IsolatedStorage


I'm starting to put together pieces for my WP7 application and one of the features I needed is to save/load application settings. There is already an integrated mechanism using IsolatedStorageSettings.ApplicationSettings, but I've implemented it using an XML file located on the IsolatedStorage. The main reason why I don't use the default one is because I want to upload/backup the file to DropBox or SkyDrive making it possible to share the same settings between various versions of the same application running on different platforms (in my case iOS and WP7) and also the user can restore the settings of an application when he changes the phone or reinstalls the application.

The VS2010 solution I am posting at the end of this entry is structured in 3 projects:

1. ConfigManager is the library used for settings management. It can read/write the settings. It also implements an indexed property, but as WP7 v1 uses Silverlight 3 it's not possible to use bindind to indexed properties (this feature is only available from Silverlight 4). If you want to directly bind settings to UI elements you will have to create bind-able properties . If the configuration file is not found on the IsolatedStorage the library will try to restore the file from Content (have a look at the sample TestConfig). It is possible to manually add values to the settings. There is nothing extraordinary in the source code.
2. TestConfig is a sample project that uses the library ConfigManager. It has a default configuration file deployed in Content (settings.xml). One of the things to pay attention to if you are binding to textboxes is to be sure that the binding is updated before saving the settings (this because if a textbox has focus, you modify it's value and select save settings you will loose the modifications if the binding is not updated). This is why I force the update of the source on TextChanged event:
((TextBox)sender).GetBindingExpression(TextBox.TextProperty).UpdateSource();
not a very elegant solution but it's the only one I found till now.
3. TestConfigMVVM is the same test project using MVVM light library. I did not include a settings file in the content and I load the default values manually.

Hope you will find the library useful and that you could spare the time I've spent in developing this part. The next post will be on synchronization with DropBox.



NAMASTE

Monday, 20 September 2010

WP7 Deploy Db as Content File

Some readers asked me about the possibility to use a database file deployed as Content with the project. Using the file directly from the content folder it is not possible as we do not have read/write access to content files. In fact if we use only the silverlight assemblies we don't have access to any content file. The solution is to use TitleContainer.Openstream from Microsoft.Xna.Framework (a reference should be added manually to your project) to read the content file and then save it to the IsolatedStorage. Once we have the file on IsolatedStorage we can use SQLiteClient to access it.

I've published an updated version of the SQLiteClient project adding a content file (test.db) and there is also ExecuteScalar inside the SQLiteCommand class.



Wednesday, 15 September 2010

WP7 Device Test Day One

Today was my first day of testing a WP7 device as my primary phone. Got the device on Monday, but being a really crazy week, I only got time to configure it today. Still have to install this weekend the development environment(I hope that tomorrow they will release the RTM also for the test devices cause I have a "clean" install of VS 2010 and I would like to keep it that way). The device is the LG and the build is the one that works with the beta tools.
In the past two days knowing that I don't have time to use/configure it I did some tests and got some interesting points. The first one was from my colleague Marius that, in the home screen kept pressing the windows(Start) button and not the arrow to go to the programs. This got me thinking that maybe it would be a good idea to be able to go to the Programs list when pressing Start(Windows) in the Home screen. The second person I gave the phone to play was my wife. She currently owns a Blackberry and I've wanted to see how she'll like the device. Bad luck... Maybe she was a little tired and wasn't in the right mood for trying new things but she didn't like the UI and gave up pretty quick (even if I told her to try the Facebook experience). Another colleague of mine (that owns an Android) returned the phone after 30 minutes of playing even if I've told him that he could play all evening as I did not had time (I will ask him why). So the feedback from the others was not as positive as I was expecting.
No let's get back to my experience. A bug that I've noticed in the beta build is in the initial wizard if you don't have the SIM card and you try to configure the windows live account it will block the device (the user should be able to configure the Wifi before configuring the windows live account in the intial wizard). I also got a "freeze" today using voice search with the word pizza :). At the beginning I did the mistake to add my Facebook account. Don't get me wrong I like the integrated experience but Facebook "polluted" my contact list with 200 people (and I don't have many friends on Facebook) which for me are not really important as phone contacts. I usually surf facebook if I have 10 minutes free time. For me it would be more suitable an Facebook application. So I took out the Facebook account and synchronized everything (calendar and contacts) using Google (it was quite an adventure to find the right programs that synchronize Outlook 2010 with my gmail account). I was good to go to test the phone.
The overall experience is good. The software keyboard is really good (but not better than the one on the iPhone or iPod touch). I have the impression that there is a lot of "wasted" space in the UI. For example when you are in a call you have the Speaker, Mute, Hold, Add speaker buttons that are small and then there is a lot of unused space. They could be a little bigger (even if the precision of the touchscreen is amazing but it would be for visibility and symmetry). Also the font is a little too small in some screens (in the home screen if you don't have really good eyes you will have some difficulties reading the screen). The worst designed part of the phone is still the Application list. It is in alphabetical order and the only thing you can do is to pin an app to the home screen or scroll scroll scroll. I've even tried, from the application list, to press search without being connected to the internet and wrote Marketplace but the result was empty. Let's hope that in the RTM this part will work. Anyway the application list is unusable when you have a lot of applications on the phone.
I am very excited to have a "real" test device and hope soon to start/have time to deliver some apps, modules.

P.S. Today in the car I was trying to call a person and I don't know what I was keep pressing that the phone was asking me if I want to delete the contact (got it at least 3 times today). Strange....


NAMASTE

Friday, 10 September 2010

Get Monotouch with 15% discount

Apple decided to take out the restrictions introduced in the iOS Developer Program earlier this year making Monotouch a "SAFE" environment to develop apps for iOS. Novell is celebrating this decision by offering a 15% discount on Monotouch for the next two weeks. If you are interested just use the discount code "MONO-331" on http://monotouch.net/Store

Friday, 3 September 2010

I hate marketing people

This post was not planned, but I have to write about it. The only reason I am not buying the iPhone 4 is the price. Today, watching the Apple presentation from 1st of September, got another confirmation. The new iPod Touch 32GB, that even Steve Jobs calls an iPhone without the phone and seems to have the exact same hardware of the iPhone, costs (in Italy) 309 Euros. The iPhone4 on the other hand 32GB costs 779 Euro, so 479 Euro for the Skyworks SKY77541/42 GSM module. That's why I hate marketing people: they decide. If they say the product will sell for that much that will be the price, but if you pass on the excitement of having a "cool" gadget you realize it doesn't worth the money. So I guess I will buy an iPod Touch for development and debugging.

P.S. Microsoft should be careful and react fast cause they are completely loosing a market on which they had some shares (that would be the PDA without a phone). The devices are still widely used (especially for restaurants) and will be used for gaming, apps. The iPod Touch is not only music anymore. Again Microsoft will have to choose a name for the OS because Windows Phone 7 without a phone it would be Windows 7 :) which is not the best choice. They've changed so many time the name of the mobile OS so one more won't count. Anyway a Windows Phone 7 without a phone makes a lot of sense to me


NAMASTE

Thursday, 2 September 2010

C# for Mobile Development

A long time without blogging but I have some ideas for my next two posts (will be on Windows Mobile). Today I wanted to talk about developing on mobile platforms. Two weeks ago I joined the Monodroid preview version. So in this moment a C# developer is able to develop on all 3 major mobile platforms (Microsoft, Apple and Google).
My personal opinion on each of the development platforms:
I will start with Android and Monodroid which is the newest arrived. The integration with Visual Studio 2010 is fabulous (they plan to integrate with MonoDevelop also). I was impressed of the "activity" on the Monodroid list since launching of the preview (I have almost 500 messages in 2 weeks and it's not a preview opened to everybody) and even if it's a really early version and most of the things don't work (I've tried to use threading and sqlite library to do some comparative tests but nothing worked) there are already good ideas and a lot of interest to develop on this platform. One of the most "nasty" aspects of Android is developing the UI but Daniel Cazzulino from Clarius Consulting proposed to realize a "fake" WPF UI control just to leverage the designer, and then have a custom serialization that would transform the XAML to the android markup (this way it would be possible to use Blend too). Another aspect about Monodroid that doesn't convince me is the fact that almost everything is a "proxy" to the correspondent Java object so when you run your program every object creates another object in Java and of course this influences on memory requirements and performance. I wanted to test the Sqlite library because is not a Java wrapper and I could have a speed comparison between the Java program and the same Monodroid program (when Sqlite will work I will post the results). Then there is the runtime which has to be installed on the device. So for now I would not pay for Monodroid just to be able to write code in C# which is linked to Java (of course personal opinion and a lot of things can change when they release the first version of Monodroid) .
Then there is iOS and Monotouch. This a "mature" platform arrived at version 3.0. I love the fact that in the end the code is compiled to native code so you won't loose performance. The developer designs the interface with Apple tools and then link them to C#. You have access to feautures missing in WP 7 v1 like sockets, database and the newest one that will come to iOS 4.2 is PRINTING (if you read my blog you probably know that I am pretty "obsessed" with database and printing). Let's hope Microsoft will take Apple example and implement missing features really fast (I am referring at games for mobile where Microsoft is ahead of everyone but Apple just announced on the 1st of September the Game center and my feeling is that Google is preparing something similar for Android 3.0 for the end of the year). I think Monotouch worth every penny the only doubt remains if Apple will ever "block" the apps developed in Monotouch (they don't have any reason, but I've seen some prepotent behavior from Apple lately). You will need a MAC for developing.
The last but not least is WP7. It's is the most integrated development platform. It has everything a developer needs for development (I am not referring to the missing features of WP7) and it's FREE. I am waiting for the first devices to hit the market and "play" some more (I would have loved to have a "test" device and blog about the experience with the phone from usability to development).
In the following weeks I will also test and blog about the new controls from Resco for WP7 and Monotouch.

NAMASTE

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!