José Roberto's profileJosé Roberto SiqueiraPhotosBlogListsMore ![]() | Help |
|
September 26 Problem creating data-bound DataGrid in Device ProjectFonte: http://www.pluralsight.com/community/blogs/jimw/archive/2008/04/08/50683.aspx The other day while working in Visual Studio 2008, I encountered an unexpected error while attempting to create a DataGrid by dragging a table from the Data Sources pane onto a form (something we've all done many times). At first Visual Studio appeared to be creating the DataGrid and associated components (BindingSource, TableAdapter, etc.) correctly but then Visual Studio threw an error: An error occurred while performing the drop:
The error message might have been useful if I had access to the Visual Studio source code – but I was just using Visual Studio, not building it. Needless to say, the error message was of little help. J So I did what we all do in such situations, used trial-and-error. The project calls a WCF service through a proxy generated by NetCfSvcUtil.exe; as an experiment, I decided to remove the WCF proxy from the project (and any calls to the proxy) to see what happened. … VOILA … Visual Studio was then able to create the DataGrid with no problem. To verify what I had observed, I added the WCF proxy (and any associated calls) back into the project and deleted the DataGrid. Just as before, when I tried to create the DataGrid, Visual Studio threw the same error – so now I know where to start looking for the problem. When I checked out the source file for the WCF proxy I realized that there was no namespace declaration. As you may know, if you run the NetCFSvcUtil without specifying the "/namespace" option then the types are not placed within a namespace…. So as an attempt at a solution, I created the WCF proxy so that the contained types were in a namespace (and added the appropriate using statement to the form class) – I then deleted the DataGrid from the form. Now when I dragged the table from the DataSource pane to the form, the DataGrid was created without any trouble - putting the types in a namespace completely resolved the problem. The program also compiles and runs as expected. Now things are working – My assumption at this point was that there must have been a type name conflict (or something similar) between the WCF proxy types and the DataGrid-related types; seemed a reasonable assumption. … BUT… here's the thing … To confirm my assumption about the name conflict, I created the WCF proxy so that the contained types were not in a namespace (and of course removed the associated using statements) but left the generated DataGrid place. If there were a type name conflict between the DataGrid-related types and the WCF proxy the compiler should report the error … BUT … get this … The code compiles and runs perfectly --- the namespace was required for Visual Studio to create the DataGrid (and/or associated components) but the namespace is not required for the code to compile and run -- what?!?! So what does this all mean? … At this point my guess is that Visual Studio and the DataGrid creation process have a type name sensitivity that may not be consistent with the .NET CF language requirements. If that is the case it would appear to indicate a possible bug but can't be 100% certain until the problem is narrowed down specifically. I haven't had a chance to narrow down things further quite yet but I hopefully will shortly. As soon as I have the answer I'll post it here. One thing to keep in mind, if you do run into the error I describe above, look for any possible name conflicts or classes outside of a namespace. It seems that there's a good chance that that's the source of the problem. I hope to have more to report soon. Using LINQ to Access SQL Server Compact Directly – A follow upFonte: http://www.pluralsight.com/community/blogs/jimw/archive/2008/04/18/50753.aspx You may recall my webcast from about 6/7 weeks ago where I talked about how to use custom extension methods to allow your mobile device applications to efficiently query a SQL Server Compact (SSC) databases directly. I received a question today regarding the webcast. The question relates to the verbosity of returning anonymous types when using the technique discussed in the webcast. For example… var records = from order in resultSet The verbosity is necessary because "order" in the above LINQ statement is of type SqlCeUpdatableRecord. Although Visual Studio supports generating typed-wrappers for SqlCeResultSet, it doesn't generate wrappers for the SqlCeUpdatableRecord corresponding to the SqlCeResultSet. With that being the case, specifying the individual column values within the anonymous type declaration requires you to use either the indexer (or Getxxx functions). Ultimately there's nothing we can do about the way the column values are accessed (unless you write your own typed-wrapper generator for SqlCeUpdatableRecord). What we can do is move the code that creates the anonymous type into a separate function. private object ShippingColumns(SqlCeUpdatableRecord order) With that, the LINQ statement becomes very simple. var records = from order in resultSet Once we move the anonymous type declaration to a separate function we can take things one step further and optimize the column access by caching the column ordinals and then retrieving the column values using the Getxxx functions. private object ShippingColumns(SqlCeUpdatableRecord order) Although not a huge performance increase, storing the column indices does eliminate the overhead of the indexer looking up the column name each time. More importantly, using the strongly-typed Getxxx functions eliminates the overhead of boxing any column values that are value-types. As you know, excessive boxing creates a lot of scrap objects which leads to increased memory and garbage collection overhead. Using regular class methods like those above work just fine; however, if you find that you use a common anonymous type throughout different parts of your application, you may want to use an extension method – extension methods are also nice just because of their class-member-like syntax. public static class ResultSetExtension With the extension method, the LINQ statement becomes… var records = from order in resultSet A couple of notes before I finish up… One thing to keep in mind is that all of these functions that create the anonymous type have a return type of object. This means that the IEnumerable<T> collection that is created by the LINQ statement will be of type IEnumerable<object> rather than IEnumerable<compiler_generated_type>. In most cases this difference does not matter but it is something to be aware of. And for a final note, if you do find yourself returning the same anonymous type construct from a number of LINQ statements, you might want to consider defining an explicit type and then constructing instances of that type within the LINQ statement. In my experience, anytime I find myself using an anonymous type/function/etc. more than once or twice that I ultimately end up needing access to it in my code in a non-anonymous fashion. To return a specific type from a LINQ statement, simply define a type that has a constructor that accepts a SqlCeUpdatableRecord and assigns the desired columns to the corresponding type members – basically the constructor will look like the ShippingColumns methods shown above. Assuming that you've defined a class named ShipInfo with the appropriate constructor, your LINQ statement would look like the following… var records = from order in resultSet I've updated one of the samples from the original webcast to include examples of what we've talked about in this post. If you'd like the updated sample, you can download it from here. The methods you'll want to look at in the download are menuRedefineType_Click, menuDynamicType_Click, menuDynamicTypeExtMethod_Click all of which are in the Form1.cs source file. Debugging device cellular connection code without ActiveSync interferenceI had a situation today where I needed to debug some code that used Connection Manager to establish a cellular connection. The challenge was that the connectivity problem was only observed on certain devices therefore I couldn't use the Device Emulator & Cellular Emulator to debug … I needed to debug on a real device. This all sounds simple enough until you start to try and do it… In order to debug application code using Visual Studio, I have to connect the device to my desktop using ActiveSync or WMDC. Now here's the problem… I want my application to establish a cellular connection but ActiveSync/WMDC provide the device with network connectivity … as a result any call to ConnMgrEstablishConnection or ConnMgrEstablishConnectionSync to establish the network connection returns with a successful connection but not a cellular connection because Connection Manager is recognizing that the current ActiveSync/WMDC connection meets the application's network connectivity requirements. I could modify my code to explicitly establish a cellular connection but I want to debug the application code as it will run in real life. In real life, I want Connection Manager to choose the appropriate connection … I just need to debug the cellular scenario right now. I have to say that I did stare at my screen for a minute or so wondering what kind of kludge I could come up with to get the device to not use ActiveSync/WMDC and then I realized … the answer is quite simple. Windows Mobile manages connections as connecting to Work Network or connecting to The Internet. Since I'm trying to create a cellular connection, I want an Internet connection. All I need to do is tell the device that ActiveSync/WMDC doesn't provide Internet connections. On the ActiveSync Connection Settings dialog there's a selection that reads "This computer is connected to:" with a default value of Automatic. Simply changing that setting from Automatic to Work Network solves all my problems.
Now when I call connection manager requesting a connection that reaches a location on the Internet, Connection Manager looks at the ActiveSync/WMDC setting and determines that ActiveSync/WMDC connection cannot meet that requirement; therefore, Connection Manager looks for other choices which then initiates a new Cellular Connection just as it would in the field when not connected to ActiveSync. Viola … I can debug my cellular connectivity code J Like many of us, I've often found the whole Windows Mobile Work Network vs. The Internet connectivity handling to be a bit of a pain but in this case it did make my life easier. Of course what would be even better is to have a way to explicitly do what I really wanted to do… setup an application debugging scenario that let's one choose whether ActiveSync should be considered a viable connection route during application debugging. Mozilla confirms Firefox Mobile is coming in 2010Fonte: http://www.unwiredview.com/2008/09/19/mozilla-confirms-firefox-mobile-is-coming-in-2010/ Mozilla is a lot like Google: they tirelessly innovate at what they do best. Or at least, that’s the public’s perception of them. So in view of giving users more flexibility when it comes to browsing the Internet on their mobile phones or other handheld devices, Mozilla plans to introduce a mobile version of the Firefox web browser by 2010. Granted, 2010 is still quite a long wait, but then again, creating a mobile version of one of the world’s most popular browsers isn’t exactly a piece of cake. And hopefully, Mozilla will use its time to make mobile Firefox hassle-free for users. The mobile version of Firefox would be pitted against the likes of Opera Mini, Internet Explorer, and Mobile Safari, and should adopt the same “desktop feel” as its desktop counterpart. Apart from what’s mentioned, no other details about mobile Firefox were provided. We guess it’s up to 2010 for us to wait, then. Via The Register Update: Well, there’s a piece of good news. Apparently there was some misunderstanding in the article TheRegister reported and you might see mobile Firefox much earlier. The alpha version for geeks might be even out by the end of this year. Here’s comment we received from Tristan Nitot from Mozilla Europe: Dear Unwiredview.com, I think there is a slight misunderstanding: I’ve never announced a shipping date for Firefox Mobile. Ever. The reason why is that I don’t know when it’s going to be released. However - and this is probably how you have got the information wrong - my colleague Mitchell Baker, has posted about our 2010 goals on her blog: http://blog.lizardwrangler.com/2008/09/11/proposed-2010-goals/ . It does mention Mobile. She explains in more details in a subsequent post: > I saw one press article wondering if including “have an effective product in the mobile space” in our 2010 goals means that we won’t ship something interesting until 2010. That is not the case at all. We will ship well before then. The intent of this goal was to say: in 2010 when we look at where we are, it should be screamingly obvious that we’ve done this. That means releasing a good product much sooner, seeing good results and acceptance, and seeing those results grow over time. Source: http://blog.lizardwrangler.com/2008/09/21/diving-deeper-into-the-proposed-2010-goal-for-mobile/ I have discussed Firefox Mobile (codenamed Fennec) in the past saying that we should see an Alpha pre-version hopefully before the end of the year if it’s ready. I would appreciate if you could edit your article accordingly. –Tristan Nitot small utility: cab batch install (a batch installer) with sourceFonte: http://forum.xda-developers.com/showthread.php?t=407885 Introdution: How to use: Problems: Todo: Note: Acknowledge: Attached Files
TCPMP new VS2008 builds for WM6.1 with FLV built inFonte: http://pockethacks.com/tcpmp-new-vs2008-builds-for-wm61-with-flv-built-in/
These new builds have 2 main advantages over the original builds: 1) They run on the latest Windows Mobile 6.1 ROMS where the original build crashes (crash.txt message). On the Kaiser you must use ‘GDI’ or ‘Raw FrameBuffer’ for decent performance, unless you have the latest WM6.1 roms which have Directdraw working at a reasonable pace. Changelog recomp-02 Added MPEG4.PLG from source found in TCPMP 0.66 recomp-03 - 27/5/08 Installs and runs on WM2003 devices How to format SD and SDHC memory cardsFonte: http://pockethacks.com/how-to-format-sd-and-sdhc-memory-cards/ Panasonic SDFormatter - the universal format tool for SD and SDHC cards. This tool also supports the biggest SDHC cards (16 GB capacity or more) and format them correctly, with some options: Format type: Quick, Full Erase ON and OFF Format size: adjustment: ON/OFF
Windows Mobile 7 deve atrasar um semestreFonte: http://info.abril.com.br/aberto/infonews/092008/23092008-3.shl SÃO PAULO - Parceiros da Microsoft esperavam o Windows Mobile 7 para o início de 2009, mas estréia deve atrasar. Embora a Microsoft nunca tenha definido uma data exata para a estréia do Windows Mobile, fabricantes de celulares parceiros da companhia acreditavam contar com o sinal verde da Microsoft para oferecer dispositivos com a nova versão do Windows já no início de 2009. De acordo com a Cnet, a Microsoft entrou em contato com integradores de celulares para avisar que a estréia do novo sistema operacional móvel só deverá ser possível no segundo semestre do ano que vem. A notícia é um forte revés para os parceiros da Microsoft, que precisam competir com os novos recursos do iPhone 3G, novos modelos da RIM e com os celulares que rodarão Android, o sistema operacional promovido pelo Google. Nesta terça (23), a T-Mobile e a HTC vão exibir o primeiro smartphone com Android. Entre os recursos que a Microsoft desenvolve para o Windows 7 estão adaptar o sistema operacional para suportar os novos recursos do Internet Explorer desenvolvidos, originalmente, para desktops. Outras características são o reconhecimento de gestos via câmera do celular e aplicativo para reconhecimento de voz, que permitirá realizar operações no celular por gestos ou voz. September 23 Oxios Memory 1.40Fonte: http://www.oxios.com/memory/
Oxios Memory 1.40Release memory on your Windows Mobile (Freeware)Oxios Hibernate attempts to release as much memory as possible without damaging the internal state of the Windows Mobile device (Pocket PC or Smartphone). Oxios CloseApps closes down other applications by sending "Close" messages. Oxios Hibernate 1.40 WM_HIBERNATE is a window message that is generated by the Windows operating system and sent to an application when system resources are running low. All applications should get the message and handle it by attempting to release as many resources as possible by unloading processes, destroying windows, or freeing up as much local storage as possible without damaging the internal state of the system.Oxios Hibernate sends WM_HIBERNATE to all applications. Oxios CloseApps 1.40Each process started on a Windows Mobile-based Smartphone allocates memory, which cannot be released but is automatically freed when the application process ends.Oxios CloseApps closes down all applications by sending WM_CLOSE messages. Info: There is no way to suppress the dialog box! Recommendation: Add a Speed Dial on it! It enables you to activate it using a single key-press or voice tag.
System Requirements Smartphone or Pocket PC 11 KB free storage space Read More... Users' Comments Other Softwares Oxios ToDo List 6.1 Oxios Alarms 1.3 Oxios Tasks Plugin 1.61
Other Screenshots
September 20 Usefull PocketPC Apps & ResourcesFonte: http://james.manners.net.au/2006/11/28/pocketpc_apps/ After buying my first Windows Mobile phone a O2 Atom, I was immediately disappointed. Coming from a Nokia that did what it needed to do and did it well. For a multi-function device it did lots of things, but only poorly. Slowly, slowly I have found third party software that adds, what I believe, basic functionality to my phone that should have been there from the start. The first thing to do is ensure that your phone has the latest firmware. Visit the Please feel free to leave your comments/suggestions for other programs/services at the bottom of the page. Software in UseThis following is a list of programs that are currently installed on my Pocket PC. These are the applications that I found when I was setting it up and have proved useful enough not to be uninstalled.
Programs to WatchThe following is a list of programs that aren’t installed on my phone for various reasons but are still programs that I want to keep track of. They are either alternatives for programs included in the list above or are programs that aren’t yet available for my phone or for still in early stages of development.
Mobile Web ServicesThe following is a list of web services that integrate with a Pocket PC and extend their functionality.
ThemesSPB Unithemes - Nicely integrated, complete themes Zombienexus Pocket PC Skins - Advanced themes, most require additional programs Install .Net Compact Framwork without ActivesyncFonte: http://james.manners.net.au/2006/11/28/install-net-compact-framwork-without-activesync/ The following is a summary on how to install .Net Compact Framework on a PocketPC without Activesync.
Export ContactsFonte: http://www.wm-soft.com/products/export-contacts Windows Mobile 5 device to HTML or XML file. This small freeware tool can export all contacts from your Export Contacts exports more than 50 properties, including photos and ringtones!
I’m going to add importing feature in future version! This software requires Windows Mobile 5 device (Smartphone or PPC) and .NET Compact Framework 2 installed! Top 10 Applications – What’s on your device?Fonte: http://blogs.msdn.com/jasonlan/archive/2008/09/19/top-10-applications-what-s-on-your-device.aspx I haven’t posted a new version of this for a while and I just changed to a new Windows Mobile device so I thought I’d post a list of the Top 10 applications I install on my phone! These aren’t in any particular order :)1) Guitar Hero III - a great game to play on your device - http://www.winplay.com/game/GuitarHeroMobile 2) Intelligolf - Excellent application for keeping track of your golf games - www.intelligolf.com 3) Sling player Mobile - A Slingplayer allows you to view your TV from your laptop or PC. Sling player mobile allows you to do the same thing from your mobile device. You can even control your home satellite or other source from your device! - http://www.slingmedia.com/go/spm-features 4) Live Search - this is a fabulous application actually written by Microsoft that allows you to connect to a wide variety of web services to get mapping information, local information such as restaurants and other services, gas prices, traffic and weather. http://wls.live.com 5) SPB Insight - I've tried a wide variety of RSS readers but this is the one I always end up back using - http://www.spbsoftwarehouse.com/products/insight/?en 6) Suduko - I got hooked on Sudoku a long time ago.... http://www.astraware.com/ppc/featured/sudoku/?skucode=0047-000-0379 7) Communicator Mobile - the secure IM client for Office Communications Server 2007 (OCS) - http://www.microsoft.com/downloads/details.aspx?FamilyId=2EEA3E24-F216-4887-92B0-F37D942E26E0&displaylang=en 8) Power SMS – A great SMS utility for AutoReply and GroupSMS - Power SMS
9) TinyTwitter – I think this is the best client for Twitter on Windows Mobile right now! http://www.tinytwitter.com/ 10) Windows Mobile WiFi Router – this allows you to turn your Windows Mobile device into a WiFi Access Point - http://www.wmwifirouter.com/ As always – feel free to comment on the applications you have on your device! Filed under: Windows Mobile, Applications System Center Mobile Device Manager 2008 DownloadsFonte: http://technet.microsoft.com/en-us/scmdm/bb986593.aspx Download updates, tools, and documentation to help you configure, deploy, and manage System Center Mobile Device Manager (MDM) 2008 and its components. Featured Downloads
A variety of tools are available to help you configure, deploy, operate and maintain MDM and its components. Learn more about the latest release of these tools and where to download them.
When combined with Windows Server platform services such as Group Policy and Windows Software Update Services, System Center Mobile Device Manager 2008 is a powerful solution for managing Windows Mobile powered devices in a scalable manner for your enterprise.
The Windows Mobile Line of Business Solution Accelerator is a sample line-of-business application that showcases the latest design principles and technologies in the mobile space. Resource Kit Tools and Documentation Downloads
Using WM 6.1 Images on the Device Emulator with MDMFonte: http://technet.microsoft.com/en-us/library/cc461417.aspx The Microsoft Device Emulator uses the following two emulator images to simulate the use of a Windows Mobile 6.1 device:
Use the appropriate Device Emulator to simulate the use of a Windows Mobile 6.1 device on your System Center Mobile Device Manager (MDM) system. You will get both emulators in the Windows Mobile 6.1 Emulator Images download which is available on the Downloads page of the following Microsoft Web site: http://go.microsoft.com/fwlink/?LinkId=115896.
Before you install and configure the Device Emulator, make sure that the computer hosting the Device Emulator meets the following requirements:
Host ComputerDo not install the emulator software on a computer running a 64-bit version of Windows. Install the software on an x86-based computer that is running a 32-bit version of Windows. Microsoft Virtual PCTo establish communications, the Device Emulator requires a virtual machine (VM) network driver that enables you to configure the emulator to use the physical network card. This VM network driver is available with Microsoft Virtual PC, which is a free download at this Microsoft Web site: http://go.microsoft.com/fwlink/?LinkId=46859 Direct Internet ConnectionFor MDM features to function, the Device Emulator must be running in an environment that has a direct connection to the Internet. If you are working in a lab environment and can connect directly to the MDM Gateway Server, you do not need an Internet connection.
To simulate devices running Windows Mobile 6.1 on your MDM system, you will perform these steps: GUI CAB Signing UtilityFonte: http://tools.enterprisemobile.com/cabsign/ CAB files are used for installing applications on Windows Mobile devices. When the installation and execution security policy is enabled on Windows Mobile devices, all CAB files must be signed prior to deployment onto a device. Microsoft provides a command line tool, cabsigntool.exe, to sign CAB files which requires the administrator to understand and configure a number of parameters making the process both time-consuming and cumbersome. Features and Benefits
System Requirements
Windows Mobile 6.1 upgradesFonte: http://blogs.msdn.com/jasonlan/archive/2008/09/19/windows-mobile-6-1-upgrades.aspx I’m often asked for a list of devices that now have Windows Mobile 6.1 upgrades. I think this is the full list although if I’ve missed any upgrades please leave a comment and I’ll make sure to update it! Device Samsung Blackjack 2 Tilt UT Starcom XV6800 TyTn 2 Mogul Samsung SCH-i760 XDA Stellar v1615 XDA Orbit 2 Telus S720 September 19 Profile your windows mobile applicationFonte: http://jajahdevblog.com/tzah/?p=12 This post is aimed to windows mobile developers looking for a profiler for their mobile application. I came across EQATEC profile. This tool is great! You can run it on all .NET apps including .NET CF 2.0 and 3.5. The usage is quite simple:
I found the viewer useful for the following points:
For more information and understanding on how to use the profiler, go to the guide. BTW, EQATEC also have a tracer tool. However, it is an on-line tool that drastically reduces the performance of your application. For example, the bubbles example application rate was reduced from 54 frames/seconds to 3! How To Sync your mobile Contacts: Use ZybFonte: http://jajahdevblog.com/jasmine/?p=80 When I was in the MWC (a.k.a 3GSM) in Barcelona, I encountered an interesting company by the same of ZYB (and also interesting name…:P ) They introduced a mobile application, that is an addition to your address book/contacts and allows you to have extra features that are related to your contacts and mobile devices do not support. the nice thing about the application is that you can access the features just by a click, and as you where browsing your regular contact list. they had features such as sending an instant message and getting your friend’s location. They also do contact synchronization. out of allot of companies that I saw in the WMC, Zyb really stood out. When getting back to the office, I checked out Zyb. It seemed that the features they demonstrated in 3GSM where not published, so I used their contact synchronization service, and I was very much satisfied. their technology uses Sync ML and is very simple and user friendly. You go to the Zyb site, set up your phone, get a SMS with the SyncML settings and start syncing away! For me, their service is very good. I change mobile devices frequently, in order to test new devices, and also when going abroad. I also have 2 mobile devices, one in the car and one for every day usage. although I have a SIM card and most contacts are stored in the SIM, there are cases when not all contacts are saved on the SIM (if someone sends you a contact by SMS…).Its also very good to backup. You can also edit your contact easily on the web, with a regular keyboard, lazy lazy me The nice thing abut ZYB is that you can setup a device once and then sync it, so if you setup several devices, all settings are saved and you can chose what device to sync. - very comfortable There is also an option to re-set your device settings and resent a SMS with the SyncML settings. This was useful after breaking my SE Z610i. I got a new one and I wanted to sync my contacts, I just chose to sync that device, and set it up. a SMS was sent to my new device and I was ready to go! for some reason all my contacts where duplicated, but they had a solution for it! Cool feature - Merge duplicated contacts: funny enough, after getting duplicated contacts I found a solution , there was a "merge duplications" option. Using this option you get all the duplicated phone numbers, or any contacts that may be duplicated (also by contact name). You can choose to merge them, on the web site with a comfortable screen and keyboard. after doing that, I synced my device again and every thing was good. Cool feature - Internet calls: you can also make an Internet/Voip call directly from the web site, to any of your contacts using Skype, by a link. what about calling via JAJAH? well lets wait and see…also for now, the JAJAH Firefox Extension does not mark the contact number, allowing you to make a quick JAJAH Call Needless to say that they have a privacy policy and your data is safe. you can also create a social network in the site, but I didn’t check that out (yet…). I would like to have an option to sync my Facebook events with my mobile, using SyncML… To summarize: I recommend this service very much, very simple and user friendly. I have been using if for more than 6 month and I’m very satisfied, and its free |
|
|