OK, I’m not exactly the hard-core Windows Mobile developer here.  However, I had a recent issue with a customer who wanted to be able to use a PUSH to a windows mobile device which would be in stand-by.  Their goal was to save on the battery life.

 

Let’s start off with this:

 

·   WM devices support one Exchange server, but multiple POP3. 

·   The devices wake on user action, timer, incoming SMS message or EAS call (not to mention a phone call). 

·   The EAS protocol requires a special license for development.

 

And going forward…

 

An incoming SMS message will wake the device and was recommended to me by the Windows Mobile dev support group..  You can add an SMS Listener to look for a specific message with specific Subject line (ex: “—Rescue Push Sink Ping –“).  Once receiving the SMS message, the application can use EWS or your existing POP3 code to get the mail.  Messages which are not the specific one used for your application would flow forward and be handled as they would normally be.

 

First Way (Probably the easiest way):

Have Exchange Push a message to your web service.  Your web service will then send an SMS message to the device, which will then wake the device.  SMS should always be running even when the device is in standby.  When the SMS message is received, your code would then PULL the new messages.

 

Exchange(EWS) ---- [PUSH]- --> IIS(web service)---- [SMS Message] ---->Device(SMS listener)

 

The Exchange Server would be setup for PUSH on the mailbox to send the push notification to a custom web service.  This custom web service handles the push notification and is the middle man between Exchange and the Windows Mobile device.  The web service could be put on any box, it receives the incoming PUSH from Exchange, gets the “from” Address from it and looks up the address from a database (or hard coded?) and then sends a text email using something like System.Net.Mail to the device's SMS address.  The client receives the email as an SMS message, which it handles using custom code in an SMS listener.  Note that instead of using the “from” address, the URL of the item could be used to identify the mailbox since it would be in the PUSH notification.

 

Each carrier has different limitations on the maximum size for receiving SMS texts.  From doing some checking, here is what I found on the web (cannot validate, so check with each carrier to get the exact numbers):

                                                                                Max

ATT              mobile.att.net                             140

Nextel        Messaging.nextel.com            280

Sprint          messaging.sprint.pcs.com      100

 

Here are some links to help:

 

SmtpClient Class (System.Net.Mail)

http://msdn.microsoft.com/en-us/library/system.net.mail.smtpclient.aspx

 

How Do I: Send and Receive SMS Messages?

http://msdn.microsoft.com/en-us/netframework/bb905518.aspx

 

How to Configure Exchange Server Always Up-To-Date Notifications

http://technet.microsoft.com/en-us/library/cc164312(EXCHG.65).aspx

 

What is the Exchange ActiveSync Up-to-date feature and how does it work?

http://msexchangeteam.com/archive/2004/04/26/120520.aspx

 

The technique of sending an SMS message (the Always Up-To-Date aka AUTD message) was used by Exchange for EAS prior to EAS implementing PUSH.

 

Second way:

I don’t know  if this will work, however there is a Web Server you can install for Windows Mobile.  It looks like it does not support .NET, however it “may” able to handle a soap request (which is basically what a WebService call does).

 

The WebService sample is a WebServer from the Windows Mobile SDK.

 

  Web Server Application Development for Windows Mobile-based Devices

     http://msdn.microsoft.com/en-us/library/aa454330.aspx

 

    Redistributable Server Components for Windows Mobile 5.0

     http://www.microsoft.com/downloads/details.aspx?FamilyID=cdfd2bb2-fa13-4062-b8d1-4406ccddb5fd&DisplayLang=en

 

Third Way:

Have your application use the Exchange Mailbox for the device.  WM devices allow 1 Exchange mailbox to be setup.  Your application could use Messaging Application on the device then to run code when EAS sync’s the Exchange mailbox.   As I understand it, this will not work because the Exchange mailbox on the devices is already being used.

 

Fourth Way:

Have the device wake-up every hour or so and do an EWS PULL or use POP3.

 

How Do I: Programmatically Monitor for a Specific Time of Day Without Draining a Device Battery?

http://msdn.microsoft.com/en-us/netframework/bb870451.aspx

 

How Do I: Assure that my Application Code Continues Running when the Device is in Suspended Mode?

http://msdn.microsoft.com/en-us/netframework/cc949112.aspx