NAVmoble - the pocket-sized ERP
Optimized for Microsoft Dynamics NAV and Windows Mobile powered devices
Showing posts with label Windows Mobile. Show all posts
Showing posts with label Windows Mobile. Show all posts

Tuesday, October 19, 2010

Windows Embedded Handheld

Windows Phone 7 turned out to be a pain for the companies, which already invested a lot in mobile solutions based on Windows Mobile especially those positioned in the B2B market. Windows Phone 7 provides appealing UI and great potential for the end user. However it turned out that it is not suitable to target some very important scenarios required when dealing with B2B solutions.


I just found that Microsoft announced new mobile operating system called Windows Embedded Handheld , which is intended to fill the gap between the personal operating system and the requirements found in some of the specific industrial

.... The first such investment will be a new operating system called Windows Embedded Handheld, which will be targeted specifically at the enterprise handheld device market. This new operating system is based on Windows Mobile 6.5 and will use same the familiar development tools (Visual Studio 2008) and SDK as Windows Mobile 6.5 to provide compatibility with the hardware, software and applications used in the enterprise. By building on the Windows Mobile 6.5 platform, Windows Embedded Handheld devices will provide compatibility with existing and future line-of-business (LOB) applications written for Windows Mobile 6.x.

Windows Embedded Handheld will also meet enterprise requirements around integrating with existing IT infrastructure like Microsoft Exchange and SharePoint as well as incorporate the device management and security functionality necessary for enterprise devices. Support for multiple ARM processor types, a wide range of input methods, and several screen sizes and resolutions will make Windows Embedded Handheld a flexible solution to power the wide range of enterprise handheld devices used today.

New features in Windows Embedded Handheld will include Office Mobile 2010 and a support lifecycle to meet the needs of enterprise customers. OEMs will have access to the Windows Embedded Handheld bits by the end of 2010 to start building new solutions.

Links
http://www.microsoft.com/windowsembedded/en-us/products/handheld/overview.mspx

Sunday, October 26, 2008

Mobile sessions during October and November 2008

PowerPoint files are available for download at the bottom of this post

I'm going to have few public speaches dedicated to the Microsoft's mobile development technology stack.
The first two sessions are part of the Microsoft Day events organized in the local universities.
The last two are part of a free set of sessions dedicated to Visual Studio 2008, Windows Server 2008 and Office Project 2007, sponsored by Microsoft Bulgaria and New Horizons Bulgaria

30.Oct.2008, 15:00h,Varna, University of Economics - Varna
Lap around Windows Mobile

31.Oct.2008, 10:00h,Varna, Technical University - Varna
Mobile development with Visual Strudio 2008 and Compact Framework 3.5

6.Nov.2008, 18:30h ,Sofia, New Horizons Bulgaria
Developing Windows Mobile Applications with Visual Studio 2008

20.Nov.2008, 18:30h,Sofia, New Horizons Bulgaria
Under the hood: Windows Mobile and Visual Studio 2008

All the sessions are free to attend, however the last two require you to sign-up in advance


UPDATE:
PPT File: Developing Windows Mobile Applications with Visual Studio 2008


Tuesday, June 10, 2008

Managed Services and Today Screen Item with .NET Compact Framework

I'm .NET addicted and never felt comfortable to realize that I can't solve my problem in pure managed manner.
Well, the "native" is a native part of the mobile developer, but anyway I prefer managed.

I was happy to see that some mobile folks here work for my comfort :)

Peter Nowaks has a post about creating Managed Services in Windows Mobile by using .NET Compact Framework. He has created a managed library, hosted in CodePlex. His work is based on article by Pavel Bánský

Christopher Fairbairn also published  a very handy library, which may help you creating a managed Today Screen Item.

 

Great work guys!

 

Links
Peter Nowaks on Creating Managed Services in Windows Mobile
Pavel Bánský on Creating Managed Services in Windows Mobile
Christopher Fairbairn on Creating Managed Today Screen Item

Wednesday, November 28, 2007

When Compact Framework fails to make HttpWebRequest ...

