[IDEA] App Sync countdown app - Android Software Development

Hi everyone,
Relative n00b here so please excuse the amateurish question. Anyone know of an app that would tell you at what time or at what interval 3rd party apps such as Facebook, Twitter, Newsrob, etc (these are a couple that i have) would start syncing data? I've had dramatic battery life improvements by increasing the time interval for data syncs (for example while I'm at work I'm more than happy for these apps to sync only every 2 hours), but you have to go into each apps' settings menus to discover and/or change their timings.
So my app idea here is to have a high-level overview of the data sync schedule on an Android phone. That way, if you d/l something new, you can quickly go into the schedule app and see if this new app's hitting servers every 5 minutes and stop it before it drains too much battery and/or bandwidth.
Just an idea. Anyone know of a pre-existing tool for this? If not, might be a good rainy-day project.
-Carl

Related

juice defender

does anyone know if its possible to run juice defender and still have background sync work for gmail? or is it that you just end up with syncing 1 time out of every 15 minutes? I enabled gmail to use the data connection but i assume that would only be when gmail is actually open. so what happens now when gmail trys to sync, will it just fail?
I'm curious about this as well. I use K9-Mail as well as GMail. If my sync interval is set to 5 minutes, but Juice Defender only turns on data every 15 minutes, which one wins? I assume Juice Defender and that the apps will just silently fail to update and try again later. Is that right?
beats me, but I'm probably going to uninstall this, I don't mind turning off the data, but not to the extend that i'm neutering my 2010 phone to do it. I mean seriously, it can't just check for sync on applications and activate the 3g? and turn off when the thing has the screen closed except for syncing? I'd expect an app to work like this one does 10 years ago. the phone is smarter than the app attempting to control it.
Yes, the inboxes won't sync while data is off. So worst case scenario you have a 15 minute delay between getting emails. You can set it to a faster data sync time - like 5 minutes. But you might only be able to do that with the paid app - UltimateJuice - I'm not sure.
I don't think the phone can do what you're wanting to do because of the way push email works. Generally, and I could be wrong here, Gmail works like other push email systems in that it requires a constant data connection (Like IMAP Idle) to notify when a new email comes in. The sync'ing you're talking about is more like a pull than a push. The problem with pulling is that it is way more taxing on the battery since it's actively checking at certain intervals if there are new emails. And if juicedefender was set to turn on 3g whenever something tried to pull - firstly the service would use way more battery than it's saving since it would constantly poll to see if anything is requesting a data connection, secondly, data would almost always be on - defeating the purpose.
robl45 said:
does anyone know if its possible to run juice defender and still have background sync work for gmail? or is it that you just end up with syncing 1 time out of every 15 minutes? I enabled gmail to use the data connection but i assume that would only be when gmail is actually open. so what happens now when gmail trys to sync, will it just fail?
Click to expand...
Click to collapse
Actually yes. The free version allows you to specify which 1 app that can bypass the data blocking. The paid version let's you specify more. (click on the "Apps" button then "configure apps" in juice defender setup)
I have JD & UJ installed, i think i have it configured ok, I have it set so no data while screen is off but I still get gmail come thru when screen is off.
I have the schedule set to check every 2 hours, does this over rule the setting for no data while screen is off.
I wish there was an extensive guide provided with these types of apps
djcsurf said:
I wish there was an extensive guide provided with these types of apps
Click to expand...
Click to collapse
That's why JD just got uninstalled.
Grr, I want my Blackberry back. I could have everything ON and still get 3+ days between charges.
I use the free version and can confirm that it is at most a 15 minute delay between emails. Its not really a big deal. It is just as responsive.
I get about 50% more battery life with the default settings.
JD is easy to understand and setup. You guys need a guide?
And no, you can't have Gmail syncing automatically by setting that particular app to keep data connection active or you have basically just made juicedefender useless.
You set it up to prefer wifi, turn data off with the screen. You set the timer to allow data connection on whatever schedule you want, ie 5 minutes every 2 hours. Then you are done. Do you really need a guide written to explain this? Then your emails will come through during whatever window you set up, ie 5 minutes every 2 hours.
muyoso said:
JD is easy to understand and setup. You guys need a guide?
Click to expand...
Click to collapse
Isn't it funny people on a developers forum want a guide for one app......
muyoso said:
JD is easy to understand and setup. You guys need a guide?
And no, you can't have Gmail syncing automatically by setting that particular app to keep data connection active or you have basically just made juicedefender useless.
You set it up to prefer wifi, turn data off with the screen. You set the timer to allow data connection on whatever schedule you want, ie 5 minutes every 2 hours. Then you are done. Do you really need a guide written to explain this? Then your emails will come through during whatever window you set up, ie 5 minutes every 2 hours.
Click to expand...
Click to collapse
I just have one JD question.. probably a dumb one..
I typically toggle my data manually. But I think I'd like to try letting JD do it's thing (turn data on for 2 minutes, twice per hour)..
So do I leave my manual toggle in the on, or off position? Their instructions are unclear (or I'm looking in the wrong place..)
In other words, if I have data manually toggled off, will JD override that and do it's thing?
Or do I have to leave data toggled on for JD to work?

Android System and OS using a lot of data plus 17-20% of battery

My battery life has not been as good since I upgraded the ROM a few weeks ago. The biggest culprit seems to be the Android System and Android OS. Each of them typically use about 8-10% of the battery, so it's not uncommon for them to have used 20% of the battery combined.
In addition, Android System uploads a bunch of data. In a full day, Android system typically sends 3-5 MB and receives 400-900 KB.
Android OS (is this all apps combined??) has uploaded 500-1000 KB and receives 10-20 MB.
I've frozen the apps on the receommended list (except for a couple I use like the ATT code scanner). Use no social network stuff. I do have Exchange plus two Gmail accounts + 3 K9 email accounts setup.
I can't seem to manage any setting change to reduce the battery/data usage of these two.
http://forum.xda-developers.com/showthread.php?t=983636
Sent from my MB860 using XDA App
DarrellRaines said:
http://forum.xda-developers.com/showthread.php?t=983636
Sent from my MB860 using XDA App
Click to expand...
Click to collapse
I've done all those things except for (Settings > Data manager > Data Delivery > social apps > sync over wifi), which I did actually do a couple hours ago on one last run through the settings to make sure I hadn't missed anything before posting here.
What the heck is android system uploading? Is that motoblur backing things up? I have searched XDA and googled and while I have seen the question about Android System with large uploads, I have yet to see a solid answer as to what's going on.
tnedator said:
I've done all those things except for (Settings > Data manager > Data Delivery > social apps > sync over wifi), which I did actually do a couple hours ago on one last run through the settings to make sure I hadn't missed anything before posting here.
What the heck is android system uploading? Is that motoblur backing things up? I have searched XDA and googled and while I have seen the question about Android System with large uploads, I have yet to see a solid answer as to what's going on.
Click to expand...
Click to collapse
I think it's constantly receiving contact numbers and contact photos and status' from facebook. no way to turn that off i dont think unless your rooted. i know anytime i call someone, their status and facebook pic is new and haven't seen it before almost every time.
tripleh3lix said:
I think it's constantly receiving contact numbers and contact photos and status' from facebook. no way to turn that off i dont think unless your rooted. i know anytime i call someone, their status and facebook pic is new and haven't seen it before almost every time.
Click to expand...
Click to collapse
I am rooted, and have frozen most of the apps on the recommended list.
I don't have facebook or twitter accounts setup. Only Exchange, Gmail and some K9 IMAP accounts.
using traffic monitor, i found that the calibrate compass service, which seems to be a whole suit of services sucks down a lot of data. its been using about 1gb data a month. which im sure is putting some strain on the battery.
Multiple email accounts will cause a great deal of data usage on their own. Especially an exchange account and a gmail account.
If you can, why not use the gmail account to send and receive all the email for the imap accounts. I do this with my business accounts and my personal email.
You also may be syncing your contacts and all with both the exchange and the gmail account which would cause extra data and would be a bit over kill.
Sent from my MB860 using XDA App

Solved my Gingerbread Exchange battery drain issue (workaround)

Since Froyo, my Galaxy S suffers from battery drain if an exchange emailaccount is setup (irrespective of the update interval set). The only ROM & kernel which didn't do this was XWJPA with the Speedmod kernels.
Battery drain was easy to spot: SystemPanel would show that the CPU load while the phone was asleep was a steady 10-20%. Once the exchange account was removed, behaviour was back to normal immediately (idle CPU floating between 1% and 3%).
Since i like JVH very much, i have come up with a workaround in Gingerbread JVH: in Settings, Accounts and Synchronization, i untick 'Auto-sync' . This stops the idle CPU load.
Next, i have set up a task with Tasker, the task enables auto-sync every 4 hours, waits 5 minutes, and disables auto-sync again. This way, stuff is still synced every now and then without the battery drain.
Hope this helps someone.
Pls post your task settings for us to import. Thks
This does not solve the "suspend" bug.
Just tried it but after playing some game for testing this solution the suspend bug came back.
maartenlaeven said:
This does not solve the "suspend" bug.
Just tried it but after playing some game for testing this solution the suspend bug came back.
Click to expand...
Click to collapse
well you could try removing software update app.
Already deleted the software update app. Doesn't seem to help.
Any other (new) sugestions?
Sent from my GT-I9000 using XDA App
I have also seen this with my phone - but more importantly I have seen it on the server side as we have a number of Android phones, and we end up with a lot of processes running on the server.
I discovered by looking in the server logs that the email application is polling the Calendar on a constant basis. It is not just pinging the folder as it should do - it is also doing a sync every 5 minutes or so as far as I can tell.
My workaround is to uncheck the option for Calendar sync.
Other items Email, Contacts and Tasks all sync just fine as they are supposed to do.
Then every once in a while I check the Calendar sync option - perform a Sync Now to bring the calendar up to date - then uncheck the option again.
I do hope thy sort out this issue soon - as otherwise they have done a great job with enhancing the email application as far as ActiveSync integration goes.
LiverpoolFCfan said:
I have also seen this with my phone - but more importantly I have seen it on the server side as we have a number of Android phones, and we end up with a lot of processes running on the server.
I discovered by looking in the server logs that the email application is polling the Calendar on a constant basis. It is not just pinging the folder as it should do - it is also doing a sync every 5 minutes or so as far as I can tell.
My workaround is to uncheck the option for Calendar sync.
Other items Email, Contacts and Tasks all sync just fine as they are supposed to do.
Then every once in a while I check the Calendar sync option - perform a Sync Now to bring the calendar up to date - then uncheck the option again.
I do hope thy sort out this issue soon - as otherwise they have done a great job with enhancing the email application as far as ActiveSync integration goes.
Click to expand...
Click to collapse
Exactly the same issue I am having.. Calandar is syncing like mad.... Im using Enhanced Email for my exchange email and thats bulling 46% of my battery.
Have removed the calandar sync and will update on results once i have a few hrs usage
Update: stopping exchange calendar sync has fixed my battery drain issues on jvh.
Sammy may have made changes to the sync app and stopped it from behaving properly. Guess its manual calendar sync until they fix
Sent from my GT-I9000 using XDA App
update II:
Enhanced Email battery drain has gone from 40% to 4% since disabling calandar sync i now have more than 5hrs battery life
i m ready to disable all the calendar to get just few hours of battery
Krieg Noobie said:
Pls post your task settings for us to import. Thks
Click to expand...
Click to collapse
Please note that this needs the program Tasker, available in the Market.
1. create a new Profile with the context Time, name the profile as you wish
2. set the From: field to 00:00, tick Repeat an set that to every x hours (i use 4 houres)
3. tap Done
4. Add a New Task, name the task as you wish
5. add an action, from the category Net, choose action Auto-sync, Set to On, tick Done
6. add an action, from the category Tasker, choose action Wait, Set to 5 minutes, tick Done
7. add an action, from the category Net, choose action Auto-sync, Set to Off, tick Done
8. Tick Done
9. Tick Apply
This way, its still possible to sync (even Agenda) without battery drain
LiverpoolFCfan said:
I have also seen this with my phone - but more importantly I have seen it on the server side as we have a number of Android phones, and we end up with a lot of processes running on the server.
I discovered by looking in the server logs that the email application is polling the Calendar on a constant basis. It is not just pinging the folder as it should do - it is also doing a sync every 5 minutes or so as far as I can tell.
My workaround is to uncheck the option for Calendar sync.
Other items Email, Contacts and Tasks all sync just fine as they are supposed to do.
Then every once in a while I check the Calendar sync option - perform a Sync Now to bring the calendar up to date - then uncheck the option again.
I do hope thy sort out this issue soon - as otherwise they have done a great job with enhancing the email application as far as ActiveSync integration goes.
Click to expand...
Click to collapse
Thanks! This is consistent with something i have seen multiple times: if i opened up Settings, Accounts and Synchronization on the phone, and tapped the Exchange account, the grey spinning circle would always show next to the calendar entry, indicating it was in a sync loop or something.
I guess, this could very well be related to Android being sensitive to recurring appointments (and exceptions in recurring patterns) and appointments with large notes attached to them.
Could you point me to the logs on the Exchange server which lead you to this discovery. I'd like to dive in deeper.

My Quest of finding a Solution to Battery Drain and some funny stuffs

I have got my galaxy S2 for a week now. I absolutely love the phone. Just that the battery problem is killing me. I only manage to get half day of usage for the phone. Then I started reading infinite number of threads on xda on battery issue. I basically tried every possible methods:
flashing so many roms (on decided to stay on KF2 right now),
deleting all widgets(could be),
root the phone and install titanium backup to delete a lot of software which ppl
classified as the source of the drain(could be),
disable fast dormancy(dun see the difference),
disable push email and sync(could be),
using advance task killer to kill app every hr (dun work),
juice defender(dun work)...
etc etc...
SOMEHOW, my battery drain issue STOPPED yesterday!!! I still dunno what exactly is causing it to stop draining. But I DID find out a pattern, when we go to the battery plot section, if the phone shows a solid "Awake" bar, then the battery drains very fast.
So I started trying very possible way to stop the phone being "awake", the above methods I marked as cound be are the ones that I think can actually help. Using advance task killer does make a "segmented awake bar" for a few minutes, but it becomes a solid bar soon after, so no use (i found "clean memory" function comes with the phone better than ATK). Deleting widgets wont stop the phone being awake but it certainly makes my phone feeling lighter and faster. Then I rooted the phone, and start using titanium backup to delete ( i cant just freeze with free version) the possible softwares, e.g the hubs, wifi-sharing, softwaire updates. Then all in a sudden, the phone tries to sleep!!!
For me, I think social hub could be making the phone awake (at least it must be one of them), but I NEED if I need to use the email app that come with the phone for receiving emails from hotmail.
funny stuff starts....
So solve it, I imported my hotmail account to gmail using POP so that I can use gmail app to check hotmail. But then my hotmail and gmail start going crazy...!!
Reason: I did similar setting before in my hotmail account to receive gmails in to my hotmail account. What happens next is... Yes.. I basically created a "loop function" which makes the two accounts keep exchanging emails automatically to one another.. I received 1000+ emails in just a few minutes and it keeps going faster and faster.!!! > < Therefore I wont try this again!!!!
Can someone tell me a solution of getting hotmail emails in other ways besides those stupid apps (e.g android mail) in the android market which basically acts as a bookmark to get you to the hotmail page? MANY THANKS!
One of these might help:
POP your hotmail into a new yahoo mail account and install yahoo mail client.
Set up a new gmail account and POP hotmail into it, use gmail client to read main and this new account.
Figure out whats wrong with your phone that makes samsung stock mail waste juice, I use it for exchange mail and it's just a bit more hungry than what I would have wanted, I get through a heavy usage day just fine.
JuiceDefender surely helps. I'm getting 2 days with medium usage, KE7 stock firmware. Yes, as you said if you have background tasks, that will kill the battery, but just close them if you don't need them. Also disable auto-sync, and let only your email sync.
Thank you kreo, i will try yahoo mail account with ur method!

MAJOR battery drain from Mail app

Dear all
I've only had my SGSII a week or so but have been very unimpressed with the battery life I've been achieving - not even a full working day.
I've been trying to work out what's going on, but this morning things really seemed to come to a head. I'd charge overnight but within an hour and a half of disconnecting the phone almost half the charge had gone & the back of it felt very warm to touch.
Looking at the battery stats and using the Watchdog program it looks like the Samsung Email app is to blame. I also saw the phone was marked as 'awake' much of the time, presumably due to a partial wakelock from the Mail app (battery history in Gingerbread doesn't seem to actually have partial wakelock as a category but this certainly looks like it). I've got three accounts setup in it - 2x Microsoft Exchange and 1x IMAP. Refresh times were initially push (MSEx 1)/manual (MSEx 2)/15 min (IMAP). I've tried changing them all to 15 min or to manual but it doesn't seem to improve matters. In case it is of relevance, the MSEx ones are imposing device & storage encryption as part of their policies (I've no choice in this).
Relevant screenshots below - would be grateful for any thoughts as to how and improve matters!
What firmware are you on? I believe the later ones fix the email app slightly, although I haven't seen any drain as bad as yours.
Another option, if you don't mind flashing a custom ROM, would be to install VillainROM 1.4, and use the Villain Tweaks app to get the vanilla Android e-mail app. It's what I've done, and it seems to work well!
Thanks for the reply. I'm just on the stock ROM that came with the phone (XWKE7) - both update on the phone and Kies don't report any further update being available for me (UK SIM-free unbranded).
I tried rooting this morning and used TB to freeze some of the Samsung rubbish (hubs, etc.) - however none of this made any difference to battery usage.
I wasn't sure how the stock email app handled MS Exchange accounts that required encryption? The Samsung Mail app isn't that bad, I particularly liked the split pane view - it seems really badly coded though if it's causing this!
Short of a total ROM replacement any other thoughts from anyone?
delete the data from the app
settings/applikations/all/email/ delete or wipe user data (all data).
make a new Mailaccount.
spline1 said:
delete the data from the app
settings/applikations/all/email/ delete or wipe user data (all data).
make a new Mailaccount.
Click to expand...
Click to collapse
Thanks - had been looking for this but couldn't find anything under 'Mail' - found it under 'Email' as you mention As soon as I deleted the data it recognised the device encryption policy had been removed and this triggered a decryption of system and external storage. I'll monitor battery usage for a few hours then reinstate the IMAP account and monitor things again before finally restoring the ActiveSync account.
OK definitely some progress so far - only IMAP account added just after charging stopped and battery usage has dramatically improved...
Now going to try adding an MS Exchange account!
OK, so far so good - MS Exchange account added back in and left on overnight...
I wonder if the mistake was when first setting up the account picking the special Samsung 'premium account' option??
OK - I'm now suspicious that it is manual sync setting that is causing the issue - re-added a second Exchange account and put it all to manual - phone almost totally drained in a couple of hours, with the sharp drop occuring just after I added that:
Have tried removing just that account and hope that will do the trick. If so, will then try adding it again but setting a sync time rather than leaving it on manual.
I've switched to touchdown for my corporate ms exchange account (push) instead of the samsung app.
Battery life gone from 7 hours to about 16 hours. I can't believe the native app is so thirsty. (KE7 stock)
Sent from my GT-I9100 using XDA App
What's interesting was that I was getting around 16+ hours too with the stock app having an MS Exchange account (on push peak times and 15 min other times) an IMAP on 15 min and a few Gmail accounts. It seemed to be adding the 2nd Exchange account on manual sync that sucked the battery life again. Am going to try readding it but paradoxically leaving it on a more frequent sync setting to see how that does.
If i remember correctly, it was observed that the mail app (non gmail) and wifi interact to cause a lovely wakelock, and that it happens with stock and samsung.
Maybe try something like k-9 mail?
Intersting - it certainly seems to behave like a wakelock. As I say though with one account on push and one in 15 min it was working fine - it was only when I tried to add a second exchange account on manual that I started to run into problems. Pretty poor coding on Samsung's part though regardless! Does anyone know the best way to raise these sort of issues with them?
Get in touch with Seven as well they produce the email app. I have mine on push with exchange and no bad battery drains, also I run manual when in the office once again no heavy drainage. I am on VR though.
Sent from my GT-I9100 using XDA App
alanjrobertson said:
Does anyone know the best way to raise these sort of issues with them?
Click to expand...
Click to collapse
In USA, they just introduced this
http://www.facebook.com/SamsungMobileUSA?sk=app_158125230916392
but obviously I doubt we can use this for SGS2 that is not out in the US yet.
You can however say that you are traveling, in the States right now
Thanks for the suggestions, folks - will try them. The @SamsungUK twitter account never seems to reply to any Tweets, but will see if they have a comparable FB page. Have found Seven's website so will get in touch with them too.

Categories

Resources