real time location tracking in background - Android Software Development

forgive my noobness
will android OS allow me to code a program that runs in the background while continuously uploading GPS data to a third party server?

black_squirrel_bx said:
forgive my noobness
will android OS allow me to code a program that runs in the background while continuously uploading GPS data to a third party server?
Click to expand...
Click to collapse
Sure... but it will kill your battery very quickly, a few cardio training apps do this.

Nanan00 said:
a few cardio training apps do this.
Click to expand...
Click to collapse
can you expand on cardio apps? do they help to improve battery life under high power consumption situations or are they like a pseudo task manager? yeah, a lot of the information i have been garnering has been saying that constant use of GPS data substantially affects battery life.
what if i were to use cell tower triangulation? could a program freely access information relating to cell tower locations or would i have to get permission from the provider?

black_squirrel_bx said:
can you expand on cardio apps? do they help to improve battery life under high power consumption situations or are they like a pseudo task manager? yeah, a lot of the information i have been garnering has been saying that constant use of GPS data substantially affects battery life.
what if i were to use cell tower triangulation? could a program freely access information relating to cell tower locations or would i have to get permission from the provider?
Click to expand...
Click to collapse
I think he means that a number Cardio (exorcise helper) apps tend kill peoples battery pretty fast as they do make constant use of the gps.
As i understand it (and bear in mind i'm a total noob with android development too) the android location api's can provide cell tower location based location info just as easily as GPS, the only limitation is that it is less accurate.
Assuming you don't need to the second updates, maybe it would be worth ether polling the location only every so often (say 10 minutes), or even just linking in with googles existing latitude service.
Hopefully that helped/made sense
P.S. First post

another thing, can you have apps that start automatically when the phone is turned on, like startup programs on a pc or mac?

opengeotracker .org is the program I use when I go on trips. Setting an update time of 5-10 minutes means it isn't that bad on the battery. It is open source and you can run the tracking website yourself so you don't have to rely on someone else keeping their webserver up.

Related

SOLVED : Hero uses a lot (too much) background data!

Hi there!
Just got my first "Hero only" phonebill after getting the device and I must say I'm pretty shocked. It was 3 times normal!
I have only used Facebook INTERMITTANTLY and not logged in under the "Social" function. Twitter has been off. I haven't used email yet. I have only used Android Market under wifi and my only real usage has been various news sites with iPhone adapted webpages.
The only thing I can tell that's "on" has been the weather.
So I installed 3G Watchdog to monitor the usage and this is what I found out:
- In a twelve hour window with
- No Browser usage, no Facebook/Twitter/Flickr/Market
- Setting for Google has been "Enable background data usage" but not Auto-sync
- No Exchange usage or email
- Enable always on mobile has been activated
- No other internet function is activated as I can tell
- This has resulted in 610kb if data usage, that's 1.2mb in 24hrs
- That's 36MB a month, 436mb a year (and I pay per mb)
To me, this is "data out the widow" which I havent used, but the Phone has somehow "eaten" up.
I feel as though I havent got much control over how and when the Hero used data, the settings are not "clear" in the Android/Hero settings on administrating data usage. In my instance, it uses data without me needing it.
Is there any way to monitor WHICH program or function uses data without need? Ie. something like 3G Watchdog but more detailed?
there is net-counter.. but its familiar to 3g watchdog..
Android phones, and phones like them (e.g.iPhone) are really not designed to be used with "pay per MB" plan. I couldn't tell you what processes are going to be "consuming" data, but I'd consider 1.2MB to be pretty insignificant, though I understand that if you're paying by the MB your opinion would be significantly different.
I know it's probably not much help, but if I were you, since you are not using any of the "push" facilities of the device (e.g. GMail) I'd be inclined to switch off mobile internet and only switch it on as you need it.
Regards,
Dave
foxmeister said:
Android phones, and phones like them (e.g.iPhone) are really not designed to be used with "pay per MB" plan. I couldn't tell you what processes are going to be "consuming" data, but I'd consider 1.2MB to be pretty insignificant, though I understand that if you're paying by the MB your opinion would be significantly different.
I know it's probably not much help, but if I were you, since you are not using any of the "push" facilities of the device (e.g. GMail) I'd be inclined to switch off mobile internet and only switch it on as you need it.
Regards,
Dave
Click to expand...
Click to collapse
Good advise there for you. 1.2Mb is very little though in the big scheme of things. Its about a minute of a typical MP3 or less than the capacity of a floppy disk (if you remember those).
The phone is designed to be used with an unlimited data plan - its a cloud based phone really.
As an aside, I do think these plans are still too expensive in reality.
foxmeister said:
Android phones, and phones like them (e.g.iPhone) are really not designed to be used with "pay per MB" plan. I couldn't tell you what processes are going to be "consuming" data, but I'd consider 1.2MB to be pretty insignificant, though I understand that if you're paying by the MB your opinion would be significantly different.
I know it's probably not much help, but if I were you, since you are not using any of the "push" facilities of the device (e.g. GMail) I'd be inclined to switch off mobile internet and only switch it on as you need it.
Regards,
Dave
Click to expand...
Click to collapse
I'm aware of this fact Dave, I had the Diamond before I got the Hero. But what I lack is a built in function to "control and monitior usage". As of right now, it seems like it lives it's own life. If you have an unlimited plan, you wont really care. But Another point is the fact that this "unwanted" data usage consumes battery power and thus limits the battery life.
All I want is to be in control of my phone....
I am considering an unlimited plan or a 1gb/2gb plan. But there is a "cap" on my current plan where I won't pay for data over 3MB every day, but it's still a lot when you use that much every day.
You could try something like Droidwall ( http://code.google.com/p/droidwall/ ), but this only works for rooted devices.
At least you should be able to "whitelist" the apps that you want to be able to talk to the outside world, and see if this has any material effect on your data usage.
Regards,
Dave
Perhaps something obvious, but have you turned off the 'always on mobile data'?
You can find that under the wireless controls, mobile network settings.
And with a lot stuff (like the weather applet) you can disable the automatic updates.
Also turn off some data sync stuff under settings, data synchronization.(Google services for example).
Hope this helps a bit, although you might have done this already
Droid wall might help otherwise as a previous post also says
I had the same problem as I don't have a plan and my carrier charges per mb , so I installed APNdroid (it changes the APN settings , and restores it if you want to use mobile network ) .
HTC even provide a widget to turn mobile data on and off quickly. Put it on your Home screen.
I used this while on vacation to avoid huge data costs.
Also set Google synchronisation to non automatic, sync it when you need too.
TBH though, the Hero is such a data centric device, its pretty boring with no live data connection... as are iPhone and any other smartphone.
RaptorRVL said:
Perhaps something obvious, but have you turned off the 'always on mobile data'?
You can find that under the wireless controls, mobile network settings.
And with a lot stuff (like the weather applet) you can disable the automatic updates.
Also turn off some data sync stuff under settings, data synchronization.(Google services for example).
Hope this helps a bit, although you might have done this already
Droid wall might help otherwise as a previous post also says
Click to expand...
Click to collapse
"Always on" should not use up data as it is only there to keep the connection open so the phone doesn't have to connect each time an application needs to use 2G/3G/3.5G
I disabled the always on, weather etc... but something is still consuming data. Must be one of the apps circumventing the phone settings.
But my point is this, it is to diffucult/complicated/cumbersome/unintuetive so control the amount of data the Hero uses.
Also make sure stocks is set not to update.
If you are really concerned then just turn mobile data off until you need to use it (via the widget).
The point of these type of phone is to connect to many different services. Its simple to turn all data off if you wish.
The expectation for the smartphone is that it will be dragging information in constantly, keeping you up to date with your social network.
However, you might try WiSyncPlus to automatically disable data access when you are not in range of known WiFi networks. That might be the easiest way of controlling your data consumption over the cell/mobile network.
SOLVED:
The new official Facebook App was to blame for almost the entire 1,2mb a day usage. I did not log out, just pressed the home button and the app was running in the background updating.
Is this a bug? Is there any need for it to update when you don't have it open? I'm thinking battery power here as well as data usage.
Sebastian768 said:
SOLVED:
The new official Facebook App was to blame for almost the entire 1,2mb a day usage. I did not log out, just pressed the home button and the app was running in the background updating.
Is this a bug? Is there any need for it to update when you don't have it open? I'm thinking battery power here as well as data usage.
Click to expand...
Click to collapse
The "Home" button doesn't actually shut down the app , it merely puts it to sleep. The "Back" button on the other hand closes the app and removes it from memory.
Linux has it very own and famous scheduler which on its own manages sleeping apps and can discard them from memory at will when the need for more memory exists
In settings you have the option to set the refresh interval, you can change it to 0. Might also be worth using a task manager to kill unwanted programs.
Devs need to write their apps correctly TBH. If its in the background and the user has not set its background processes to keep working, then it should stay silent.
ONLY if a user elects to have background processes running should an app continue to work away.
A simple setting in an apps preferences is all thats needed.
The back button to kill apps... thats pretty silly TBH especially with Browser. You would have to hit back multiple times to return to the very first web page you opened before you actually exited the app... very cumbersome.
Again, a simple setting in each app and indeed globally in the Hero's settings would make life far less confusing.

Alarm woes with CM 5.0

Since no one replied to this message in the official CM 5.0 thread. I have decided to create a new thread and hope to find a solution to this problem.
My alarm clock would stop working randomly ever since I flashed to CM 5.0, from Beta 4 to 5..2, the problem persists. If i set an alarm that is about one hour from now, it would go off. But the real alarm I need which is supposed to go off at 8 am in the morning never goes off. Anyone had similar problems? I read Cyanogen's warning about the alarm clock problem. But seems he's just trying to remind you to reset your alarm after flashing to CM. Unluckily, I've reset my alarm numerous times and it never goes off in the morning.
Anyone can give me a hand? Thanks in advance! Overall, CM is a great ROM which gives me the option to use open vpn, which is vital for me since I'm living in China behind the GFW.
Are you by chance using any taskillers?
I do use a task-killer program. But I always keep the clock app on while i'm sleeping to try to make sure the alarm goes off on time. But it never does in the morning.
Don't use task killers on the N1, there really is no need.
cyanogen said:
Don't use task killers on the N1, there really is no need.
Click to expand...
Click to collapse
I wouldn't say that's accurate... The phone does slow down noticeably when you have 20-30+ things open
Sometimes a lot of them are running as well (using TasKiller, a lot of Yellow, including Camera, Gmail etc even when not in use and no emails being downloaded). This probably affects battery life as well.
Paul22000 said:
I wouldn't say that's accurate... The phone does slow down noticeably when you have 20-30+ things open
Sometimes a lot of them are running as well (using TasKiller, a lot of Yellow, including Camera, Gmail etc even when not in use and no emails being downloaded). This probably affects battery life as well.
Click to expand...
Click to collapse
Do you have any evidence to back this up? Yes this was a problem on older devices because many things would be fighting over the tiny amount of RAM.
You'll see lots of processes running but that's just the way Android works. Since it doesn't really benefit from simple caching like a normal linux system would, it just keeps everything running and kills unused stuff when memory is low. Most of the things you see running are either paused and using no CPU, or are services that would be periodically launched anyway.
http://developer.android.com/guide/topics/fundamentals.html#lcycles
Keeping these processes alive should actually be saving you battery rather than using it. It's more expensive to launch and restore the state of an application or service after being killed than it is to simply resume one that's been paused.
cyanogen said:
Do you have any evidence to back this up? Yes this was a problem on older devices because many things would be fighting over the tiny amount of RAM.
You'll see lots of processes running but that's just the way Android works. Since it doesn't really benefit from simple caching like a normal linux system would, it just keeps everything running and kills unused stuff when memory is low. Most of the things you see running are either paused and using no CPU, or are services that would be periodically launched anyway.
http://developer.android.com/guide/topics/fundamentals.html#lcycles
Click to expand...
Click to collapse
Yes. The phone gets slow when TasKiller shows 30 things in it. I click close all, and it's faster. Do you know my personal experiences more than I do?
Paul22000 said:
Yes. The phone gets slow when TasKiller shows 30 things in it. I click close all, and it's faster. Do you know my personal experiences more than I do?
Click to expand...
Click to collapse
I think there is likely one or two specific misbehaving applications that are giving you trouble, rather than the way the system works as a whole, thats all.
I think what Cyanogen is saying is that android does not handle running processes the way other os's do They have a lifecycle that is non-obvious to someone just looking at a process list. If you insist on killing tasks outside of the activity/service lifecycle they you _will_ get service failures (like the alarm clock) its up to you what you value more.
I have not installed any sort of task manager (outside what's in astro but I don't use it) and never see any noticeable slow down.
Anyway - back on topic.
Yes I have the same issue, never had it before.
Since flashine 5.0.2 my alarm doesn't work in the morning.
The linux kernel keeps a buffer cache of recently used files in RAM. So whenever an application wants to access something on the flash, instead of going to the flash file system, it can just get it from the file buffer cache in RAM, a significant speed increase.
If the RAM is currently being taken up by unused android apps, then that leaves less room for the buffer cache, so in theory, by killing off unused android apps more quickly, that will allow the linux kernel to allocate more space for the buffer cache and thus speeding up the system.
Am I way off here?
Dave
cyanogen said:
Do you have any evidence to back this up? Yes this was a problem on older devices because many things would be fighting over the tiny amount of RAM.
You'll see lots of processes running but that's just the way Android works. Since it doesn't really benefit from simple caching like a normal linux system would, it just keeps everything running and kills unused stuff when memory is low. Most of the things you see running are either paused and using no CPU, or are services that would be periodically launched anyway.
http://developer.android.com/guide/topics/fundamentals.html#lcycles
Keeping these processes alive should actually be saving you battery rather than using it. It's more expensive to launch and restore the state of an application or service after being killed than it is to simply resume one that's been paused.
Click to expand...
Click to collapse
I would have to agree with Cyanogen on this one. When I first got my N1, I looked towards task killers to help alleviate slowdown, but in the end, I think it's just the placebo effect in a way; you did something to try to solve the problem, and so therefore you perceive a difference.
In other words, task killers aren't needed on this beast of a phone. As for battery life (if that's an issue), look into SetCpu.
Thanks for the reply Cyanogen. I think not using task-killer, or at least not killing the clock app got my alarm working this morning. But I use task-killer not for the purpose of saving ram, but for using less data. Some programs such as facebook or a twitter client would try to connect to the internet every once in a while. I'm on a low data limit plan in China. So I don't want those programs to eat up all my data. When I'm on wifi at home, I don't worry about that. Thanks again.
Same problem. Don't use taskkillers, flashed last CM last night and didn't wake up on time this morning - alarm didn't work, thought I checked that clock icon was on place on notification bar
amwayorlando said:
But I use task-killer not for the purpose of saving ram, but for using less data. Some programs such as facebook or a twitter client would try to connect to the internet every once in a while. I'm on a low data limit plan in China. So I don't want those programs to eat up all my data.
Click to expand...
Click to collapse
Have you thought about using something like APNDroid or Toggle Data, to just switch off the cell data when you don't want to use it?
Or, Modify the behavior of the applications you don't want using data?
I have my facebook and twitter for example set to manual update only (for battery saving purposes) because there's nothing there that is critical important info, and I don't need to be notified.
Nice thread though, I'm pretty sure I try to keep people informed that task-killers aren't needed and cause issues, everywhere where it comes up. I find humor that people will still argue, even with a developer, this fact. I've had 150+ hours uptime with no slowdown (and 30 apps running) on the stock rom (without highmem support).
bofslime said:
Or, Modify the behavior of the applications you don't want using data?
I have my facebook and twitter for example set to manual update only (for battery saving purposes) because there's nothing there that is critical important info, and I don't need to be notified.
Nice thread though, I'm pretty sure I try to keep people informed that task-killers aren't needed and cause issues, everywhere where it comes up. I find humor that people will still argue, even with a developer, this fact. I've had 150+ hours uptime with no slowdown (and 30 apps running) on the stock rom (without highmem support).
Click to expand...
Click to collapse
Then please inform us of a thread that can verify what you all are saying. Not in an argumentative tone, my linpack score drastically improves after 16 hours of uptime, and a task-killer.
Rom:CM 5.0.2 -OC Kernel
wesbalmer said:
Then please inform us of a thread that can verify what you all are saying. Not in an argumentative tone, my linpack score drastically improves after 16 hours of uptime, and a task-killer.
Rom:CM 5.0.2 -OC Kernel
Click to expand...
Click to collapse
This has basically been discussed into the ground. In my eye's, its a fight vs what I like to call "Windows XP mentality", and that there was benefit on phones like the G1. With the copious amounts of memory on the N1 and droid, they cause way more harm, and immeasurable good (if any).
Summary thread: http://forum.xda-developers.com/showthread.php?t=627836
I've linked to quotes from others.
Threads/posts of interest: http://forum.xda-developers.com/showthread.php?p=5494890#post5494890
And: http://forum.xda-developers.com/showthread.php?p=5298630#post5298630
Well, this discussion is very interesting, but lets return to our problem with non-working alarm.

This may help your battery life.

Today I had been experimenting with my battery life again and stumbled across this.
If you download advance task manager from the market. *NOTE* It is a paid application or *NOTE* This is illegal but you can download an .apk but again it is illegal and I am not encouraging you do it. *NOTE* You can purchase it and return it within 24 hours with your money back.
Step 1- Get advance task manager.
Step 2- Go into your home system and go into your default home or your home system.
Step 3- Now choose a screen in the home. Eg: 1,2,3 etc...
Step 4- Keep your finger tap'ed on the empty screen or somewhere empty in the screen. You can also just press the menu button and tap *ADD*.
Step 5- Choose widgets and find advance task manager.
Step 6- Now when you tap the widget icon, it will terminate all your applications.
Step 7- It will then direct you to a choice for your home application/s.
Step 8- You can just press lock and not choose your home and it will stay draining very little battery.
*Note* I do not guarantee this to work but it worked for me since I had my phone on the lock where I had a choice of home screen since 3:00 PM and it is now 6:00 PM...
3 hours and still full battery.
I have also previously managed to keep the battery up for 3 days and in the 3 days I was left with 15 percent battery.
I will post images if you people are having trouble *JUST PM ME OR POST BELOW IF YOU WANT IMAGES*
Appreciate the tip but since the inception of the Android OS this was one of the first and biggest tips amongst all of the community. It's nothing new. The Android OS actually does a damn good job of killing apps by itself. Unused RAM is useless RAM. It's a *nix based system.
The only time where this is good is when you have a stray app that's using CPU when it opens in the background when it shouldn't. Especially when it's keeping things awake. I only advise that you use this before locking the phone intentionally, and when you'd like it to go into a deep sleep.
I use task killers only when I'm putting my phone away for a while. Works better than when I used task killers. I'm also mindful about the apps I install and I uninstall and reinstall when need be, format my phone occasionally (I am an extremely heavy user) and defrag my SD card because of the heavy usage.
bongd said:
Appreciate the tip but since the inception of the Android OS this was one of the first and biggest tips amongst all of the community. It's nothing new. The Android OS actually does a damn good job of killing apps by itself. Unused RAM is useless RAM. It's a *nix based system.
The only time where this is good is when you have a stray app that's using CPU when it opens in the background when it shouldn't. Especially when it's keeping things awake. I only advise that you use this before locking the phone intentionally, and when you'd like it to go into a deep sleep.
I use task killers only when I'm putting my phone away for a while. Works better than when I used task killers. I'm also mindful about the apps I install and I uninstall and reinstall when need be, format my phone occasionally (I am an extremely heavy user) and defrag my SD card because of the heavy usage.
Click to expand...
Click to collapse
I agree but this worked for me and I recommend trying this. Also I agree with everything you have said and sometimes when I am out somewhere I tend to keep the phone in a deep sleep but I do not want to miss any calls or texts happening to me so I do this.
Appreciate what you have told me as well.
Also what good does formating do? (NOT SAYING IN AN OFFENSIVE MANNER, I AM JUST CURIOUS)
zm4 said:
I agree but this worked for me and I recommend trying this. Also I agree with everything you have said and sometimes when I am out somewhere I tend to keep the phone in a deep sleep but I do not want to miss any calls or texts happening to me so I do this.
Appreciate what you have told me as well.
Also what good does formating do? (NOT SAYING IN AN OFFENSIVE MANNER, I AM JUST CURIOUS)
Click to expand...
Click to collapse
Bongd is absolutely correct in what he says, the whole android system is designed to manage apps automatically, therefore while an app may appear on the task manager, they do not necessarily waste battery as they are sitting "idle"- that also means that an app will load up quicker when you go to open it, rather than if you kill the task.
Also my other point, and this is the big one, killing tasks can not only corrupt an app from working correctly but also it can cause instability to your system in the long run (because you are also killing certain tasks which are system processes) thus you notice bugs ion your phone and required to flash firmware again.
I've used advanced task manager and task panel side by side quite religiously for a while, yes it is faster and battery life does SLIGHTLY improve but trust me your phone doesn't like it.
Sent from my X10i using XDA App
zm4 said:
I agree but this worked for me and I recommend trying this. Also I agree with everything you have said and sometimes when I am out somewhere I tend to keep the phone in a deep sleep but I do not want to miss any calls or texts happening to me so I do this.
Appreciate what you have told me as well.
Also what good does formating do? (NOT SAYING IN AN OFFENSIVE MANNER, I AM JUST CURIOUS)
Click to expand...
Click to collapse
Formatting is good because just like a computer, things can get f***ed up for no reason. You can have all the correct settings but things don't happen as anticipated. It happens with any complex electronic devices, so this is why I recommend it every few months but this varies depending on how intensely you use your phone.
I use mine like crazy and tweak the hell out of it. I do it about once a month, but then again I have cell phone OCD.
The task manager helps to close apps that constantly keep connecting to the Internet, it's not about freeing up RAM it's about using the Internet connection
Some "apps" are some bad hogs when it comes to the phones recourses
Some "apps" are quite some hogs when it comes to the phones recourses.
Internet connection, Syncing, Updating ads and so on.
Some of these "bad hogs" also keep running "at full speed" in the background.
They have no whatsoever routines to save energy/recourses once loaded (background or not).
Designers of these "bad apps" don't care about battery-life, or they simply have no whatsoever knowledge/experience about mobile devices and how an application should behave on a such device.
If one are the kind who downloads lots of "cool" applications from the market, a task-killer can help allot, depending on how many "recourse hog" application one have installed and loaded in the background.
SysGhost said:
Some "apps" are quite some hogs when it comes to the phones recourses.
Internet connection, Syncing, Updating ads and so on.
Some of these "bad hogs" also keep running "at full speed" in the background.
They have no whatsoever routines to save energy/recourses once loaded (background or not).
Click to expand...
Click to collapse
yeah but we don't have any app that tells us which app is using the battery and data connections right? sure the android OS tells us the battery usage, but data?
A app to stay away from is eBay it hogs cpu time and constantly refreshes in the background, my batt goes from 2days down to 8ish hours when the eBay app is installed
Sent from my X10a using XDA App
tookieboy said:
yeah but we don't have any app that tells us which app is using the battery and data connections right? sure the android OS tells us the battery usage, but data?
Click to expand...
Click to collapse
System Panel can do this
Taskkiller stuff is not welcomed by my X10. When I kill all the apps , sometimes my connection to my operator goes down. I don't know how many necessary process' this taskkiller stuff kills as well.. I avoid "kill all" , instead I kill the ones that I'm sure that they're using internet and cpu in vain. Wish all the mobile developers use the close() method , then we won't be facing that kind of problems..

[Q] Porcesses that keep the phone up?

Hi, I am using watchDog to try to see what processes start while the phone is in sleep mode. But I cannot find anything on WatchDog that tells me what is consumming battery.
I hope I make it clear.
The situation is the following.
When the phone is sleeping, with no 3g or wifi, it takes around 10% in 8 hours. Just iddle. This happens at night. When sleeping.
As soon as I wake up, I turn on 3g. And the battery starts draining. I understand this is normal. But should the phone be awake all the time just by having 3g on?
The awake bar is almost full. Eventhough the phone is locked. This happens only when I turn 3g or wifi on.
That's basically my question. Sorry if it is misleading or something.
Regards
the phone will be awake if you installed some rogue app that connects to the net every 2 minutes to check something, or just some badly coded app.
So I should start uninstalling each app to see which is the one? Or can I use an application that will tell me that? Itried watchdog, but got no success.
Any ideas?
I've found eBuddy to keep my Awake bar completely solid... EVEN if I'm completely exited out of it. It has to do with the fact that like any other app, Gingerbread keeps a cached version of the process in the background. But in eBuddy's case, staying cached causes the phone to stay awake, so the only way to resolve this is to completely kill eBuddy and any of its cached processes.
That's why I still run ATK at 30 minute kill intervals. Getting great battery life. Here's my original post on this issue:
http://forum.xda-developers.com/showthread.php?t=1094666
almorsol said:
So I should start uninstalling each app to see which is the one? Or can I use an application that will tell me that? Itried watchdog, but got no success.
Any ideas?
Click to expand...
Click to collapse
You can start by going into settings -> applications -> running services
Tap the "menu" button and make sure you are looking at only "show services in use" as opposed to all services including cashed.
You will get a list of about 10-30 (depending on what you installed and how you configured the phone)
Then go to settings -> accounts and sync, and under "manage accounts", see what accounts you created that sync up with somehting. make sure the icons (round circles) are green only for the accounts you truly want to sync.
Also tap through each account you do want to sync and check the sync settings . If there is an account that is set to sync every 2 minutes, or is set to sync at an unreasonable short time, change that. There could also be a bunch of account you what to totally switch into "manual sync" mode, for example email addresses you do not care about.
cmd512 said:
I've found eBuddy to keep my Awake bar completely solid... EVEN if I'm completely exited out of it. It has to do with the fact that like any other app, Gingerbread keeps a cached version of the process in the background. But in eBuddy's case, staying cached causes the phone to stay awake, so the only way to resolve this is to completely kill eBuddy and any of its cached processes.
That's why I still run ATK at 30 minute kill intervals. Getting great battery life. Here's my original post on this issue:
http://forum.xda-developers.com/showthread.php?t=1094666
Click to expand...
Click to collapse
I will install ATK and follow your steps buddy. Will let you know how this worked for me.
Regards.
I will do the same. Thank you!
Have a query, What Auto Kill level should I set and what's the difference between Crazy-Aggressive-Safe? I atm at Agressive!
ithehappy said:
Have a query, What Auto Kill level should I set and what's the difference between Crazy-Aggressive-Safe? I atm at Agressive!
Click to expand...
Click to collapse
I do Crazy, 30 minutes, and Low level so that I can see all processes (including system level). I then run my phone as usual and add any/all system related processes to the ignore list.
Good luck, and hope it works for you as well.
I just made a test, and found that the app that makes my phone to be awake all the time is the MSN Talk Pro.
I disabled it, and everything went to normal.
Is this normal in IM apps, since the other person was having the issue with ebuddy?
How could I have the IM app running without having my phone awake all the time?
The task killer would definetly work, but then I would not be able to get msn messages.
Is this the only option?
Thank you.
almorsol said:
I just made a test, and found that the app that makes my phone to be awake all the time is the MSN Talk Pro.
I disabled it, and everything went to normal.
Is this normal in IM apps, since the other person was having the issue with ebuddy?
How could I have the IM app running without having my phone awake all the time?
The task killer would definetly work, but then I would not be able to get msn messages.
Is this the only option?
Thank you.
Click to expand...
Click to collapse
Let me try to explain the situation.
If you have an IM client and you want it to be ready to accept messages from your buddies, it has to be in "listening" state to "hear" from your buddies. How that "listening" state is implemented by the developer defines how much batt power the application is eating.
Two opposite example:
1) Some stupid developer coded the IM client to always stay in foreground on your phone, actively pinging the servers on the internet , asking the servers if you have new messages. Your battery is wasted big time man.
2) A smart developer coded the IM client to use Google's C2DM interface (Cloud to Device Messaging framework). Such an app will stay dormant on the phone, and will be woken up by the android core processes whenever a new message arrives for you - Google servers will wake up the app on your phone. Such an app will not waste battery much.
There are a number of variations that go in between (1) and (2) above. So there is no clear-cut good or bad app. All depends on the implementation, and also on the way you configure your phone and the app on it.
Latest version of eBuddy was supposed to use C2DM too.
Ad the new Trillian is using C2DM. I never tried any of these though, can't vouch for any.
Just keep trying various IM apps until you find one that does not stay awake.
cmd512 said:
I do Crazy, 30 minutes, and Low level so that I can see all processes (including system level). I then run my phone as usual and add any/all system related processes to the ignore list.
Good luck, and hope it works for you as well.
Click to expand...
Click to collapse
It has worked for me mate, worked well I should say. You deserve a Thanks mate.
I set it on Aggressive mode, with Auto kill at an interval of 1 hour, and NO apps but only my Power Schedule app in Ignore list, and I kept the Network On (Normally I use Flight Mode at night time), and after 9½ hours the battery drained just 2%, from 90% to 88%. Usually on Flight Mode I used to have a 3-4% drain overnight, so it's a big improvement.
BUT there are still two small but solid Awake bar present there while the Screen was off! What could be the reason? Is it because ATK was running and caused the Awake bar by itself or other apps? Take a look at the pic.
I have another query,
If I don't add any system apps (those come by default) to the Ignore list will there be any problem?
Regards.
kreoXDA said:
Let me try to explain the situation.
If you have an IM client and you want it to be ready to accept messages from your buddies, it has to be in "listening" state to "hear" from your buddies. How that "listening" state is implemented by the developer defines how much batt power the application is eating.
Two opposite example:
1) Some stupid developer coded the IM client to always stay in foreground on your phone, actively pinging the servers on the internet , asking the servers if you have new messages. Your battery is wasted big time man.
2) A smart developer coded the IM client to use Google's C2DM interface (Cloud to Device Messaging framework). Such an app will stay dormant on the phone, and will be woken up by the android core processes whenever a new message arrives for you - Google servers will wake up the app on your phone. Such an app will not waste battery much.
There are a number of variations that go in between (1) and (2) above. So there is no clear-cut good or bad app. All depends on the implementation, and also on the way you configure your phone and the app on it.
Latest version of eBuddy was supposed to use C2DM too.
Ad the new Trillian is using C2DM. I never tried any of these though, can't vouch for any.
Just keep trying various IM apps until you find one that does not stay awake.
Click to expand...
Click to collapse
Thanks man.
I will keep trying some of them. Starting with the ones you said.
almorsol said:
Hi, I am using watchDog to try to see what processes start while the phone is in sleep mode. But I cannot find anything on WatchDog that tells me what is consumming battery.
I hope I make it clear.
Regards
Click to expand...
Click to collapse
I have recently removed watchdog and noticed that battery consumption rapidly reduced...

