Header Sep
Latest News
My Rating Score
Login to rate page

August 23, 2006
Developer case study:
DataViz brings Microsoft Exchange ActiveSync connectivity to UIQ 3 for M600 and P990

[Back]

 

Mike Mignone, Project Manager at DataViz, describes some of the technical challenges DataViz faced when updating and porting their Exchange ActiveSync-Powered by DataViz mailbox synchronization client to UIQ 3 for the Sony Ericsson P990 and M600 phones, outlines why developing for the P990 and M600 phones was logical and reveals some SNAP and multiple SNAP account code examples.

With the rise in demand for wireless e-mail access, DataViz has partnered with Sony Ericsson to bring Exchange ActiveSync-Powered by DataViz to the UIQ 3 platform for the M600 messaging device and P990 smartphone. The Exchange ActiveSync mailbox and synchronization client included on these new UIQ 3-based phones is powered by DataViz' RoadSync application. Both DataViz and Sony Ericsson are official licensees of the Exchange ActiveSync protocol from Microsoft.

About Exchange ActiveSync-Powered by DataViz
Exchange ActiveSync-Powered by DataViz, utilizes Microsoft Exchange ActiveSync technology, and provides secure, wireless and "Direct Push" synchronization of Outlook e-mail, calendar, contacts and attachments from Exchange Server 2003. The DataViz ActiveSync client is fully integrated with the built-in Messaging, Calendar and Contact applications found on the device, making navigation simple and easy. In addition, to significantly enhancing end-user productivity, Exchange ActiveSync-Powered by DataViz simultaneously lowers IT costs by eliminating the need for middleware servers, service fees, or subscriptions commonly associated with wireless e-mail. This provides corporations and IT departments with a low-cost, easy to implement mobile e-mail strategy by maximizing their existing investment in Exchange 2003.

Exchange ActiveSync-Powered by DataViz is also available as an independent client application called RoadSync. It is available for Symbian OS based UIQ 2.x, S60, Series 80, Palm OS, Java MIDP 2.0 and soon, Windows Mobile 2003 devices. In addition, Exchange ActiveSync-Powered by DataViz also works with DataViz' Documents To Go UIQ 2.x and UIQ 3 application for viewing and editing e-mail attachments such as Word, Excel, PowerPoint.

Why develop for Sony Ericsson UIQ 3 phones

 

Mike Mignone,
Project Manager at DataViz, Inc.

"When Sony Ericsson asked us to partner with them to include Exchange ActiveSync connectivity for the M600 and P990, we were excited for the opportunity to bring corporate mobility to the masses!" remembers Mike Mignone, Project Manager at DataViz, Inc.

"We initially released our Exchange ActiveSync solution, RoadSync, for UIQ 2.0 devices including the Sony Ericsson P900 and P910. We have seen tremendous traction with Exchange ActiveSync connectivity among both businesses and consumers. Thus, porting and updating our RoadSync solution to the Symbian OS 9 based UIQ 3.0 platform was the next logical step."

"In fact, it was on the Symbian OS based UIQ platform where we first released support for Microsoft's 'Direct Push' technology even before Windows Mobile 5.0 devices were available on the market with such support."

"So if you consider that as proof of concept, it was only logical to help Sony Ericsson build this connectivity into their new generation of UIQ devices such as the M600 and P990. Not only are these new models building on the tremendous success of their previous smartphones, but they are specifically designed with a heavy emphasis on mobile e-mail and productivity."

The Development Process

Getting started: developer resources
When DataViz began to develop their Exchange ActiveSync solution RoadSync for the UIQ 3 platform in C++ using CodeWarrior, they quickly realized they had new challenges to overcome.

"No UIQ 3 device had even been released to the market when we started the project, so it was difficult to find development resources to help the learning curve," comments Mike Mignone.

"We often had to rely on information from the M600 development team at Sony Ericsson to understand certain issues and how they could be resolved. These contacts were also instrumental in determining which issues fell to our application, and which were issues still being addressed by the platform development team."

UIQ 3 development: using SNAP accounts
The DataViz developers found that SNAP accounts were a helpful feature during the UIQ 3 development process. SNAP accounts use multiple access points which make it easy to start an internet connection and are a new feature found in UIQ 3 devices.

