webOS Nation Forums >  Homebrew >  webOS Patches > [PATCH] Change calendar/contact sync frequency (2.2.4) - testers wanted
[PATCH] Change calendar/contact sync frequency (2.2.4) - testers wanted
  Reply
Like Tree3Likes
  • 3 Post By greenoyster

 
Thread Tools Display Modes
Old 07/20/2012, 01:06 AM   #1 (permalink)
Member
 
Posts: 315
Hi there. This is my first attempt at publishing a patch.

This patch for webOS 2.2.4 lets you change how often calendars and contacts sync for Google, Yahoo, Facebook, and LinkedIn.

webOS normally syncs Google and Yahoo every 20 minutes, and Facebook and LinkedIn every 24 hours, with no way to change the frequency. Another way of looking at it is that if you have a Google account and a Yahoo account (or two Google accounts, etc) with calendar and contacts for both, your phone is syncing up to 2 x 2 x 3 = 12 times per hour.

This patch, which requires Tweaks, allows you to change the sync frequency to 15m, 20m, 30m, 1h, 3h, 6h, 24h, or 48h. It also allows you to disable syncing when wifi is not available, or when the battery is below some percentage.

So far I've only done some limited testing, so I need your help. If you're running 2.2.4, are technically-inclined and not afraid to get your feet wet -- or have to remove/readd your accounts, or in the worst case, doctor your device -- then please try this out.

EDIT: Now available in Preware!

First, I'm assuming you already have Tweaks and WebOS Quick Install set up. Install the attached patch. Then take the attached tweakable-pimsync-frequency.json.txt and rename it to tweakable-pimsync-frequency.json . Install the json file to /media/cryptofs/apps/usr/palm/services/org.webosinternals.tweaks.prefs/preferences/ on the device.

After that, you can open Tweaks and change the sync settings under the "contacts" and "calendar" categories. The changes will not take affect until you sync each account -- you can do this easily by opening the contacts/calendar app and selecting "sync now" from the menu.

To remove, delete the patch from WebOS Quick Install or the Preware package manager. Note that any settings you set will continue to apply to any existing accounts after you uninstall the patch.

There's one additional change that the patch applies, which is a fix for calendar/contact sync times being erratic when the device is idle. The patch makes syncs happen on a regular interval. This could mean more syncs in some cases (see the 12x per hour number above), including for the default 20m sync, but the syncs will be faster so it's not certain if the power drain will be better or worse.

If you're finding worse power usage at the 20+ minute settings than without the patch, let me know. To fully undo the change, after removing the patch you'll need to add/remove the accounts (via the accounts app), or at minimum, go into the accounts app and toggle off contacts/calendar, swipe back, open the account again, and turn them back on.

If the patch works well, I'll look into making a 2.1.0 version of the patch. I've also attached a 3.0.5 version but it's completely untested.

P.S. Don't try to add any settings to the json file unless you know what you're doing. The scheduler that webOS uses will puke if you give it an interval that isn't an exact multiple of certain values.

Last edited by greenoyster; 10/29/2012 at 12:31 AM.
greenoyster is offline   Reply With Quote
Liked by jmdesai, OldSkoolVWLover and sshaka like this.
Old 07/20/2012, 09:51 AM   #2 (permalink)
Member
 
Posts: 287
Is there any way to force a complete calendar sync refresh equivalent to deleting the account and re-adding it, which is what I have to do now? My Yahoo calendar only syncs correctly for a couple of days at a time. Then it seems to miss a sync, and from then on the new items do not appear. I'm guessing it's because they are now marked as already-synced somewhere, even though they are not on the TP calendar. Maybe there's a way to force the complete refresh once a day?
Semma2 is offline   Reply With Quote
Old 07/20/2012, 11:15 AM   #3 (permalink)
pivotCE Developer
 
Posts: 2,090
Does this patch also modify "Microsoft Exchange Active Sync" Synergy Account synctimes in webOS? I wanted to find exactly this, cause i just made a docu for Building your own cloud with Zarafa using EAS to sync and didn't want to sync all the time.