Andrew Arnott has an interesting post about a bug found in CF.NET . It may fail to call some web servers with the following error:
System.Net.WebException: Unable to read data from the transport connection.

Want to know why? See the details here...

(via .NET Compact Framework Team's blog)

Sunday, September 23, 2007

Random CF.NET links

I was too busy lately in order to blog and read blogs(never do this at home). I had to "read" hundreds of posts, which popped out of my agreggator. I decided to post a bunch of links that came to my attention.

There were other interesting ones ... stay tuned for more.

Thursday, August 16, 2007

How to upgrade HTC P3600(a.k.a. Trinity) to Windows Mobile 6 and unlocking the GPS


FOLLOW THE STEPS BELLOW ON YOUR OWN RISK.!
IT IS IMPORTANT TO NOTE THAT THIS PROCEDURE MAY TURN YOUR DEVICE TO A USELESS BRICK!

NO WARRANTIES AT ALL!

I use HTC P3600 as a phone/PDA which is armed with Windows Mobile 5.0. The device has a camera, 3G,WiFi,Bluetooth and more. It does not have a GPS(officially).
I noticed recently that the guys from xda-developers.com have published Windows Mobile 6 image for Trinity. It is important to note that HTC does not provide official upgrade for P3600.

So, I read some posts on the xda forums and finally managed to upgrade my device. I have now WM 6 on my P3600 and the most interesting part is that I have a GPS support.

I followed these steps:

1. Downloaded the WM6 image and ROMUpgrade utility on the PC:
http://ax3l.volospin.com/AX3L_OS%20v2.0.8.2.rar

Check out other available WM images here:
http://wiki.xda-developers.com/index.php?pagename=Trinity_Upgrades

2. Downloaded the following tool(SSPL-TRIN.exe) on the PC.
It allows to bypass the CID and signature check.
Download link:
http://forum.xda-developers.com/attachment.php?attachmentid=34180&d=1171153073
The following post gives more details:
http://forum.xda-developers.com/showthread.php?t=293632

3. Connected the device to PC
4. Copied SSPL-TRIN.exe on the device
5. Launched SSPL-TRIN.exe from the device.
The screen turned-off anf a strange colorful screen appeared(bootloader mode)

6. Launched the ROMUpdateUtility.exe from the PC
I performed the upgrade on Vista so I needed to download the ROMUpdateUtility for Vista:
http://203.162.89.207/Ruu_3.13.3.2.zip
I just needed to replace the extracted files from Step 1

7. Followed the steps provided by the ROMUpdateUtility

And ops! I have the WM6 on my device! The big surprise is that the device has now a GPS support!

IMPORTANT NOTES:


  • it is a risky operation and you may render your device unusable. Do it on your own risk
  • do not launch any application on your PC during the upgrade process
  • do not disconnect/turnoff the device
  • do not restart/turn off PC
  • make sure you have device battery charged over 50%
  • disable PC hibernate/sleep features - or just move the mouse to prevent it
  • carefully read the redme.doc before starting the upgrade process

More info may be found on the following places:
http://forum.xda-developers.com/forumdisplay.php?f=359
http://wiki.xda-developers.com/index.php?pagename=HTC_Trinity


Links:
Windows Mobile 6 Image for Trinity
SSPL-Trin - tool to bypass the CID/signature checking
ROMUpdateUtility for Vista
Trinity Wikki
Trinity and Windows Mobile 6 Forums

Monday, August 06, 2007

"How To" Series: Configuring Network Adapters with Compact Framework


There was a question in the forums, if there is a way to configure a network adapter automatically - without an user interaction. Using the UI, the user may select "My network card connects to" value for every adapter in the adapters list. It may be changed to point one of the available network destinations like "The Internet" , "Work", etc. So, is there a way to this automatically?

In short the answer is YES! There is a way. We may prepare an OMA Client Provisioning File and pass it to the appropriate configuration provider in Windows Mobile.
An appropriate configuration file would be like this:


<wap-provisioningdoc>
<characteristic type="CM_NetEntries">
<characteristic type="Adapter Name">
<parm name="DestId" value="{A1182988-0D73-439e-87AD-2A5B369F808B}"/>
<parm name="Adapter" value="Qualified Name"/>
</characteristic>
</characteristic>
</wap-provisioningdoc>




This file will bind a network adapter named "Adapter Name"
to the "Work" destination. We have to change the "Adapter Name" value with
the name of the adapter as it is seen in the adapters list. The "Qualified Name" should be changed with the fully qualified name of the adapter - it may be obtained by using the GetAdaptersAddresses routine

If we want to change the destination to "The Internet" , we have to supply different GUID for the DestId parameter. Following network identifiers as configured by default on Windows Mobile:

The Internet: {436EF144-B4FB-4863-A041-8F905A62C572}
Work: {A1182988-0D73-439e-87AD-2A5B369F808B}
WAP Network: {7022E968-5A97-4051-BC1C-C578E2FBA5D9}
Secure WAP Network:{F28D1F74-72BE-4394-A4A7-4E296219390C}
CurrentDTPTNetwork:{A1182988-0D73-439e-87AD-2A5B369F808B}

What we have to do in order to apply this configuration setting?
We have the following options:
1. Preparing the provisioning Xml file , save it as _setup.xml, and place it inside a CAB file. We may "execute" the file on the device, then. Check out this post for details about deploying provisioning files with CABs.
2. We may apply these settings through code(Compact Framework) by using the managed Microsoft.WindowsMobile.Configuration.ConfigurationManager class from Windows Mobile 5 SDK:

string configurationXml = "<wap-provisioningdoc><characteristic type=\"CM_NetEntries\">"+
"<characteristic type=\"Adapter Name\"><parm name=\"DestId\" "+
"value=\"{A1182988-0D73-439e-87AD-2A5B369F808B}\"/><parm name=\"Adapter\" value=\"Qualified Name\" /> "+
"</characteristic></characteristic></wap-provisioningdoc>";
// Load XML
XmlDocument configurationXmlDoc = new XmlDocument();
configurationXmlDoc.LoadXml(configurationXml);
// Send to Configuration Manager
ConfigurationManager.ProcessConfiguration(configurationXmlDoc, false);


Also the unmanaged version DMProcessConfigXML may be used
Check out this post for unmanaged wrapper of DMProcessConfigXML

Links
CM_NetEntries Configuration Service Provider Examples for OMA Client Provisioning
Injecting Provisioning XML into a cab using VS 2005 on the Windows Mobile Blog
DMProcessConfigXML on the Marcus Perryman's WebLog
Windows Mobile Device Management for more configuration options

Sunday, July 29, 2007

Visual Studio 2008: Device Security Manager

In my post “How to” Series: Windows Mobile Security Configurations, I said that if you want to deal with the device security configurations you may download the Security Configuration Manager Powertoy for Windows Mobile.(there are some other options as well)
If you have the Visual Studio 2008 Beta 2 installed, you do not need this powertoy anymore. It is part of VS 2008,now.


Just cradle the device( or emulator) , launch the Device Security Manager and start locking,unlocking and installing device certificates :).