SNAP accounts are a convenient and cost effective way for users to access their Exchange Server data via ActiveSync.  Basically, a user might move from a location where a free network is available to an area where GPRS is the only available connection. For example, a user may have a Bluetooth internet connection set up with their desktop computer. Anytime the mobile phone is in range of the computer it can automatically take advantage of this free data connection. When away from the computer, the phone can automatically detect what connections are available and access them.  In this case, when away for the desktop computer with Bluetooth connectivity the phone can make an internet connection using GPRS.

With the UIQ 2 platform, users would have to manually make these connections from the settings menu every time they changed their environment. With the UIQ 3 platform, anytime ActiveSync attempts to connect to the internet, the phone will automatically select the best network connection to be used without any user intervention.

"This new construct allows you to have multiple access points grouped together so that the phone can better manage multiple network connections for you. If a user has two internet access points, the user can set up a SNAP account to connect to the internet via one account first, and then try a different connection next if the first doesn't work. SNAP accounts make it very easy for a developer to start an internet connection because all we have to do is connect to the default snap account and let the OS handle the transport mechanism," explains Mike Mignone.

DataViz share their experience with example code which shows how to retrieve the default access point and initiate a data connection.  As mentioned above, the SNAP account could contain any number of transport mechanisms, but it is up to the SNAP account to choose the transport mechanism that will be used to provide the data connection.

// ------- gets the default snap account id
void GetDefaultIAPL(TUint32 &defaultSnapID) {
 CMDBSession *pDbSession = NULL;
 CMDBRecordSet<CCDGlobalSettingsRecord> *pGlobalSettingsRecSet = NULL;
 
 defaultSnapID = 0;
 
 // start the session
 pDbSession = CMDBSession::NewLC(CMDBSession::LatestVersion());

 // load the global settings
 pGlobalSettingsRecSet = new (ELeave) CMDBRecordSet<CCDGlobalSettingsRecord>(KCDTIdGlobalSettingsRecord);
 CleanupStack::PushL(pGlobalSettingsRecSet);
 pGlobalSettingsRecSet->LoadL(*pDbSession);
 
 // get the default SNAP ID
 if (pGlobalSettingsRecSet->iRecords.Count())
  defaultSnapID = static_cast<TUint32>((*pGlobalSettingsRecSet)[0]->iDefaultSnap);
 
 CleanupStack::PopAndDestroy(pGlobalSettingsRecSet); // pGlobalSettingsRecSet
 CleanupStack::PopAndDestroy(pDbSession); // pDbSession
}
//-------

//------- connnects to the internet
{
 TCommSnapPref iSNAPPrefs;
 RConnection iConnection;
 RSocketServ iSocketServer;
 TUint32 currIAPID = 0;

 iSocketServer.Connect();
 iConnection.Open(iSocketServer);

 GetDefaultIAPL(currIAPID); // please see function above for this
 iSNAPPrefs.SetSnap(currIAPID);

 iConnection.Start(iSNAPPrefs, iStatus);
 SetActive();
}
//-------

Working with multiple SNAP accounts
Push e-mail clients can generate heavy data loads, and some carriers provide special access points for these types of connections. It is relatively common for there to be multiple SNAP accounts on a device, one for more user-initiated connections like browsing, and a separate one for a specific purpose like push e-mail. To handle this situation, DataViz needed to provide the user with a list of SNAP accounts to choose from.

The following code will collect the full list of available SNAP accounts:

//------- gets a list of snap accounts
class CSnapAccountInfo : public CBase
{
public:
 CSnapAccountInfo() : mpName(NULL), mId(0), mIsDefault(EFalse) { }
 virtual ~CSnapAccountInfo() { delete mpName; }
 
 HBufC* mpName;
 TUint32 mId;
 TBool mIsDefault;
};