Quote:
* Sadly i found no solution so far for automatically start the sync from the webos device to the server when i'm at home (wifi) at these running hours
** so when zarafa is running you have to manually start syncs in webOS by opening "Accounts" - <<Zarafa>> - "Change Login" - and enter same password again
-> this triggers a new sync, Which is not perfect cause not automatically done.
But is a trade-off for not having the HDDs running all the time and i'm used to start syncing manually as i had Chapura Echo Palm Desktop Sync before

If someone knows a better method or knows why the EAS-Synergy-Service stops to search for the server after not beeing able to connect for a while (which i assume is the problem),
PLEASE POST HERE.
For that Wifi=sync option also a specific SSID=sync would be nice, as not everybody wants to sync his data on McDo or StarBucks Wifi
__________________
Patch Enhancing vCard Export -|- Your own cloud with Zarafa (EAS sync) -|-
Tasks-app of 2.x on 3.x incl.EAS sync -|- SYM key in Enyo on phones -|- My hidden webOS Tips and Tricks - like it ?
gizmo21 is offline   Reply With Quote
Old 07/20/2012, 12:23 PM   #4 (permalink)
Member
 
Posts: 315
Quote:
Originally Posted by Semma2 View Post
Is there any way to force a complete calendar sync refresh equivalent to deleting the account and re-adding it, which is what I have to do now? My Yahoo calendar only syncs correctly for a couple of days at a time. Then it seems to miss a sync, and from then on the new items do not appear. I'm guessing it's because they are now marked as already-synced somewhere, even though they are not on the TP calendar. Maybe there's a way to force the complete refresh once a day?
Without digging into the code, probably not. The closest option would be to disable and re-enable the calendar option using the toggle in the accounts app, which is the same as removing and readding it but a little faster since you don't have to type in your username/password again.

Quote:
Originally Posted by gizmo21 View Post
Does this patch also modify "Microsoft Exchange Active Sync" Synergy Account synctimes in webOS? I wanted to find exactly this, cause i just made a docu for Building your own cloud with Zarafa using EAS to sync and didn't want to sync all the time.
It doesn't affect Exchange. EAS syncs email, contacts, calendar, and tasks on whatever schedule it syncs email. But if it's using push, it should only update if there's something new or changed so it shouldn't cost any extra power.

Quote:
Originally Posted by gizmo21 View Post
For that Wifi=sync option also a specific SSID=sync would be nice, as not everybody wants to sync his data on McDo or StarBucks Wifi
Might be doable but it would take some work. Right now it just adds a "require wifi" flag to the sync task but the scheduler doesn't have a ssid option.
greenoyster is offline   Reply With Quote
Old 11/06/2012, 09:35 PM   #5 (permalink)
Member
 
Posts: 19
Does this patch still need the txt file manually copied to the specified directory if installing from preware?
bigsnyder is offline   Reply With Quote
Old 11/06/2012, 09:47 PM   #6 (permalink)
Member
 
Grabber5.0's Avatar
 
Posts: 3,684
Quote:
Originally Posted by greenoyster View Post
It doesn't affect Exchange. EAS syncs email, contacts, calendar, and tasks on whatever schedule it syncs email. But if it's using push, it should only update if there's something new or changed so it shouldn't cost any extra power.
Have you looked at EAS enough to know if is possible to add a 'peak/off-peak' hours feature like most other smartphones have for EAS? That is one feature I've missed since I got my Pre in '09.
__________________
Matt Williams
*How to install .patch files on your device*
Developer of: SMS Auto Forward/Reply, GPS Viewer,
Keyring converters for CSV, eWallet, & CodeWallet
Touchpad patches:Keyring HD,ClassicNote HD, YouTube HD (for 2.1 app), Show email recipient addresses for contacts
Phone patches: Forums fixes and enhancements patch, Weather Channel fix
All-device patches: Update GlobalSign certs, Google Sync https fix, Yahoo contact sync fix

Grabber5.0 is online now   Reply With Quote
Old 11/07/2012, 02:52 AM   #7 (permalink)
Member
 
Posts: 315
Quote:
Originally Posted by bigsnyder View Post
Does this patch still need the txt file manually copied to the specified directory if installing from preware?
The preware version should take care of everything.