I just noticed Mark Arteaga has collected some resources related to Windows Mobile Security. Check them out.


Links:
“How to” Series: Windows Mobile Security Configurations
Windows Mobile Security resources from Mark Arteaga

Tuesday, July 24, 2007

"How To" Series: Reading Device Owner Information on Windows Mobile



I noticed recently, that some guys asked(in the forums) how to read the device owner information from .NET Compact Framework.

The Device Owner information may be obtained from the device's registry. It is stored under the following registry key: HKEY_CURRENT_USER\ControlPanel\Owner






Note that, this key may be missing on a fresh device. The key is populated after the owner sets his/her information.

The registry key HKEY_CURRENT_USER\ControlPanel\Owner has two interesting values:
"Owner" and "Owner Notes". These values holds binary data.
The "Owner" value contains the following owner information attributes: Name, Company, Phone, E-mail, Address. The "Owner Notes" value contains the Notes of the owner :)
Reading Owner notes is simple like:
RegistryKey key = Registry.CurrentUser.OpenSubKey("ControlPanel\\Owner");
byte[] data = key.GetValue("Owner Notes") as byte[];
string notes = UnicodeEncoding.Unicode.GetString(data, 0, data.Length).TrimEnd('\0');

The tricky part is to "decode" the "Owner" binary data, which contains multiple fixed-length values. In order to deal with it , we have to know the exact length of every device owner attribute:

  • Name: 72 bytes
  • Company: 72 bytes
  • Address: 372 bytes
  • Phone: 48 bytes
  • Email: 74 bytes

