1) under yr email accounts, choose "as items arrive"
2) turn off data and 3g.if u are on mango. Keep the online chat connected.
3) u will notice that the email settings saying " not up to date" . thats ok and it means all push connections has been turned off .If u want to sync again. Just turn back yr data and 3g again. and yr push accounts will auto sync again
4) yr phone will rest in GSM mode most of the time consuming less power and data connections turned off.
This tip is for those who don't need timely email.
Basically what this does is turn off all connections to email server and data connection to web and act as on demand connectivity. The battery saver in mango only turns off push and msn chat.the connection to web and bytes data flow is still there.its still connected to the web
In case u didn't know when u turn on data , u are actually connected to the internet and there is a constant 2 way flow of bytes like the WiFi card in yr computer. The email app when set to push will check the server . It does not turn off this constant 2 way connection after checking . It only pushes email.
this consumes some power though it's little, over a long standby time , it can eat up a significant battery when u start using the phone phone the battery drains faster .
Magpir said:
1) under yr email accounts, choose "as items arrive"
2) turn off data and 3g.if u are on mango. Keep the online chat connected.
3) u will notice that the email settings saying " not up to date" . If u want to sync again. Just turn back yr data and 3g again. and yr push accounts will auto synnc again
4) yr phone will rest in GSM mode most of the time consuming less power
This tip is for those who don't need timely email.
Basically what this does is turn off all connections to email server and data connection to web and act as on demand connectivity. The battery saver in mango only turns off push and msn chat.the connection to web and bytes data flow is still there.its still connected to the web
In case u didn't know when u turn on data , u are actually connected to the internet and there is a constant 2 way flow of bytes like the WiFi card in yr computer. The email app when set to push will check the server . It does not turn off this constant 2 way connection after checking . It only pushes email.
this consumes some power though it's little, over a long standby time , it can eat up a significant battery when u start using the phone phone the battery drains faster .
Click to expand...
Click to collapse
While the theory behind that is correct, and thanks for the tips, there are a few points which aren't 100% correct I think. I've done extensive battery tests with smartphones that allowed it (WinMo and Android) and I think that the most gain from turning 3G off is when you have a non-optimal reception, as it eats more battery than just gsm only, when connecting/dropping/reconnecting/searching.
WiFi in comparison (always depending on signal quality though) eats more battery while transferring data, per second, but can also transfer more data in that second. On idle, WiFi looks to be less consuming.
But both won't be a huge battery drain on idle. That said, when I'm very very low on battery, I do turn off 3G too.
If you leave 3G on, but don't use it (with the battery saver or settings, and leave the phone idle), depending on your signal quality, the drain won't be major.
The push vs interval email check settings are a bit different in every platform. It all comes down on how good the 'push' implementation is and -again- your signal quality of course. This because -while interval check just opens the connection once every 15/30/60 minutes and then downloads emails if available- the push setting tries to keep the connection to the server pretty much alive, or rather it tries to keep the channel open so that the hotmail server can push the emails when they arrive.
This however is implemented differently on every platform. In google gmail in android it is pure perfection. The connection uses close to zero energy to stay alive and has a drop-retry pattern which is very optimized. You can try other email programs, even for gmail, on the same phone and it will come out using a lot more battery for push. I think that developing the server, push system and the client entitles them to optimizing it hehe.
Anyway, on WP7 there are no available battery drain monitors (you know the ones that log or tell you in real time the mA or mAh used) so one can't be sure. Being a very new operating system, I would tend to think push email drains a bit more than what android, which has been optimized for years, does with gmail.
Regardless of this, the drain of push email vs interval check (pull), occurs mostly if you receive emails very frequently. This because being contacted 20 times in 15 minutes to discharge an email from the server, possibly while not always in optimal signal strength, is more heavy than discharging all the 20 emails at once after 15 minutes.
It seems to me that when you manually or automatically lose the data connection, and then regain it, wp7 fetches automatically emails if the interval of time for the check has passed or, of course, if push email is on. This is quite better than what I experienced on android 2.1 where reobtaining the connection didn't always trigger an email check (withouth push). So I tend to leave push off and keep an interval around 30 minutes on wp7, but of course that depends on anyone's needs.
Lastly, I'm not sure if the push email energy use is affected by the entire push framework of wp7. Since pretty much a lot of the desktop relies on push (live tiles, notifications, etc), maybe the system is already busy mantaining the channel open with a single server, or mantaining multiple push channels open don't affect battery life, and thus push email doesn't really affect the battery because of this. Still, usually on smartphones, when push fails because the connection isn't reliable it falls back in a frequent-pull which can eat your battery pretty fast...
All in all, tips are good, but a second battery is best
my understanding is that the "as items arrives" is there for a reason. its the newer MS direct push technology
I believe a connection is set up. And the the phone operates on true push rather than pull ( time interval).Since its the server which 'pushes' the mail and the client (Phone) doesn't have to struggle to retrieve the mail......the only thing running is data connection ( G or 3G) which is always running anyway,
like many stated, it does not necessarily drain the battery because an open connection is set up, wheareas a time based interval when set to very small intervals like 15 minutes will drain yr battery more than an open connection.
Background:
In the past, before Direct Push Technology, devices were required to connect with the server at specified time intervals or they were triggered by SMS messages to re-sync using ActiveSync. This required a lot of system resources, notably bandwidth (needed to remotely connect the mobile device to the server) and battery life (needed to constantly run these lengthy synching processes). Direct Push Technology saves battery life and bandwidth by maintaining an open Internet connection and only downloading items as they change, instead of executing a lengthy synching process. The open Internet connection may be achieved in a number of ways: through connection to the ActiveSync cradle, through the wireless phone service itself (the device does not even have to be in active mode) or by Wi-Fi (the Wi-Fi connection must be open).
Direct Push depends on network conditions that support a long-standing HTTPS request. If the carrier network for the mobile phone or the firewall doesn't support long-standing HTTPS requests, the HTTPS request is stopped. The following steps describe how Direct Push operates when a mobile phone's carrier network has a time-out value of 13 minutes:
A mobile phone issues an HTTPS request to the server. The request tells the server to notify the device if any items change in any folder that is configured to synchronize in the next 15 minutes. Otherwise, the server should return an HTTP 200 OK message. The mobile phone then stands by.
If the server does not respond after 15 minutes, the mobile phone wakes up and concludes that the connection to the server was timed out by the network. The device reissues the HTTPS request, but this time it uses a heartbeat interval of 8 minutes.
After 8 minutes, the server sends an HTTP 200 OK message. The device then tries to gain a longer connection by issuing a new HTTPS request to the server that has a heartbeat interval of 12 minutes.
After 4 minutes, a new e-mail message is received and the server responds by sending an HTTPS request that tells the device to synchronize. The device synchronizes and reissues the HTTPS request that has a heartbeat of 12 minutes.
After 12 minutes, if there are no new or changed items, the server responds by sending an HTTP 200 OK message. The device wakes up and concludes that network conditions support a heartbeat interval of 12 minutes. The device then tries to gain a longer connection by reissuing an HTTPS request that has a heartbeat interval of 16 minutes.
After 16 minutes, no response is received from the server. The device wakes up and concludes that network conditions cannot support a heartbeat interval of 16 minutes. Because this failure occurred directly after the device tried to increase the heartbeat interval, it concludes that the heartbeat interval has reached its maximum limit. The device then issues an HTTPS request that has a heartbeat interval of 12 minutes because this was the last successful heartbeat interval.
The mobile phone tries to use the longest heartbeat interval the network supports. This extends battery life on the device and reduces how much data is transferred over the network. Mobile carriers can specify a maximum, minimum, and initial heartbeat value in the registry settings for the mobile phone.
You'll save a lot of battery power if you just set it to manual rather than "as item arrives". With this enabled, it will keep an open connection between the phone and the email server, so when you receive an email, it will go straight to your phone. While if you set it on manual it will only use 3G/GSM connection when its needed.
3G Connection No Concern with Batt Life
i have to agree, 3G connection has nothing to do with battery life, unless your area is weak in 3G network, which causes the phone to keep switching between 3G & 2G network.
it is interesting to note, if u keep ur phone in standby, you get longer standby time on 2G/Edge network compared to 3G.
BUT, you get better talk time on 3G network.
Why is this so, i have no idea. forgot where i saw this (it was on one of the brochures of a phone i used to have, either my LG Optimus 7, Blackberry Storm 9500 or Nokia 5800..)
btw, wp7 doesnt have Push Email.. nor iphone, android, symbian. the ONLY smartphone that has this, is RIM's Blackberry. This is done by having RIM's server check your emails constantly and forward to your phone as the email arrives (thus the monthly blackberry internet service / Blackberry Enterprise Service license fee to use their server)
vash_h said:
i have to agree, 3G connection has nothing to do with battery life, unless your area is weak in 3G network, which causes the phone to keep switching between 3G & 2G network.
it is interesting to note, if u keep ur phone in standby, you get longer standby time on 2G/Edge network compared to 3G.
BUT, you get better talk time on 3G network.
Why is this so, i have no idea. forgot where i saw this (it was on one of the brochures of a phone i used to have, either my LG Optimus 7, Blackberry Storm 9500 or Nokia 5800..)
)
Click to expand...
Click to collapse
Done quite a bit of testing and asked stuff to people who -I think- know this stuff. The end result was exactly like that. 3G is very efficient when used, not so much on idle, but that depends vastly on your signal strength. Anyway, yes disabling the data connection helps saving battery, disabling 3G, not so much. That mostly depends on other factors.
vash_h said:
btw, wp7 doesnt have Push Email.. nor iphone, android, symbian. the ONLY smartphone that has this, is RIM's Blackberry. This is done by having RIM's server check your emails constantly and forward to your phone as the email arrives (thus the monthly blackberry internet service / Blackberry Enterprise Service license fee to use their server)
Click to expand...
Click to collapse
I believe we're talking semantics here. Push email, to the best of my knowledge, as a concept is simply a channel (or socket connection) kept open where the mail server can send the email as soon as it has it, instead of waiting for the client to open the connection and pull it (ask for it).
While the classic implementation is BB, Google Gmail push and Hotmail push/Webdav are both push implementation. On the mobile platform push is hard to achieve compared to desktop and that's why it's flexible, it can fall back to frequent pull at times to simulate push. That's true especially when it's not convenient to keep trying having the channel open because the connection comes and goes.
I've spoken for quite a while with an android developer who made one of the most popular gmail alternative clients and he implemented push in it. He said that you have real push there, but you also need to fall back a lot on frequent pull...
Or... you could just use the built in "Battery Saver" feature that is new to Mango...
I **** you not I have gone a whole week on a single charge with my Focus with "Battery Saver" on. Way better than dinking around with toggling your crap on and off all the time. Just set it and forget it.
I have read that hotmail in wp7 uses Microsoft direct push .yes " as items arrive" is direct push. If u choose a time based schedule, its not direct push. its "pull"
For some reason I am seeing better battery life when set to as items arrive .
vash_h said:
btw, wp7 doesnt have Push Email.. nor iphone, android, symbian. the ONLY smartphone that has this, is RIM's Blackberry. This is done by having RIM's server check your emails constantly and forward to your phone as the email arrives (thus the monthly blackberry internet service / Blackberry Enterprise Service license fee to use their server)
Click to expand...
Click to collapse
as of 2010, hotmail was implemented with MS newer direct push technlogy found in exchange.
So u are wrong here.
downloaderintruder said:
You'll save a lot of battery power if you just set it to manual rather than "as item arrives". With this enabled, it will keep an open connection between the phone and the email server, so when you receive an email, it will go straight to your phone. While if you set it on manual it will only use 3G/GSM connection when its needed.
Click to expand...
Click to collapse
some clarification here.."as item arrives" is the true push. manual is pull and is no different than time interval. The difference is that u are doing it manually
obviously, fetch( pull) opens a connection to the server at specific intervals, whether you have anything to fetch or not ...and that means an internal background process /service is running all the time on the phone even though yr data is transfered at intervals. So it does not mean better battery life
push only opens a connection when the server tells it there is something available. the phone is triggered in these intervals .so how does this save battery life?
there shouldn't be a continuous connection needed. The server should simply send a small data packet to the phone ( yr phone data is "sleeping" or timed out) when it has something to deliver ..which should then trigger the phone to go 'fetch' (pull) it.
So in theory if u dont receive a any email on a day, u don't need to set it to time interval pull email as this will initiate processes thus consuming yr battery life.
email if u receive a hundred emails a day every hour , setting it to "as items arrive" will be still be better than hourly time interval .
In wp7 email account settings if u are using hotmail u will see this setting " as items arrive" . This is the true push technology . This is MS new "Direct Push technology" and it saves battery life by not initiating connections everytime the phone is set to check email in time intervals. It maintains an open connection to hotmail . Direct push only works in Hotmail in wp7 and not yahoo, google or other accounts which will use the older iphone style time interval push email.
this is how it works. What they mean by in open connection is through a unique identifier. this does not drains battery...as no data flow is taking place all the time. only yr Data connection is alive as per usual and even when its sleeping or idling, the phone receives info from Hotmail because hotmail knows where to send this info.
its like a pipe connected from A (phone) to B (hotmail) but no water flowing unless there is a need to.When u have a water to flow, B sends out a "trickle" to A to open up and establish contact and the water flows through. all this is through a unique identifier which B uses on the network . in addition the phone ( A) also periodically sends out trickles to B after studying network conditions. So direct push adjusts to any network conditions when sending out email.
As with time based intervals, the phone from A will connect to B and retrieve the water. with B having no part in it or being uncooperative not to waste A;s time even when there is no water..So if u set the wp7 time interval , u not only dont get timely emails but also wastage process as each time the phone will try to establish the connection again . There is no unique identifier involved. if for some reason the phone could not establish a connection , it try again and again in a loop and eventually returns an error, this has been seen with wp7 time based push repeatedly as an error pops out. and the email will not synchronize again at the next time interval and states " attention required". this means push email in the phone stops workig altogether because something at the other side has changed or expereicning problem
Uploaded with ImageShack.us
The problem with push, any push (email, live tile, etc) on mobile, is that your IP address, the technology (wifi or 3g), the infrastructure (firewall, router, etc) and the channel that is used to be reached, can switch quite often, as you lose signal or move from an area to another.
That can cause the phone to use battery in trying to keep the channel to the server alive. Just telling the server 'tell me when there's email' isn't enough. The phone needs to actively try to be reachable from the server, and that can be costly especially in bad reception areas. In your analogy, the problem is that the pipe can be disrupted quite often and needs to be rebuild.
The difference in battery you can see also depends on how many emails you get and how frequently you get them, of course. If you get one email every minute, push will use more battery than pull in any case as the phone will open the connection very often
andycted said:
The problem with push, any push (email, live tile, etc) on mobile, is that your IP address, the technology (wifi or 3g), the infrastructure (firewall, router, etc) and the channel that is used to be reached, can switch quite often, as you lose signal or move from an area to another.
That can cause the phone to use battery in trying to keep the channel to the server alive. Just telling the server 'tell me when there's email' isn't enough. The phone needs to actively try to be reachable from the server, and that can be costly especially in bad reception areas. In your analogy, the problem is that the pipe can be disrupted quite often and needs to be rebuild.
The difference in battery you can see also depends on how many emails you get and how frequently you get them, of course. If you get one email every minute, push will use more battery than pull in any case as the phone will open the connection very often
Click to expand...
Click to collapse
the connections ar eopened only when ther eis something to send
other than that the phone sends out heartbeats...
still no push on my wp7..
ok.. i did what you mentioned.. set my hotmail to 'as item arrives', make sure i have good connection to internet by surfing the net on the phone..
Now, i send an email from my gmail to my hotmail account.. 5 minutes passed still no mail.. (via PC)
i now go to emails (the linked email) and hit on 'sync'.. and there you go.. mail is in..
but that, i believe is pull email..
when i do the same test on blackberry, it prompts me within 30 secs ~ 1 minute after sending..
vash_h said:
ok.. i did what you mentioned.. set my hotmail to 'as item arrives', make sure i have good connection to internet by surfing the net on the phone..
Now, i send an email from my gmail to my hotmail account.. 5 minutes passed still no mail.. (via PC)
i now go to emails (the linked email) and hit on 'sync'.. and there you go.. mail is in..
but that, i believe is pull email..
when i do the same test on blackberry, it prompts me within 30 secs ~ 1 minute after sending..
Click to expand...
Click to collapse
There could be a delay at the gmail .
I just Have 3G off (in my country, it doesn't work with the TmoUS HD7 ) and the email I have synced in my phone is one I created specially for the phone, so I don't have all my friend's emails in Contacts..
Magpir said:
There could be a delay at the gmail .
Click to expand...
Click to collapse
nope, no delays at Gmail.i tried it again w Gmail opened in desktop.mail arrive bt not on phone.
Sent from my LG Optimus 7
I have a BB 9800 and my Mozart on v7712 both having the same Exchange account linked. My 9800 usually receives the email notification on average about 1 second faster than my Mozart. So there isn't really much difference.
vash_h said:
ok.. i did what you mentioned.. set my hotmail to 'as item arrives', make sure i have good connection to internet by surfing the net on the phone..
Now, i send an email from my gmail to my hotmail account.. 5 minutes passed still no mail.. (via PC)
i now go to emails (the linked email) and hit on 'sync'.. and there you go.. mail is in..
but that, i believe is pull email..
when i do the same test on blackberry, it prompts me within 30 secs ~ 1 minute after sending..
Click to expand...
Click to collapse
same for me. unreliable "push" in mango rtm
had to set it to 15min fetch as it was more reliable. although sometimes i open email and it says "last synced 19min ago" wtf?. buggy i guess
Related
Does push Gmail require my data connection to be on all the time? If so, how much battery drain does a constant data connection cause?
kgeissler said:
Does push Gmail require my data connection to be on all the time? If so, how much battery drain does a constant data connection cause?
Click to expand...
Click to collapse
no. ur using activesync so u have d choice of setting it to manual sync, or interval or immediate (always on)
if ur using edge, expect 8-9 hours.
3g, 6 hours top.
I’d just like to add my 2 cents in this so that people don’t get turned off by push email…
I happen to connect to an Exchange Server via Active Sync for my email. For 14 hrs a day, it’s set to sync “as items arrive” (i.e. push). During the night, I set the sync schedule to “manual”.
I get a moderate amount of emails each day and I have to say that I’ve not notice a substantial battery drain relative to an IMAP connection that polls every hour.
Push email doesn't require a constant connection as if you're always downloading something. It's more of a "pulse" connection. Try to research a bit into exactly how push email works and you'll see what I mean...
There are two ways to push gmail (or two that I've used recently). One is the new gmail sync, which is an Exchange server. Using that method, I was getting about 8 hours of battery.
The other method is the System Seven beta. I used this for a year+ on my Moto Q before gmail sync became available. I don't know how System Seven works -- it's not Exchange and it's not IMAP. But it works. It seems to be more reliable and quicker than gmail sync, at least for now. It never has gmail sync's problem with passing through attachments. On my TP2, with Seven, I can turn Direct Push off in Comm Manager, and I get more than 24 hours of battery. The only funny glitch with Seven is that on the TF3D home messaging tab, in the little envelope on the screen, instead of showing the beginning of the message, it says, "Click to view message." But that's o.k.; I wouldn't read messages on that screen anyway.
I recently switched back from gmail sync to Seven, and for now it's better. I expect that in a short while, gmail sync will iron out some bugs and become more responsive, and maybe I'll switch back.
One feature that neither of them have, and I'm dying for: The ability to synchronize flags, to mark a message as "Follow up" in Pocket Outlook and have it star the message in gmail. Gmail sync allows the flag, and it will sync with Outlook, but not directly with gmail on the web.
System Seven is here: http://community.seven.com/main.php
It's free and seems likely to remain so...
This program is based on the source code of Imap Pusher Service (17762) V0.60:
http://www.codeplex.com/ImapPusherService
Improvements:
1) No longer quit;
2) Auto recovery from socket errors;
3) Auto re-connect;
4) No mail sync after a re-connection, good for battery life.
Many service providers timeout the connection very shortly. For example, Verizon closes inactive sockets after 5 minutes. While xImapPusher can recovery from these 5-min timeouts, it is better not to raise a mail sync each and every 5 min.
5) Added a connection management service, XinConnManager.
If data connection is disconnected, this service will know immediately and reconnect and restart the push service. This service is truly event driven, so there is no periodical polling, idle all the time.
The multiple version can push multiple IMAP accounts, based on the 061 source code made by camro. Tested to work with Gmail and Fastmail.
Enjoy!
[For best battery life, set refresh interval to 28 and the multiple version is recommended even if you have only one account to sync.]
<deleted by user>
DLing & testing now! thanks fixup
any chance of being able to add more than 1 account to the .xml..?
Battery drain & stability
Until recently I was using Windows Live to get push email. This was working quite well, but nonetheless I've switched to GMail & IMAP for various reasons. I'm currently using EmailScheduler for IMAP IDLE support, but it looses connection quite frequently (as in 1-2 times per day). I also noticed that it drains the battery much more than the Windows Live solution. I did some tests with ImapPusher quite some time ago, but it wasn't stable enough.
Would xImapPusher solve these problems?
I noticed xImapPusher comes with a XinConnManager DLL; do you have the sources available for that component as well (I would like to know what I install on my device ;-).
Kind regards,
Ruud.
Possible improvement?
I've been having an idea that could possible improve performance and battery usage of IMAP IDLE solutions like these.
Basically, one would implement some kind of IMAP proxy. This proxy would consist of a socket listener (localhost only) and an IMAP IDLE client. Pocket Outlook is then configured to point to this proxy instead of the actual IMAP server.
The IMAP IDLE client would basically remain the same. However, whenever Pocket Outlook connects to the proxy and issues a LOGON command, IMAP IDLE service is suspended. All remaining Pocket Outlook commands are simply passed through over the same connection that was previously used for the IDLE command. Once a LOGOFF command comes in and Outlook closes the connection to the proxy, the IMAP IDLE client resumes IDLE operation (again, over the same connection). Of course, LOGON, LOGOFF and similar commands issues by Pocket Outlook will not be passed on to the actual IMAP server; the connection will be managed by the IMAP IDLE client.
This way, you prevent Pocket Outlook from setting up its own connection to, and authorizing with, the remote IMAP server for each incoming email. Instead it will re-use an existing authorized connection.
I'm not sure whether it makes that much of a difference, but it might be worth the effort.
Kind regards,
Ruud.
<deleted by user>
I've done embedded programming for 15 years, so you can trust my code.
Many programs, such as PortSip and EmailScheduler, are not event-driven, they keep polling which sucks battery, runs the phone hot and not reliable. XinConnManager is a true event-driven service, has no such problems.
When I have time, I'll re-write the entire ImapPusher from VB to native C++. Anything simply sucks when touchs .Net and VB.
Actually my current push solution is direct http push, very reliable and no any impact to battery life. Here is how to do it:
1) Run Depeche, a http server for PPC. Modify the SimplTex ISAPI to tell Outlook to sync mail when it gets a http request.
2) Run Pocket DynDNS to update "mypocketIP.homeip.net". This program works, but it uses Sleep(60 seconds) to update DynDNS. You know, Sleep() does not work as soon as the phone goes into suspend mode. So I made "XinServerManager", a service similar to "XinConnManager", to keep the connection and meanwhile call PDD to update dyndns immediately after a new (re)connection. Then kill the PDD.
3) Run PPC emulator on a XP machine and run a slightly modified xImapPusher on top of it. When email arrives, it sends a http request to my phone and the phone then will do a sync to get the new mail.
This is by far my push solution. It does not need any open connection between the phone and the server. True and pure push. This solves the porblem of 5-min timeout with many 3G providers such as Verizon. Such 5-min timeout kills battery. Before, 4 hours of push running would drain 10% battery, now with my direct http push, 10% will run the phone for 24 hours, like it is no push running at all!
Battery will always be worst using IDLE, this is one thing Microsoft did right. If you wanna know a little bit more, see here:
http://gudensoft.com/?p=140
Instead of using this, I moved to active sync as now Google supports it.
bsinclair said:
Battery will always be worst using IDLE, this is one thing Microsoft did right. If you wanna know a little bit more, see here:
http://gudensoft.com/?p=140
Instead of using this, I moved to active sync as now Google supports it.
Click to expand...
Click to collapse
That article is totally wrong, see my comments at the bottom. Both require an open connection, just inactive, no difference here between these two.
IMAP idle is actually better on this regard: it'll detect the 5-min timeout and make a reconnection, no push lost.
With ActiveSync, it won't detect the timeout and any mail arrived after 5 min until the next beatheart will not be pushed in time.
That's why AS makes you feel a little better on battery life. The default heartbeat is 8 min. So you do get slightly better battery life, but you pay for that with push delay. You may set "MinHeartBeat" to 300 (5 min) so you won't suffer from delay, but then the battery life is no any better than IMAP idle.
The only reason MS does not add IMAP support to WM is because they want to sell Exchange servers and the ActiveSync Direct Push service. Both Apple and Google went to this stupid route.
To address this 5-min timeout issue, I set xImapPusher to re-send the heartbeat without raising a mail sync.
BTW, MS Live push is based on IMAP idle, not ActiveSync. You know, years ago MS bought Hotmail which was Linux based, seems still Linux. Live is far more reliable than AS. Like rsenden, I too was using Live because it does not have all kinds of troubles with Gmail's AS push. However, Verizon applied the stupid 5-min timeout sometime this year or so, so I had to figure out my direct http push.
Fixup said:
I've done embedded programming for 15 years, so you can trust my code.
Many programs, such as PortSip and EmailScheduler, are not event-driven, they keep polling which sucks battery, runs the phone hot and not reliable. XinConnManager is a true event-driven service, has no such problems.
When I have time, I'll re-write the entire ImapPusher from VB to native C++. Anything simply sucks when touchs .Net and VB.
Actually my current push solution is direct http push, very reliable and no any impact to battery life. Here is how to do it:
1) Run Depeche, a http server for PPC. Modify the SimplTex ISAPI to tell Outlook to sync mail when it gets a http request.
2) Run Pocket DynDNS to update "mypocketIP.homeip.net". This program works, but it uses Sleep(60 seconds) to update DynDNS. You know, Sleep() does not work as soon as the phone goes into suspend mode. So I made "XinServerManager", a service similar to "XinConnManager", to keep the connection and meanwhile call PDD to update dyndns immediately after a new (re)connection. Then kill the PDD.
3) Run PPC emulator on a XP machine and run a slightly modified xImapPusher on top of it. When email arrives, it sends a http request to my phone and the phone then will do a sync to get the new mail.
This is by far my push solution. It does not need any open connection between the phone and the server. True and pure push. This solves the porblem of 5-min timeout with many 3G providers such as Verizon. Such 5-min timeout kills battery. Before, 4 hours of push running would drain 10% battery, now with my direct http push, 10% will run the phone for 24 hours, like it is no push running at all!
Click to expand...
Click to collapse
this sounds like a nearly perfect solution, now if it could only be done w/2-3 accounts.
i'll have to give this method a try someday when i get some freetime on my hands. thanks man!
<deleted by user>
The phone keeps connections and sockets in suspend mode, it is the service provider (mine is Verizon) that closes inactive sockets (not the connection) after a timeout (5 min in case of Verizon). You have no control about that.
However, the connection does get disconnected sometime, a random thing, that's why your program needs to wait for the "NOTIFICATION_EVENT_NET_DISCONNECT" event. Note that when you unplug your phone from our computer, it also generates this event, so your program needs to deal with that too.
How long you can use Sleep() is defined by the power settings. For example, if you set your phone to suspend in 60 seconds, you cannot use Sleep(61000). Anyway, you should not use Sleep() at all, because it'll either prevent your phone from suspending or hang your program till the phone wake up.
This is how I do wait when needed:
Code:
SYSTEMTIME GetTimeAfterSeconds(DWORD nTimeInSeconds)
{
SYSTEMTIME sTime;
FILETIME fTime;
GetLocalTime (&sTime);
SystemTimeToFileTime(&sTime, &fTime);
ULARGE_INTEGER uTime;
uTime.HighPart = fTime.dwHighDateTime;
uTime.LowPart = fTime.dwLowDateTime;
uTime.LowPart += nTimeInSeconds*1000*1000*10;
fTime.dwHighDateTime = uTime.HighPart;
fTime.dwLowDateTime = uTime.LowPart;
FileTimeToSystemTime(&fTime, &sTime);
return sTime;
}
void Wait(HANDLE hEventTimer, DWORD dwTime)
{
CeRunAppAtTime (_T("\\\\.\\Notifications\\NamedEvents\\EventTimer"),&GetTimeAfterSeconds(dwTime));
WaitForSingleObject(hEventTimer, INFINITE);
}
main()
{
HANDLE hEventTimer = CreateEvent (NULL, false, false, _T("EventTimer"));
......
Wait(hEventTimer,60);
......
CloseHandle(hEventTimer);
}
Note that WaitForSingleObject(hObject, 60000) won't work, like Sleep(60000).
SOHKis said:
this sounds like a nearly perfect solution, now if it could only be done w/2-3 accounts.
i'll have to give this method a try someday when i get some freetime on my hands. thanks man!
Click to expand...
Click to collapse
Multiple accounts sync should be easy, just tell which account to sync in the http request.
Fixup said:
I've done embedded programming for 15 years, so you can trust my code.
Click to expand...
Click to collapse
It's not that I don't trust your code; as a programmer (non-embedded Java and some C#) I'm just interested in what components like these exactly do. Anyway, I had some time left yesterday so I installed xImapPusher. So far it's working good, too early to compare battery usage with EmailScheduler yet though.
Fixup said:
Actually my current push solution is direct http push, very reliable and no any impact to battery life.
Click to expand...
Click to collapse
This indeed looks like a very good solution. Unfortunately it currently requires a Windows machine running 24/7 (which I don't have) and is too difficult to set up for the average user. For me, a good alternative would be to run the 'IMAP IDLE to HTTP request' component on my CH3SNAS.
Of course, the ultimate solution would be to have a hosted solution on which users can register their IMAP accounts, together with a program on their PPC that both listens for push notifications send by the hosted solution, and sends IP updates to the hosted solution.
camro said:
i'm not sure, if this save battery ..... maybe you are interested on this more in detail
Click to expand...
Click to collapse
Basically, I got the idea by reading somewhere that Pocket Outlook IMAP solutions are always less efficient than, for example, ActiveSync. This is because every time Outlook needs to retrieve mail, it needs to set up a TCP/IP connection, set up SSL if applicable and do a LOGON (and afterwards do a LOGOFF, close the connection).
With an IMAP IDLE solution like xImapPusher you already have a secured and authenticated connection set up, so why not have Pocket Outlook re-use that same connection? However, I don't know how much data and processing power is involved in setting up and closing the connection, and thus how much impact this could have on battery life and time taken to retrieve new mail.
So basically, xImapPusher would not only function as an IMAP client, but also as an IMAP server. The xImapPusher server component handles incoming connections, together with LOGON and LOGOFF requests. All commands between LOGON and LOGOFF are simply passed on to the real IMAP server via the connection that was previously set up by the IMAP IDLE client component (which has temporarily suspended IDLE operation).
Fixup said:
Multiple accounts sync should be easy, just tell which account to sync in the http request.
Click to expand...
Click to collapse
sorry, the multple accounts was in reference to the re-writing of imappusher to c++
still gonna give the http method a shot when i get some time. thanks again man
<deleted by user>
<deleted by user>
rsenden said:
Basically, I got the idea by reading somewhere that Pocket Outlook IMAP solutions are always less efficient than, for example, ActiveSync. This is because every time Outlook needs to retrieve mail, it needs to set up a TCP/IP connection, set up SSL if applicable and do a LOGON (and afterwards do a LOGOFF, close the connection).
With an IMAP IDLE solution like xImapPusher you already have a secured and authenticated connection set up, so why not have Pocket Outlook re-use that same connection? However, I don't know how much data and processing power is involved in setting up and closing the connection, and thus how much impact this could have on battery life and time taken to retrieve new mail.
So basically, xImapPusher would not only function as an IMAP client, but also as an IMAP server. The xImapPusher server component handles incoming connections, together with LOGON and LOGOFF requests. All commands between LOGON and LOGOFF are simply passed on to the real IMAP server via the connection that was previously set up by the IMAP IDLE client component (which has temporarily suspended IDLE operation).
Click to expand...
Click to collapse
Compared to the excessive battery drain from the 5-min timeouts, nothing else matters.
Don't believe too easily what you see on the net. Highschool bloggers dont know what they talk about. If IMAP idle is not good, why MS Live uses it?
I've done extensive tests between imap idle and ActiveSync. I also tested z-push (AS clone) and many other things in searching for the best push solution.
The real problem with imap idle is there is only few mobile clients support it and none of them work. That's why I spent time on this project.
Fixup said:
Compared to the excessive battery drain from the 5-min timeouts, nothing else matters.
Don't believe too easily what you see on the net. Highschool bloggers dont know what they talk about. If IMAP idle is not good, why MS Live uses it?
Click to expand...
Click to collapse
I don't believe everything I see ;-). I was just trying to find an explanation why for example EmailScheduler drained the battery so much faster than Windows Live. After trying out xImapSync for the last few days, I now know that it is just caused by the way EmailScheduler is implemented.
With xImapPusher battery drain is about the same as Windows Live I think, and it's also more stable than EmailScheduler (e.g. I don't have to force a reconnect every now and then). So thank you for your contribution to this project!
This is by far my push solution. It does not need any open connection between the phone and the server. True and pure push. This solves the problem of 5-min timeout with many 3G providers such as Verizon. Such 5-min timeout kills battery, because push is like 5-min polling. Both ActiveSync and IMAP idle suffers from the timeouts.
Before, 4 hours of push running would drain 10% battery, now with my direct http push, 10% will run the phone for 24 hours, like it is no push running at all!
Here is how to do it:
1) Run Depeche, a http server for PPC. Modify the SimplTex ISAPI to tell Outlook to sync mail when it gets a http request.
2) Run Pocket DynDNS to update "mypocketIP.homeip.net". This program works, but it uses Sleep(60 seconds) to update DynDNS. You know, Sleep() does not work as soon as the phone goes into suspend mode. So I made "XinServerManager", a service similar to "XinConnManager", to keep the connection and meanwhile call PDD to update dyndns immediately after a new (re)connection. Then kill the PDD.
3) Run PPC emulator on a XP machine and run a slightly modified xImapPusher on top of it. When email arrives, it sends a http request to my phone and the phone then will do a sync to get the new mail.
The only requirement is a public IP address on the phone. At least Verizon offers this, not sure about other carriers.
:s....man can you make a sort of guide for this ? U explained it all in a hurry and to an average (me) user it makes some sense..but still i cant understand enough to implement this :S
I wasn't able to get Google Sync to push emails to my phone, so I bit the bullet and forwarded my Gmail accounts to my Windows Live Account, because I could then get push email on my TP2 using the Windows Live app.
I assumed that email would be pushed to my device through MS servers, thus saving battery life by not having the phone check for mail every minute. And to some extent, this is what I think is happening. But the battery life SUCKS now! I surf the web on my phone and listen to music for about 4-5 hours a day. The rest of the time, it's inactive in my pocket while I'm at work, and is charged every night.
But with Windows live mail on, the phone gradually gets warm while playing music (Microfi nitrogen) and gives me low battery warnings by 7PM. Normally I could go 1.5 days without a recharge.
Here are my Windows Live Settings:
Sync Options --> Sync Email (ticked)
Sync Schedule --> As Items Arrive
Sync Times ---> Always
These seem to be fairly standard, and nothing power-intensive. Does anyone have an idea as to why my battery life has dropped off a cliff? Thanks.
don't really know, but I noticed that I had my phone checking G-mail, regular hotmail, and yahoo every 30 minutes. Battery from full morning charge, would be at 1 bar by 9pm. This is w/ normal use, using BT for an hour, 10 phone calls or so.
I thought that the Push concept only applied to MSFT Exchange server. You may be emulating 'push' using the other accounts, but I'm not sure if its the same. I'd just change your sync settings to like 2 hours and observe it, not the best thing, but it'll give you a better idea. Thats what I've had mine at now all day and the one bar hasn't dropped off yet..
aniym said:
I wasn't able to get Google Sync to push emails to my phone, so I bit the bullet and forwarded my Gmail accounts to my Windows Live Account, because I could then get push email on my TP2 using the Windows Live app.
I assumed that email would be pushed to my device through MS servers, thus saving battery life by not having the phone check for mail every minute. And to some extent, this is what I think is happening. But the battery life SUCKS now! I surf the web on my phone and listen to music for about 4-5 hours a day. The rest of the time, it's inactive in my pocket while I'm at work, and is charged every night.
But with Windows live mail on, the phone gradually gets warm while playing music (Microfi nitrogen) and gives me low battery warnings by 7PM. Normally I could go 1.5 days without a recharge.
Here are my Windows Live Settings:
Sync Options --> Sync Email (ticked)
Sync Schedule --> As Items Arrive
Sync Times ---> Always
These seem to be fairly standard, and nothing power-intensive. Does anyone have an idea as to why my battery life has dropped off a cliff? Thanks.
Click to expand...
Click to collapse
Using the push email features means that the phone keeps a constant connection to the Internet servers, transferring data continuously. That eats up the battery. I had the same symptoms when I set up Activesync to use push email from my gmail account. I stopped using push (which worked fine - when gmail got a new message, I IMMEDIATELY got a push email) and went back to manual checking. I don't use my gmail for primary email anyway, I was just checking the capability.
but i thought the point of push email, at least when using a WindowsLive/Hotmail account was that MS servers were doing the work of checking my account for new mail, and then notifying me only when I had new mail to check, kinda like an SMS alert. That is supposed to take the strain of checking continuously off of my device.
I had a BB Bold 9700, and this is how push email is supposed to work. Blackberry's Enterprise servers check all their users' mail accounts for new mail continuously, and push notifications to the users when new mail arrives.
It's very disappointing to know that this sort of system is not possible on the TP2. I switched to it from the 9700 because the surfing experience was better, and I liked the customizability, but lately I've been regretting my decision to switch, seeing as how seamless and fast BB OS 5.0 is compared to WM, which, even after downgrading to 6.1 and disabling, is sluggish to the point of annoyance.
Honestly, I had a Samsung Blackjack II with WM Standard 6.1, and it often felt faster than my TP2.
aniym said:
but i thought the point of push email, at least when using a WindowsLive/Hotmail account was that MS servers were doing the work of checking my account for new mail, and then notifying me only when I had new mail to check, kinda like an SMS alert. That is supposed to take the strain of checking continuously off of my device.
I had a BB Bold 9700, and this is how push email is supposed to work. Blackberry's Enterprise servers check all their users' mail accounts for new mail continuously, and push notifications to the users when new mail arrives.
It's very disappointing to know that this sort of system is not possible on the TP2. I switched to it from the 9700 because the surfing experience was better, and I liked the customizability, but lately I've been regretting my decision to switch, seeing as how seamless and fast BB OS 5.0 is compared to WM, which, even after downgrading to 6.1 and disabling, is sluggish to the point of annoyance.
Honestly, I had a Samsung Blackjack II with WM Standard 6.1, and it often felt faster than my TP2.
Click to expand...
Click to collapse
The blackberry is designed fro the start to do push; the WM platform is designed as a portable computer, to which they have added push capabilities. I'm not really sure how the BB connects to push, but I suspect that it is not via what we would normally call an Internet connection. If you really need push, then I'd suggest either going back to BB or getting an extended battery.
stevedebi said:
Using the push email features means that the phone keeps a constant connection to the Internet servers, transferring data continuously. That eats up the battery. I had the same symptoms when I set up Activesync to use push email from my gmail account. I stopped using push (which worked fine - when gmail got a new message, I IMMEDIATELY got a push email) and went back to manual checking. I don't use my gmail for primary email anyway, I was just checking the capability.
Click to expand...
Click to collapse
It is my understanding that exchange push only connects when it receives a 'wake up' message from the server.
I use exchange push 24/7 and the few times that I have turned it off, I noticed no difference in battery life.
worwig said:
It is my understanding that exchange push only connects when it receives a 'wake up' message from the server.
I use exchange push 24/7 and the few times that I have turned it off, I noticed no difference in battery life.
Click to expand...
Click to collapse
I think the issue is with the gmail push system. I suppose if one is using an actual MS Exchange mail system at a company it may work better.
Same with me when I have it set to "as items arrive" drains the battery fast !
I have Gmail push set up through ActiveSync and notice no impact on battery life. If anything, I get better battery life than when I had email set up as IMAP and checking the server every 30 minutes.
dwboston said:
I have Gmail push set up through ActiveSync and notice no impact on battery life. If anything, I get better battery life than when I had email set up as IMAP and checking the server every 30 minutes.
Click to expand...
Click to collapse
Wow, I wonder why mine doesn't do that. Are you syncing just email or other data as well?
stevedebi said:
Wow, I wonder why mine doesn't do that. Are you syncing just email or other data as well?
Click to expand...
Click to collapse
Just email. No contacts or calendar - I sync those from my PC at home.
My Touch Pro 2 uses about 2 Meg a day just in keeping the heartbeat alive for Windows Live with only the hotmail service active.
I worked this out as Windows Live runs as a service which is hosted by services.exe. If I monitor the bandwidth usage of services.exe, it works out to be about 2 Meg a day. (Verfied that hotmail was the only thing going through services by turning off hotmail and verifying that bandwidth usage of services.exe didn't increase.
I'm more concerned about bandwidth usage of Windows Live. However, I'm assuming that bandwidth usage = heat and battery life which are issues that started this thread.
Can anyone else confirm that they are seeing similar bandwidth usage just in maintaining the heartbeat?
Does anyone know how to reduce the heartbeat frequency? As that would reduce bandwidth usage, heat, battery life etc.
Thx. Paul
Hello all, does anyone know about an email service that pushes your email to your phone free?? thanks alot.
try Gmail. You can set the mobile check your mail more frequently, like push mail
truelied said:
try Gmail. You can set the mobile check your mail more frequently, like push mail
Click to expand...
Click to collapse
Is it free?? and where can i download it from.... it's supposed to use only gmail right?? i was actually looking for the one that can send from multiple mail accounts....
You can use any email service like gmail that allows pop3 to check mail frequently (5-15 mins) with the built in outlook email program. No extra downloads. This is quite batter friendly.
If u want true push email, there are a few services which give you a free service. Had checked long back and don't really remember. Google Apps allows push email. You could read further on their site. It would be quite a drain on the battery to be constantly use gprs to be in touch with the email server.
Interesting post/discussion on Blackberry Vs Windows Mobile (push email)
http://www.techatplay.com/?p=482
Why not using a windows live account? With Microsoft live you can set emails to be received as they come in...
dojono said:
Why not using a windows live account? With Microsoft live you can set emails to be received as they come in...
Click to expand...
Click to collapse
Is that through activesync (over the air)?
How does it affect the battery life?
Yep, I am using my Windows Live set up to sync as mail is received. It is not through AS, what would be the point??? Battery life is only minimally affected, as the mail is loaded onto your phone as it is received, rather than server being in constant sync state.
How does Windows live work?
enigma1nz said:
Yep, I am using my Windows Live set up to sync as mail is received. It is not through AS, what would be the point??? Battery life is only minimally affected, as the mail is loaded onto your phone as it is received, rather than server being in constant sync state.
Click to expand...
Click to collapse
What I am not being able to understnad (and it may purely be due to my not knowing enough) is that how does the phone get to 'know' that there is new mail. As far as I understand, besides manually checking, there are three ways for a phone to get to know about it.
1) POP/IMAP: Checking with a server every "x" minutes on POP3/IMAP (normal outlook experss set to check every "x" minutes)
[Battery life would be affected depending on the "x" minutes and may be much lesser than (2) ]
2) Push Email like Sync: Polling(?) the server to check if there are any changes frequently (probably every few seconds), which produces a push email like effect.
[This may affect battery life significantly]
3) Blackberry like service: Push email via the mobile phone service provider, which may be connected to RIM servers. Where the Server will tell the phone service provider, which in turn will tell the phone about new mail (the mail can subsequently either be delivered to the phone or the phone can check from the server).
[Minimal battery usage, as there is not constant check of email/sync]
How does the phone get to know that there is new email, with Windows live?
I'm actually very curious how Windows Live's push email works too. Anybody have any clue? Searched google till the **** crew, didn't get anything.
I guess what wm does if more like "pull", it's very power consuming. I've been using this service recently, battery life's terribly affected if I choose "push" in schedule settings.
I'm using Valkyrie v7.0 23659 rom, the phone can standby for 7 days (only a few SMS everyday); but with "push mail service", only 1 day (with 30min phone call, 20 SMS and around 10 e-mails)