void GetListOfAccessPointsL(CArrayPtrFlat<CSnapAccountInfo> **ppListSnapAccounts) {
 TUint32 defaultID = 0;
 CSnapAccountInfo *pCurrSnapAccountsInfo = NULL;
 CArrayPtrFlat<CSnapAccountInfo> *pLocalListSnapAccounts = NULL;
 
 CMDBSession *pDbSession = NULL;
 CMDBRecordSet<CCDGlobalSettingsRecord> *pGlobalSettingsRecSet = NULL;
 CMDBRecordSet<CCDAccessPointRecord> *pSnapRecordSet = NULL;
 CCDAccessPointRecord *pCurrSNAPRec  = NULL;
 
 // start the session
 pDbSession = CMDBSession::NewLC(CMDBSession::LatestVersion());

 // load the global settings
 pGlobalSettingsRecSet = new (ELeave) CMDBRecordSet<CCDGlobalSettingsRecord>(KCDTIdGlobalSettingsRecord);
 CleanupStack::PushL(pGlobalSettingsRecSet);
 pGlobalSettingsRecSet->LoadL(*pDbSession);

 // load the SNAp record list
 pSnapRecordSet = new (ELeave) CMDBRecordSet<CCDAccessPointRecord>(KCDTIdAccessPointRecord);
 CleanupStack::PushL(pSnapRecordSet);
 pSnapRecordSet->LoadL(*pDbSession);
 
 // get the default SNAP ID
 if (pGlobalSettingsRecSet->iRecords.Count())
  defaultID = static_cast<TUint32>((*pGlobalSettingsRecSet)[0]->iDefaultSnap);
 
 // create the array to hold the access point info
 *ppListSnapAccounts = NULL;
 pLocalListSnapAccounts = new (ELeave) CArrayPtrFlat<CSnapAccountInfo>(4);
 CleanupStack::PushL(pLocalListSnapAccounts);
 
 // parse the SNAP record list to extract the display info
 for (TInt i = 0; i < pSnapRecordSet->iRecords.Count(); ++i)
 {
  pCurrSNAPRec = (*pSnapRecordSet)[i];
  pCurrSnapAccountsInfo = new (ELeave) CSnapAccountInfo;
  CleanupStack::PushL(pCurrSnapAccountsInfo);
  
  TPtrC recNamePtr(pCurrSNAPRec->iRecordName);
  pCurrSnapAccountsInfo->mpName = recNamePtr.AllocL();
  pCurrSnapAccountsInfo->mId = pCurrSNAPRec->RecordId();
  
  if (pCurrSnapAccountsInfo->mId == defaultID)
   pCurrSnapAccountsInfo->mIsDefault = ETrue;
   
  pLocalListSnapAccounts->AppendL(pCurrSnapAccountsInfo);
  CleanupStack::Pop(pCurrSnapAccountsInfo);
 }
 
 // now pass back the list
 *ppListSnapAccounts = pLocalListSnapAccounts;
 CleanupStack::Pop(pLocalListSnapAccounts);
 
 CleanupStack::PopAndDestroy(pSnapRecordSet); // pSnapRecordSet
 CleanupStack::PopAndDestroy(pGlobalSettingsRecSet); // pGlobalSettingsRecSet
 CleanupStack::PopAndDestroy(pDbSession); // pDbSession }
//-------

Summary and outlook
DataViz will continue to enhance Exchange ActiveSync connectivity for the M600 and P990 with new features and functionality.

"Not only will this include requested usability enhancements made by customers, but it will also closely tie in with Sony Ericsson's device roadmaps as well as Microsoft's plans for Exchange Server 2003 and beyond," says Mike Mignone.

Beyond development for Exchange ActiveSync, DataViz will continue their overall efforts to provide a complete office mobility solution, to allow business professionals and enterprise customers to mobilize "Microsoft Office life" on a variety of mobile platforms including UIQ 3. Aside from e-mail, DataViz will continue to develop their award-winning document and attachment solution, Documents To Go which features InTact Technology to provide complete document integrity.

"DataViz is truly committed to bringing office mobility to the masses. We see great opportunity with Documents To Go. It completes our office mobility story by integrating with RoadSync to allow users to easily access attachments and use their Word, Excel and PowerPoint files on the go," concludes Mike Mignone.

About DataViz, Inc.
DataViz is an industry leader in developing and marketing Office compatibility and productivity solutions across a variety of platforms including Palm OS, Symbian OS, Java, Windows Mobile, Windows and Macintosh. Founded in 1984, DataViz began its business developing file conversion software and has since expanded its expertise to providing solutions that meet the increasing demands of the handheld and mobile markets. With enterprise-grade solutions that include its award-winning mobile Office suite, Documents To Go, and wireless Microsoft Exchange ActiveSync client, RoadSync, DataViz is committed to providing premium solutions that mobilize 'Microsoft Office' without compromise and provide customers with instant access to critical files and business data.

More information:

 

My Rating Score
Login to rate page