So, reading the "Owner" info is easy as:
RegistryKey key = Registry.CurrentUser.OpenSubKey("ControlPanel\\Owner");
byte[] data = key.GetValue("Owner") as byte[];
string name = UnicodeEncoding.Unicode.GetString(data,0,72).TrimEnd('\0');
string company = UnicodeEncoding.Unicode.GetString(data,72,72).TrimEnd('\0');
string address = UnicodeEncoding.Unicode.GetString(data, 144, 372).TrimEnd('\0');
string phone = UnicodeEncoding.Unicode.GetString(data, 516, 48).TrimEnd('\0');
string email = UnicodeEncoding.Unicode.GetString(data, 566, 74).TrimEnd('\0');

You may obtain the full source code from here

Monday, July 16, 2007

Internet Explorer Mobile:One-Column Layout

Fig 1. One Column Layout

I had a complaint from a customer of mine, that the Internet Explorer Mobile(Windows Mobile 5.0) does not render their HTML reports in a tabular form.
At first, I was wondering if they found a defect in our custom HTML exporting feature.Then I realize what happened.

We're using a sequence of TABLE,TR and TD tags to have our HTML content rendered into a tabular form. Some of the users accidentally had switched on the One Column feature of the Mobile Internet Explorer. This layout forces the Mobile Internet Explorer to render all content in a single column without horizontal scrolling.






Fig.2: Default layout

Links
IE Mobile Team Weblog
Wikipedia for IE Mobile

Friday, July 13, 2007

Windows Mobile Device Management

Developing and deploying a software solution is almost never a single act.
After the solution is deployed, it has to be monitored and continuously updated to meet the ever-changing business environment. So, what we developers do is to utilize existing or implementing a custom strategy for automatic software updating.
However, sometimes the business needs to update not only a particular application, but also changing the application environment (underlying OS for example).
The remote computer management is a common practice(there are a lot of tools) these days. However, the remote management of mobile devices(like PDA-s and smart phones ) is not so common. For example on the Windows platform, we have a Remote Desktop and Terminal Services out of the box. And this is not the case for the Windows Mobile devices (there are third party solutions).
Fortunately, there is a solution for this kind of problems, when dealing with Windows Mobile based devices. The out-of-the-box solution is called Windows Mobile Device Management. Windows Mobile provides infrastructure for remote management based on an industry standards published by Open Mobile Aliance(OMA) . Windows Mobile devices support additional extras as well - not mentioned in the OMA specifications.

The term used in the literature is actually provisioning.

Windows Mobile supports 2 OMA standards for provisioning:

The first one is based on a client-server conversation by using a communication session between the device(client) and a special DM(device management) server. During this conversation the server may query device in order to get data from it and may send provisioning instructions to change particular settings over the device. The communication is based on TCP/IP ,so any TCP/IP capable infrastructure may be used(GPRS,WiFi,...). This post will not talk about this kind of provisioning...

The second one called OMA Client Provisioning is based on deploying(sending) a special xml file on the device ,which contains provisioning instructions. There are various instructions supported by Windows Mobile, which allows for:
- Managing connectivity (GPRS,VPN,WiFi,...) settings of the device
- Managing e-mail accounts in he Pocket Outlook
- Managing Pocket IE favorites
- Managing device registry(adding,modifying and deleting registry keys)
- Managing security settings
... and even more...