Regarding Moto G's battery life and saving tips

My previously phone was just a low budget Xperia X8 but I was used to only have to charge it each 2/3 days with normal usage.
So, after buying the Moto G 2nd Gen and having to charge it twice a day in the first days of usage (heavy usage I must say), I started to try to find ways how I could optimize the battery of my new phone.
I started reading about how what changed with newer versions of Android, the issues lollipop has and the impact services and apps have on the battery life in current versions of Android with the technologies our phone has.
I started looking into tasker and many other apps, and thinking in rooting my phone to have even more control over the battery usage, but even without rooting, I manage to make it last 3 days with normal usage (more than 7 hours on screen time heavy usage).
At that time I was like "Great! Now I only have to charge it once every 3 days just like my old Xperia X8". But then it came to me, my smartphone wasn't actually that smart after all the tweaks I had to make to save its battery.
At that point I started to do lots of tests to check what's really draining the battery and after all those tests now I have a battery that lasts 2/3 days with normal usage while having a true smartphone!
This is what you should do:
Note: I have the model XT1068 and I'm using two sim cards with it, and you'll need the app tasker for a crucial step but you will NOT need root.
_______________________________________________________________________
WHAT YOU SHOULD DISABLE:​
- Disable "Ok Google" detection -> big battery drainer
- Disable the following apps:
Assist
Motorola Alert
Motorola Contextual Services
Motorola Migration
Motorola One Time Init
Motorola Notification
HP print service (you already have google cloud print service)
Motorola Init Services
Help
Motorola One Time Init
You should also disable all the google apps you don't want to use.
- Disable Wifi always on network search
- Disable Wifi every time you are not using it
- Disable Auto-Sync (you'll have auto-sync back in a more smart and efficient way using tasker)
- Disable Ambient Notifications (you already have the notification led to warn you about incoming notifications)
- Disable Audio Effects
- Temporarily enable auto-sync so you could manually disable all the apps you don't need to be synced (ex.: Google Plus, Drive, etc). Disable auto-sync after you are done with the changes.
- Disable all those reports being automatically sent (sorry developers, but that really adds up to the battery usage with multiple apps doing it)
_______________________________________________________________________
WHAT YOU SHOULD ENABLE TO KEEP YOUR PHONE SMART
(Unless you don't ever use it)​
- Enable Bluetooth (Bluetooth 4.0 consumes nearly 0 battery while not paired to a device, even paired it consumes little power with newer devices)
- Enable Mobile Data
- Enable location in high precision mode (it will activate GPS when an app needs it)
- Enable Auto- Brightness (adjust the brightness slider to 60% or less after that, the lower the better)
- Enable notification light
_______________________________________________________________________
SETTINGS AND TIPS​
- If you don't have a really strong 3g sinal switch to 2g mode
- Set the screen to go off after 30 second or 1 minute
- Use a magnetic flip cover so it automatically awakes your device and also automatically makes the screen go off when you close it
- Do not use apps known for their heavy impact on battery !VERY IMPORTANT! ( Use Chrome to access facebook, don't let your online messaging apps be always on, etc.)
- Don't use wifi with a bad signal, well, better said don't use any network with a low signal or else your battery will drain fast. Enable Air plain mode if your network signal is really low.
- Keep your internal storage with >600MB of free storage
- Use only simple methods of unlocking your phone (Don't use anything that uses location services, camera, microphone, etc.)
- Do not let apps being always on using network services like GPS (adjust the app setting so it only uses when you use the app)
- Get rid of any app you installed but don't need
_______________________________________________________________________
Tasker: Making your phone more efficient​
- Create a profile that goes on while you have AC power connected and when it goes on it enables Wi-fi and Auto-Sync, when it goes off it disables those features.
- Create another profile that repeats from the time you wake up until the average time you go to bed, and make it repeat every 2 or more hours (depends on your sync needs). What it should do is enable auto.sync, wait 3 minutes, then disable auto-sync
_______________________________________________________________________
Congratulations now you have a true smartphone with a good battery life!
​
I think I didn't forget about anything, but if I did I will edit this post.
Actually, disable any unused or unwanted app and install Greenify to force quit the rest of these apps you can't disable.
ksuuk said:
Actually, disable any unused or unwanted app and install Greenify to force quit the rest of these apps you can't disable.
Click to expand...
Click to collapse
For Greenify to work as intended you need to have root access on your device. For those with root access Greenify can be a great way to freeze apps you really need but are programmed to be always running in the background. Without root access Greenify to work automatically consumes a lot of battery because it needs to turn on your screen while the device is asleep.
I decided to not talk about root methods to keep this guide accessible to everyone
rbmaster said:
For Greenify to work as intended you need to have root access on your device. For those with root access Greenify can be a great way to freeze apps you really need but are programmed to be always running in the background. Without root access Greenify to work automatically consumes a lot of battery because it needs to turn on your screen while the device is asleep.
I decided to not talk about root methods to keep this guide accessible to everyone
Click to expand...
Click to collapse
ksuuk said:
Actually, disable any unused or unwanted app and install Greenify to force quit the rest of these apps you can't disable.
Click to expand...
Click to collapse
*Duplicate Thread*
The guide how to get the best possible battery life on your moto g deals with all this and goes into advanced and root methods to reduce battery consumption on your device
Sent from my Moto G XT1068 using Tapatalk
Duck86 said:
*Duplicate Thread*
The guide how to get the best possible battery life on your moto g deals with all this and goes into advanced and root methods to reduce battery consumption on your device
Sent from my Moto G XT1068 using Tapatalk
Click to expand...
Click to collapse
It's not a duplicate thread. In your guide the goal is to have the best battery life possible but for that it compromises a lot of the features that makes the phone smart, it compromises convenience of use for every 0.01% of battery life possible.
I read it and it's a well written guide but with a very different goal. The goal of this guide is to have a good battery life while having most of the smart features available.
Sorry, you have too much conflicting info in this guide. Having auto brightness enabled certainly doesn't make it a smart phone and definitely not set at 60%. Suggesting having data always on isn't always a good move, especially for those with limited data.
Sent from my GT-P5210 using Tapatalk
Tel864 said:
Sorry, you have too much conflicting info in this guide. Having auto brightness enabled certainly doesn't make it a smart phone and definitely not set at 60%. Suggesting having data always on isn't always a good move, especially for those with limited data.
Sent from my GT-P5210 using Tapatalk
Click to expand...
Click to collapse
Auto = automatically, that's a smart feature, it adjusts the brightness of the screen automatically. Nowadays, the way it is programmed makes it way more battery efficient than before. Adjusting it at a maximum of 60% is just a guideline, but 60% auto brightness is not 60% brightness., the value is just a guideline for the auto brightness algorithm.
About the data always on, having data on doesn't require that much extra power, it only drains more power IF some application requests data. While not the most efficient solution, in Android Lollipop there's no better way to keep feature like auto.sync on without having the data always on, unless you have root access. If you have root access you can set up tasker to automatically enable and disable mobile data when the phone tries to auto.sync and/or when the screen is on.
As I said previously, this is a guide for everyone, no root access required, and the goal is to have the phone with as many smart features on as possible while retaining a good enough battery life. You can have all those features on and still have a good battery life, is it worth to disable most of the features of our phones just to gain a little extra battery life? I mean, if you really want to make your phone's battery last weeks just turn it off ^^'. Now seriously, I have auto-sync for all the features I need, I have location services apps all running fine, I can pair my Bluetooth devices just by turning them on, I can simply open the gps app in my car and it will get signal without me doing anything else, I can take a picture and immediately send to someone over the internet without having to do anything else, and many many other features I have that I wouldn't if I just turned everything off to get a little extra battery. Not worth for me, I want a smartphone, I want to take it out of my pocket and having it ready to use.
Follow this guide and check the difference in battery life it makes, than tell me if it is not worth. Well, for certain profiles I can see it not being worth, I mean if you use your phone primarily for gaming or if you don't use almost any of the feature a smartphone has, I can totally see the point in having them turned off.
Edit: Forgot to talk about the limited data plans. I have a very limited data plan, 500MB per month but communication apps don't have a limit on my data plan (facebook, skype, what's app, snapshot, etc). I never used the 500MB of the mobile data, when wi fi is available I use it and only transfer large files over wifi, so as you can see even 500MB is enough to browse the web and sync my services. If you don't have a data plan or yours not enough for you then you have to choices: 1- Get a data plan suitable for your needs; 2- Disable Mobile Data. Back to the guide, there's people too with limited data plans in their home connections, using wifi, should I tell everyone to have wi fi always turned off because of those people?
If your data plan has limitations, that's something you have to take in mind but has nothing to do with the phone itself. If I have no money for a vehicle, I have to travel by foot, should I tell everyone to travel by foot? I hope you get my point and sorry for the wall of text.
rbmaster said:
It's not a duplicate thread. In your guide the goal is to have the best battery life possible but for that it compromises a lot of the features that makes the phone smart, it compromises convenience of use for every 0.01% of battery life possible.
I read it and it's a well written guide but with a very different goal. The goal of this guide is to have a good battery life while having most of the smart features available.
Click to expand...
Click to collapse
Dude, not trying to argue with you here, I'm just saying that everything you've mentioned here is also in my guide. People can pick and choose what they want from it.
rbmaster said:
I have auto-sync for all the features I need, I have location services apps all running fine, I can pair my Bluetooth devices just by turning them on, I can simply open the gps app in my car and it will get signal without me doing anything else, I can take a picture and immediately send to someone over the internet without having to do anything else, and many many other features I have that I wouldn't if I just turned everything off to get a little extra battery. Not worth for me, I want a smartphone, I want to take it out of my pocket and having it ready to use.
Click to expand...
Click to collapse
I can do everything you just said on my phone. I haven't sacrificed any smart capabilities, but I also get 3 days usage from my phone In fact, with tasker, I don't have to do any switching on or off. It does it all for me. That's the point of it, and why it is such a good battery saver.
Sent from my Moto G XT1068 using Tapatalk
Duck86 said:
Dude, not trying to argue with you here, I'm just saying that everything you've mentioned here is also in my guide. People can pick and choose what they want from it.
I can do everything you just said on my phone. I haven't sacrificed any smart capabilities, but I also get 3 days usage from my phone In fact, with tasker, I don't have to do any switching on or off. It does it all for me. That's the point of it, and why it is such a good battery saver.
Sent from my Moto G XT1068 using Tapatalk
Click to expand...
Click to collapse
Following your guide you get: No no bluetooth, no network connection during the night, no location services, no auto-brightness, no possibility to download files over wifi while the screen is off, etc. Of course people could read it and chose only what they want, but then they wouldn't be following your guide.
What I suggest in this guide is a very different approach from yours. In this guide, the goal is to have the most features on as possible, while having a good battery life. The goal of your guide is to have the maximum battery life while the phone is on while maintaining basic functionality.
Different approach, different goal, I don't see how this can be seen as a duplicate.
Edit: Oh, and to follow your guide there's the need to have root access.
rbmaster said:
Following your guide you get: No no bluetooth, no network connection during the night, no location services, no auto-brightness, no possibility to download files over wifi while the screen is off, etc. Of course people could read it and chose only what they want, but then they wouldn't be following your guide.
What I suggest in this guide is a very different approach from yours. In this guide, the goal is to have the most features on as possible, while having a good battery life. The goal of your guide is to have the maximum battery life while the phone is on while maintaining basic functionality.
Different approach, different goal, I don't see how this can be seen as a duplicate.
Edit: Oh, and to follow your guide there's the need to have root access.
Click to expand...
Click to collapse
Why do you need network services when you are asleep? Bluetooth is available whenever you want, just use tasker to automate it. Similarly, use tasker to automate location services. I clearly say in the guide that if you *need* auto brightness you can adjust it to your own specification using gravitybox. Its perfectly easy to download files when the screen is off, just change the the threshold in tasker. Admittedly, I didn't mention that, but If that's the only problem, I can add that into the tutorial
You don't need root access for all of the tutorial. I have a whole section devoted to basic ROM settings, which has everything you have in your op. Plus tasker and greenify sections that don't necessarily need root for everything.
But whatever, you know best.
Sent from my Moto G XT1068 using Tapatalk
Duck86 said:
Why do you need network services when you are asleep? Bluetooth is available whenever you want, just use tasker to automate it. Similarly, use tasker to automate location services. I clearly say in the guide that if you *need* auto brightness you can adjust it to your own specification using gravitybox. Its perfectly easy to download files when the screen is off, just change the the threshold in tasker. Admittedly, I didn't mention that, but If that's the only problem, I can add that into the tutorial
You don't need root access for all of the tutorial. I have a whole section devoted to basic ROM settings, which has everything you have in your op. Plus tasker and greenify sections that don't necessarily need root for everything.
But whatever, you know best.
Sent from my Moto G XT1068 using Tapatalk
Click to expand...
Click to collapse
I don't understand what's your point. You go into another thread (this thread) and start to make comparisons between your guide and this guide. They are two different guides and in no point I refer to your guide. This is just another guide, and the goal of the guide is clearly explained in the OP. This is not a contest to see who's guide is better as far as I know.
And I'll repeat one more time, to make more advanced automation tasks using tasker (like enabling and disabling network access) you need root access, specially in Android Lollipop. You also need root access for greenify and similar apps. This guide is for everyone, no root required for anything. People see it, and follow if they like. After following they check how their phone is performing. If it's performing to their expectations great, if not they will probably check other guides until they find something they like..
About Bluetooth, I suggest you to read first on how Bluetooth 4.0 works first before arguing about it. You can start here, in the good old Wikipedia: http://en.wikipedia.org/wiki/Bluetooth_low_energy
rbmaster said:
For Greenify to work as intended you need to have root access on your device. For those with root access Greenify can be a great way to freeze apps you really need but are programmed to be always running in the background. Without root access Greenify to work automatically consumes a lot of battery because it needs to turn on your screen while the device is asleep.
I decided to not talk about root methods to keep this guide accessible to everyone
Click to expand...
Click to collapse
I don't have rooted phone and I'm using manually Greenify & Greenify shortcut hibernate & lock to shut down apps, which sometimes automatically starts. As I don't play games, listen music and chat, phone is quite usable with this setup. With KitKat (I think most is the same with LolliPop) I made a list of the disabled apps:
android live wallpapers
aonlt
assist
audio effects
basic daydreams
bowsermessage
bubbles
chrome (using boat browser)
com.android.provider.partber
com.android.wallpaper.holospirit
com.motorola.mesh
com.motorola.multisimsettings
com.motorola.interfaceperm
com.qualcomm.qcom_qmi
configupdates
cqatest
devicemanagement
email (using profimail)
echange services
face unlock
fm radio
gallery (using quickpick)
gmail
google korean keyboard
google launcher config (using apex launcher)
google one time init
google partner setup
google play movies
google play kiosk
google play music
google play games
google play books
google hindy input
google keyboard (using multiling)
google voice
google pinyin input
goole ++
hangouts
help
hp print service plugin
html viewer
iwnn ime
iwnn keyboard
magic smoke wallpapers
market feedback agent
motorola alert
motorola boot services
motorola checkin
motorola contextual services
motorola migrate
motorola notification
motorola one time init
music visulaization wallpapers
oma client provisioning
phasebeam
photo screensavers
picasa uploader
cloudprinting
preset
print spooler
setupwizard
setup
talkback
trusted devices
youtube
I tried this guide and I can confirm that there's is a noticeable increase in battery life. My phone isn't rooted, and all my attempts to keep battery consumption as low as possible in the past resulted in having a phone by far less "smart" than it is now. Many thanks rbmaster .
I really couldn't follow that other guide there were too many applications it was too lengthy, this one really seems to the best, disabled everything I was told + going to download the app tasker.

Categories

Resources