Quote:
Originally Posted by Grabber5.0 View Post
Have you looked at EAS enough to know if is possible to add a 'peak/off-peak' hours feature like most other smartphones have for EAS? That is one feature I've missed since I got my Pre in '09.
Most of the Synergy services use the Activity Manager to decide when to sync, but Activity Manager doesn't support a "peak/off-peak" hours setting. Also, EAS is binary/native and hasn't been open sourced, so it can't be changed directly.

You might be able to use Mode Switcher to change the sync frequency preference to a different value at night, though.
greenoyster is offline   Reply With Quote
Thanked By: bigsnyder
Old 12/11/2012, 05:40 PM   #8 (permalink)
Member
 
sshaka's Avatar
 
Posts: 172
Thanks for this great patch!!! The best of all!!!

Thanks to this patch I can save battery power and my Pre 2 no longer slows at syncs my calendar and contacts accounts!!!

This gives me a better browsing experience and a faster device than before!!!

MANY THANKS greenoyster!!!
__________________
El Sendero del Samurai: Lealtad, Paz Interna, Paciencia y Meditar a los pies de Buda

Samsung Galaxy S4 + Jailbreak / HP TouchPad 4G + CM10 / iPod Touch 5 + Jailbreak 6.1.3
sshaka is offline   Reply With Quote
Old 12/11/2012, 06:49 PM   #9 (permalink)
Moderator
 
OldSkoolVWLover's Avatar
 
Posts: 7,732
I think Mode Switcher might be a good idea if it can work to control EAS.

With EAS, can't IT override device settings anyways?
__________________
I love physical keyboards... but there is two devices that would make me consider a slab, one is something running a full version of Open webOS. The other is an iPhone!!!! HA HA just kidding (about the iPhone that is)...
OldSkoolVWLover is offline   Reply With Quote
Old 12/11/2012, 06:54 PM   #10 (permalink)
Member
 
sshaka's Avatar
 
Posts: 172
Quote:
Originally Posted by OldSkoolVWLover View Post
I think Mode Switcher might be a good idea if it can work to control EAS.

With EAS, can't IT override device settings anyways?
Good idea!!! I hope so!!!
__________________
El Sendero del Samurai: Lealtad, Paz Interna, Paciencia y Meditar a los pies de Buda

Samsung Galaxy S4 + Jailbreak / HP TouchPad 4G + CM10 / iPod Touch 5 + Jailbreak 6.1.3
sshaka is offline   Reply With Quote
Old 12/11/2012, 11:53 PM   #11 (permalink)
Member
 
Posts: 108
Quote:
Originally Posted by sshaka View Post
Thanks for this great patch!!! The best of all!!!

Thanks to this patch I can save battery power and my Pre 2 no longer slows at syncs my calendar and contacts accounts!!!

This gives me a better browsing experience and a faster device than before!!!

MANY THANKS !!!
Do you confirm any observable difference in speed? I just installed the patch but it is too early to make any comment on performance improvement. Though it should make some difference in theory. Why waste bandwidth unnecessarily? Thanks for the nice patch
__________________
Palm III> Visor> Visorphone> Treo 180> 270> 600> 650> 680> Centro> HTC Tilt> BB-8310> Pixi-Plus> Pre 3
Touchpad 16GB

Last edited by jmdesai; 12/11/2012 at 11:54 PM. Reason: typo
jmdesai is offline   Reply With Quote
Old 12/11/2012, 11:57 PM   #12 (permalink)
Member
 
sshaka's Avatar
 
Posts: 172
Quote:
Originally Posted by jmdesai View Post
Do you confirm any observable difference in speed? I just installed the patch but it is too early to make any comment on performance improvement. Though it should make some difference in theory. Why waste bandwidth unnecessarily? Thanks for the nice patch
Undoubtedly this patch changes the speed of my Palm Pre 2: It Flies!!!
__________________
El Sendero del Samurai: Lealtad, Paz Interna, Paciencia y Meditar a los pies de Buda

Samsung Galaxy S4 + Jailbreak / HP TouchPad 4G + CM10 / iPod Touch 5 + Jailbreak 6.1.3
sshaka is offline   Reply With Quote
Thanked By: jmdesai
Reply

 

Thread Tools
Display Modes



 


Content Relevant URLs by vBSEO 3.6.0