The instructions are grouped by functional areas and referred as Configuration Providers. The Configuration Provider actually is the software component, which processes particular type of instructions.
Check out the available configuration providers.

The provisioning files may be delivered to the device throughout the following channels:
  • ROM image
    provisioning files may be deployed in the device's ROM and applied on cold boot.

  • RAPI and ActiveSync
    the rapiconfig.exe is placed in the tools directory of the SDK


  • Deployment as .CAB or .CPF file
    Provisioning files may be packaged in a CAB files and deployed on the device like any other CAB file( ActiveSync,LAN, SD/MMC card, etc)


  • OTA (Over-the-air) Provisioning
    this includes various techniques like DM Server, WAP Push, SMS, E-mail, HTTP(web site download)


  • Custom file delivery and the Windows Mobile Configuration Manager API
    The developers may use the managed WindowsMobile.Configuration.ConfigurationProvider (Part from the Windows Mobile 5 SDK) to "execute" provisioning files. Your application may receive provisioning files through various comm channels( SMS, E-mails, Web Services ,... what ever) and pass them to the configuration provider for execution.
Links
Open Mobile Aliance
OMA DM Provisioning for Windows Mobile
OMA Client Provisioning for Windows Mobile
Configuration providers supported by Windows Mobile
Managing Windows Mobile 5.0

Tuesday, July 10, 2007

"How To" Series: Retrieving IMSI and IMEI on Windows Mobile

I had to retrieve the IMSI and IMEI on Windows Mobile for a particular project.
What I needed actually was the IMSI , because it may be used in OMA Client Provisoning through WAP Push scenarios. It may be very practical for the enterprise to manage its devices remotely and I will post more on that topic later on.

In order to retreive IMSI and IMEI, one have to deal with the Telephony API and PInvoke. In general the magic is done by invoking the native lineGetGeneralInfo routine from TAPI.
You may download the full source code from here

the original code article may be found here

There is another approach as well - buy the Telephony library from OpenNETCF

Links
What is IMSI
What is IMEI
OMA Client Provisoning for Windows Mobile
The sample source code

Tuesday, May 15, 2007

Kiosk mode in Windows Mobile

I had a number of questions after my talks during the MS Days 2007 in Sofia.
And there was a question that I failed to give a complete and detailed answer.So here comes the answer...
Before taking this path, take a break and think if the kiosk mode is actually needed for your app. Windows Mobile is designed as a general purpose OS, intended for personal usage. The kiosk mode app will prevent the users from using it as their personal device. You may want to check the Marcus Perryman's post for arguments about Kiosk Mode vs Deep Integration choices
Anyway, there are several options to have the app in kiosk mode over Windows Mobile:
1.Replacing the standard password prompt
One should create a DLL, export the PromptForPasswd function and than hacking the registry to use your custom password prompt. There are some side-effects and also this method may fail on some devices. So test it with a real hardware.
Check out this resource for details

2. Maximizing your application's main form
In general maximizing the app's main form will get you a kiosk-alike behaviour. However, the user may press the hardware buttons to get to another app. Some OS events (like inbound phone call)may pop up another app in front of yours . In other words this solution will not give you a complete kiosk mode.
Check out the newsgroups:
SHFullScreen
Full Screen on CF.NET

3.Replacing the standard shell
Check out this post for additional info about shells

4. Hiding the Windows Mobile task bar
This is not a complete solution, but a complementary technique.
Check out the following link for an example

5. Using third-party framework.
Check out the following ones:
Spb Kiosk Engine
PocketKiosk Builder


Links
Spb Kiosk Engine
PocketKiosk Builder
Hiding the taskbar
Prompt For password
Marcus Perryman on Kisok mode in Windows Mobile
Windows Embedded Blog on kiosk mode in Windows CE
Newsgroups on Fullscreen with SHFullScreen
Newsgroups on Full Screen/CF.NET
Kiosk mode on Pocket PC
Kiosk Pattern from Satter Ramblings
WM Shell replacement

Update
Check out this post for more resources as well