BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 08-11-2009, 11:26 AM   #1 (permalink)
New Member
 
Join Date: Jun 2008
Model: none
PIN: N/A
Carrier: none
Posts: 4
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Synchronize PIM data, Calendar/Contacts

Please Login to Remove!

Does anyone on this forum have experience working with the PIM related classes? Such as BlackBerryEvent.

I'd like to write an app that runs on the BlackBerry, and synchronizes PIM data with another app on my server. Similar to Google Sync. I don't want to require users to have an Enterprise Server.

Could I simply loop through all of the BlackBerryEvent items (every hour) and check the REVISION field, to know what has been updated since the last sync. Then send those to my server, and also receive any changes from my server.... or is there some reason that design wouldn't work?

Also, I'd probably like to use HTTPS to transfer the data between the device and my server. Or maybe raw TCP/IP. Are either of those APIs robust on the BlackBerry, and would they work for this type of app?

I know this is all possible, but I'd like to hear from someone with experience, to let me know what kind of issues I'll run in to once this is in the field, and 100s of users are using it on different devices.

I see that RIMs only sample sync app uses the enterprise server -- I don't want to require users to subscribe to that, unless it turns out that doing anything else is going to be such a mess that I'm better off doing nothing at all.
Offline  
Old 08-11-2009, 12:38 PM   #2 (permalink)
Knows Where the Search Button Is
 
pfowler's Avatar
 
Join Date: May 2008
Location: Palo Alto, CA
Model: 8310
PIN: N/A
Carrier: ATT
Posts: 39
Post Thanks: 1
Thanked 0 Times in 0 Posts
Default

It doesn't sound like anything you're doing here should be terribly difficult. The problem with background apps is not interrupting the user's normal usage of the device. This gets tough with contention over a limited processor and limited ram.

A good place to start would be the javax.microedition.pim package. From there, you can access the PIMList class which will give you a list of contacts. There's even a PIMListListener you can register with to detected new/removed/updated contact items. This is always much better than looping.
Offline  
Old 08-11-2009, 12:49 PM   #3 (permalink)
New Member
 
Join Date: Jun 2008
Model: none
PIN: N/A
Carrier: none
Posts: 4
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by pfowler View Post
A good place to start would be the javax.microedition.pim package. From there, you can access the PIMList class which will give you a list of contacts. There's even a PIMListListener you can register with to detected new/removed/updated contact items. This is always much better than looping.
Thanks for the quick reply. Last time I researched all of this, about a year ago, there were some issues with PIMListListener that caused it not to notify in certain cases (sorry, don't remember exactly, might have been when updates were made by the sync or other apps, instead of by the user). I do recall that it wasn't a big deal for some apps, but would be a problem for a sync app. If those issues still exist, then I guess using that method most of the time, and then doing the loop less often (to pickup anything that was missed) could be an option.

I was surprised that Google Sync only updates every 2 hours, but I guess it makes since -- you don't want to kill the device by using too many resources.
Offline  
Old 08-11-2009, 12:51 PM   #4 (permalink)
Knows Where the Search Button Is
 
pfowler's Avatar
 
Join Date: May 2008
Location: Palo Alto, CA
Model: 8310
PIN: N/A
Carrier: ATT
Posts: 39
Post Thanks: 1
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by ericselk View Post
you don't want to kill the device by using too many resources.
This is surprisingly easy to do
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





Copyright 2004-2014 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.