Hello, ive been trying to make an app that turns mobile data off if screen has been off for x minutes and turns data back on if screen comes on when data is off. Is that possible? I cannot seem to do it.
Thank you in advance!
Sent from my ADR6400L using Tapatalk
This might work:
1st Context, State: Screen off with the following tasks:
1. Variable set %SODATA = 1
2. Wait 30 mins
3. Mobile data = off IF %SODATA = 1
4. Variable set %MODATA = 0
2nd Context, State: Screen on
1. Variable set %SODATA = 0
2. Mobile data = on IF %MODATA = 0
Important
Screen off context must have a lower priority than Screen on context. Also, collision handling of Screen off context must be set to "Abort existing task".
Also, the Tasker userguide says
Mobile Data
Set mobile data status without affecting incoming calls.
This action has the disadvantage that Android may manipulate it internally when certain things happen e.g. wifi disconnected.
Note: this action requires that Mobile Data is intitially turned *on* in Android System Settings.
When Mobile Data is *off* in System Settings, this action will have no effect.
It has been reported that many Google apps reenable the setting.
Click to expand...
Click to collapse
So you might consider using APNdroid or JuiceDefender tasks instead of Mobile Data task.
P.S. I haven't tried this out (and can't at the moment). Just thought of this off the top of my head. So they might not work at all.
State screen off means event display off right?
Sent from my ADR6400L using Tapatalk
Yup, that's right.
Ok thank you but no, it didnt work
Sent from my ADR6400L using Tapatalk
Which part didn't work? Let's try to make this work
Lol well im not sure, i changed the delay to ten seconds to test it and the data never went off. Idk what about that didnt work because im an idiot at tasker but the data doesnt go off. lol
Sent from my ADR6400L using Tapatalk
How are you checking that data is off when the screen turns off?
How about try to change the event from display off/on to something else. Like headset plugged/unplugged.
Ok, ill try that when i get a chance.
Sent from my ADR6400L using Tapatalk
Did not work with headset plugged and unplugged either, data still not turning off
Sent from my ADR6400L using Tapatalk
If i leave the vaiables out it works perfect
Sent from my ADR6400L using Tapatalk
Hmm interesting. I placed the variables there as sort of a "safety net". I've been trying out the profile on tasker (finally got my phone back ) and got it working but I used APNdroid+Tasker because I couldn't get the data back on once it automatically disabled using the 'mobile data' task.
Glad to hear you got it working by yourself.
Thank you sobmuch for your help
Sent from my ADR6400L using Tapatalk
Is there a way to stop certain apps like facebook, bluetooth, and maps from running in the background? I turned sync off on fb but its still in background all the time. As for the other 2 i barely use them so its annoying that they r suckin up my battery life.
Sent from my SCH-I510 using XDA App
Uninstall Facebook. Either use m.facebook.com or an alternative app. The devs don't know how to code android.
Sent from my pocket-sized, Linux-based computer using electromagnetic radiation... and Tapatalk.
I just started using FriendCaster for FB and I like it much better than the official FB app. You can even get battery friendly C2DM notifications instead of the constant polling crap that FB does.
For Bluetooth...why not just turn it off when you aren't using it? Slide the notification shade and turn it off from there. And for maps, can you elaborate? If it isn't using location actively, then it probably isn't using much battery, if any. Just because it's showing as running doesn't mean it's actually using any cycles.
shrike1978 said:
I just started using FriendCaster for FB and I like it much better than the official FB app. You can even get battery friendly C2DM notifications instead of the constant polling crap that FB does.
For Bluetooth...why not just turn it off when you aren't using it? Slide the notification shade and turn it off from there. And for maps, can you elaborate? If it isn't using location actively, then it probably isn't using much battery, if any. Just because it's showing as running doesn't mean it's actually using any cycles.
Click to expand...
Click to collapse
I'll check into Friendcaster cuz I know FB app sucks up a lot of battery. As for bluetooth, it isnt on. I literally have never used it, yet when I look in my task manager (ES TM) it shows this "BrcmBluetoothServices" and if I kill it, it just turns back on. Same goes for Maps and FB. I dont know if Maps uses a lot of battery, I was just trying to figure out why its always running in the first place. All My location and GPS services (VZW, Google, and Standalone) are shut off to save battery, and I just turn google back on when I need to use the gps (which is rare).
cnoevl21 said:
Is there a way to stop certain apps like facebook, bluetooth, and maps from running in the background? I turned sync off on fb but its still in background all the time. As for the other 2 i barely use them so its annoying that they r suckin up my battery life.
Sent from my SCH-I510 using XDA App
Click to expand...
Click to collapse
That's the way Android is designed.... its supposed to stay in memory for faster retrieval. Remember, the phone uses the same amount of power with full or empty memory... why not have some things loaded into memory for faster performance? Facebook only uses data and battery for the split second its syncing... that's it. If you have Bluetooth toggled off the radio is not on and using zero power. The Bluetooth app you see running is a service.... it too uses no power.
Remember, Linux environments such as Android are designed to run with services in the background to make the phone operate faster.
Sent from my Galaxy Nexus using Tapatalk
das7982 said:
That's the way Android is designed.... its supposed to stay in memory for faster retrieval. Remember, the phone uses the same amount of power with full or empty memory... why not have some things loaded into memory for faster performance? Facebook only uses data and battery for the split second its syncing... that's it. If you have Bluetooth toggled off the radio is not on and using zero power. The Bluetooth app you see running is a service.... it too uses no power.
Remember, Linux environments such as Android are designed to run with services in the background to make the phone operate faster.
Sent from my Galaxy Nexus using Tapatalk
Click to expand...
Click to collapse
That's true, if you check on task manager, you will see tons of apps are running as services, but using 0% cpu power. Android will take as much as memory as possible and only kill the app when it really in need of memory. All the apps that fitted into the reserved memory(before the low memory threashold) will make the apps launch faster and take less amount of time from the cpu. This is very smart design.
das7982 said:
That's the way Android is designed.... its supposed to stay in memory for faster retrieval. Remember, the phone uses the same amount of power with full or empty memory... why not have some things loaded into memory for faster performance? Facebook only uses data and battery for the split second its syncing... that's it. If you have Bluetooth toggled off the radio is not on and using zero power. The Bluetooth app you see running is a service.... it too uses no power.
Remember, Linux environments such as Android are designed to run with services in the background to make the phone operate faster.
Sent from my Galaxy Nexus using Tapatalk
Click to expand...
Click to collapse
Although this is true, the Facebook app is very poorly coded. It still continues to use CPU time after you've closed it (proof is in the "nice" load and wakelock). It uses much more than should be required for syncing-the Gmail app barely uses any time. Programs that are still loaded on RAM after closing is fine as long as they don't use the CPU.
The Facebook app goes through CPU cycles like I go through women.
Sent from my SCH-I510 using xda premium
Sorry for bringing up an old thread.. use SystemCleanup if you have root.. most of your battery problems will be gone.. use with CAUTION.. make nandroid before use..
Does Advanced Task Killer drain my battery even if I'm not using autokill or killing any tasks at all? Like if I just leave it there, will it still drain.
And one important question as well, if a AOL's notification icon appears in the status bar, but I don't see it on the running services list, is the app still running in the background?
Does anyone have bad battery by using WidgetLocker or Weatherbug? I can't tell what is usingy battery
Sent from my LG-P999 using xda premium
NekoNyapii said:
Does Advanced Task Killer drain my battery even if I'm not using autokill or killing any tasks at all? Like if I just leave it there, will it still drain.
And one important question as well, if a AOL's notification icon appears in the status bar, but I don't see it on the running services list, is the app still running in the background?
Does anyone have bad battery by using WidgetLocker or Weatherbug? I can't tell what is usingy battery
Sent from my LG-P999 using xda premium
Click to expand...
Click to collapse
ok first, throw out ATK. the only reason you should use it is to kill a rogue app that has a bad memory leak, or is stuck in a race condition. and you can do this through the settings in any rom, so there is no need for an app.
Second, do you use an AOL app? if so then if it has an icon on the status bar then yes it is running and it has the ability to drain your battery. if its not showing up in the running services, then its not really running. its a neat trick where the app puts a notification in the bar then closes. and when you click it it reopens to where it was.
As for widgetlocker, i used it for a long time and if its setup right it shouldnt drain battery. it all depends on the widgets you have on both your lockscreen and your homescreen. widgets that use alot of battery will do so, while well written ones will not.
anyway, before i get too far off track. if you think a certian app is sucking your battery dry, use an application to freeze it, or just uninstall it and run the phone for a full charge cycle to see if it improves or stays the same. if it gets better, and you used the phone the same way, than that app is the culprit.
Klathmon said:
ok first, throw out ATK. the only reason you should use it is to kill a rogue app that has a bad memory leak, or is stuck in a race condition. and you can do this through the settings in any rom, so there is no need for an app.
Second, do you use an AOL app? if so then if it has an icon on the status bar then yes it is running and it has the ability to drain your battery. if its not showing up in the running services, then its not really running. its a neat trick where the app puts a notification in the bar then closes. and when you click it it reopens to where it was.
As for widgetlocker, i used it for a long time and if its setup right it shouldnt drain battery. it all depends on the widgets you have on both your lockscreen and your homescreen. widgets that use alot of battery will do so, while well written ones will not.
anyway, before i get too far off track. if you think a certian app is sucking your battery dry, use an application to freeze it, or just uninstall it and run the phone for a full charge cycle to see if it improves or stays the same. if it gets better, and you used the phone the same way, than that app is the culprit.
Click to expand...
Click to collapse
Oh sorry I didn't mean AOL app I meant like any app that has a notification icon on status bar. And do you know any good apps to monitor what is using the CPU or causing the battery drain?
And I know ATK is not really needed, but does it still drain battery if you don't use autokill or kill any tasks?
Sent from my LG-P999 using xda premium
NekoNyapii said:
Oh sorry I didn't mean AOL app I meant like any app that has a notification icon on status bar. And do you know any good apps to monitor what is using the CPU or causing the battery drain?
And I know ATK is not really needed, but does it still drain battery if you don't use autokill or kill any tasks?
Sent from my LG-P999 using xda premium
Click to expand...
Click to collapse
i couldnt tell you if it does or not, but if it does not have a service or process running then its not hurting anything.
as for monitoring cpu or battery drain. i use a program called "System Tuner Pro" it costs money, but it tells you what apps are using how much cpu time in seconds. Any app like that will help, but its not a perfect system, it just helps point you in the right direction.
Last Note, the developer of "System Tuner Pro" is a good friend of mine, so i might be bias in using it
Klathmon said:
i couldnt tell you if it does or not, but if it does not have a service or process running then its not hurting anything.
as for monitoring cpu or battery drain. i use a program called "System Tuner Pro" it costs money, but it tells you what apps are using how much cpu time in seconds. Any app like that will help, but its not a perfect system, it just helps point you in the right direction.
Last Note, the developer of "System Tuner Pro" is a good friend of mine, so i might be bias in using it
Click to expand...
Click to collapse
I just downloaded System Tuner Pro, its awesome. I have it on recording right now, hopefully it doesnt drain too much battery.
Sent from my LG-P999 using xda premium
While recording it will, buy it also will show you EVERYTHING that is happening on your phone
Sent from my LG-P999 using Tapatalk
Klathmon said:
While recording it will, buy it also will show you EVERYTHING that is happening on your phone
Sent from my LG-P999 using Tapatalk
Click to expand...
Click to collapse
Yeah I paid for the app. Do you know if the Maps app eats a lot of battery as well? Its always in the running services.
Sent from my LG-P999 using xda premium
There is a reason Maps is always running. When an app wants to get location data, it can call on GPS. GPS will return the distance from 3 (or more) satellites, various times, and latitude and longitude. This information is useless to the majority of apps that use it, so they will have to convert it to something useful (like nearby address or a city name).
Now, Google knew this, and instead of making each app that needs a city or address figure it out on its own (which would most likely be a slow, resource hungry process) Google made its Maps program open source. So now these apps can just make a call to the always running maps process and it returns an address, city name, nearby supermarkets, ect...
This app is also responsible for your phone being able to get a rough position without having GPS turned on, it gets WIFI data, Cell tower names, and various other things to figure out roughly where you are in the world. This lets apps like WeatherBug to get your city without ever using GPS.
So thats why its always running, and there is no need to try and kill it ever. Maps is a very well written program, and your better off just letting it do its thing. (if you try to fight it, it's probably going to win )
I do believe I have an answer to this. I found today that, after I finally sat down and finished rooting and flashing and installing and rebooting and updating and all the rest of the happy stuff that equals a much happier user, that ATK did infact drain my battery in an exponencial amount. Prior to that, it was ok. After running CM7, in about 2 hours it drained my battery almost to dead. Now, i work in radio shack, so I've had my phone on the charger and my battery was still dying. So in all haste, remove ATK!!!
jaywillsoul said:
I do believe I have an answer to this. I found today that, after I finally sat down and finished rooting and flashing and installing and rebooting and updating and all the rest of the happy stuff that equals a much happier user, that ATK did infact drain my battery in an exponencial amount. Prior to that, it was ok. After running CM7, in about 2 hours it drained my battery almost to dead. Now, i work in radio shack, so I've had my phone on the charger and my battery was still dying. So in all haste, remove ATK!!!
Click to expand...
Click to collapse
Also go here and read.
http://geekfor.me/faq/you-shouldnt-be-using-a-task-killer-with-android/
Klathmon said:
There is a reason Maps is always running. When an app wants to get location data, it can call on GPS. GPS will return the distance from 3 (or more) satellites, various times, and latitude and longitude. This information is useless to the majority of apps that use it, so they will have to convert it to something useful (like nearby address or a city name).
Now, Google knew this, and instead of making each app that needs a city or address figure it out on its own (which would most likely be a slow, resource hungry process) Google made its Maps program open source. So now these apps can just make a call to the always running maps process and it returns an address, city name, nearby supermarkets, ect...
This app is also responsible for your phone being able to get a rough position without having GPS turned on, it gets WIFI data, Cell tower names, and various other things to figure out roughly where you are in the world. This lets apps like WeatherBug to get your city without ever using GPS.
So thats why its always running, and there is no need to try and kill it ever. Maps is a very well written program, and your better off just letting it do its thing. (if you try to fight it, it's probably going to win )
Click to expand...
Click to collapse
I used system tuner to prevent maps from starting up and it doesnt show up in running services anymore. It seems like my battery is a lot better this way.
The only time I really use maps is for gps. I use gps, maps turns on and then when I turn gps off, maps doesnt run in the background anymore. That's the only reason why im keeping system tuner I have no other need for location service.
Sent from my LG-P999 using xda premium
And plus I don't see why Maps always needs to be running. When I need it for location services, then it could just start up then, no need to always keep it running, I really do believe it drains a lot of my battery.
Sent from my LG-P999 using xda premium
I'm looking for someway to lessen/ prevent Maps location sync service from waking up my phone every few seconds. I've tried turning off the location update with in the app and a good deal if the settings in Google now. Its killed a third of my battery according to better battery stats. Any suggestions would be appreciated.
I'm on the ns4g sprint ota jb with thalamus' latest with idle 2 disabled.
Sent from my Nexus S 4G using xda app-developers app
uncle_seuss said:
I'm looking for someway to lessen/ prevent Maps location sync service from waking up my phone every few seconds. I've tried turning off the location update with in the app and a good deal if the settings in Google now. Its killed a third of my battery according to better battery stats. Any suggestions would be appreciated.
I'm on the ns4g sprint ota jb with thalamus' latest with idle 2 disabled.
Sent from my Nexus S 4G using xda app-developers app
Click to expand...
Click to collapse
Disable Location service in Latitude
Disable location in phone settings, both GPS + celltower
Using an app such as Autostarts or Gemini app manager, disable all starting events
That fixed it for me, forever. Never get any wake up anymore.
I'll try the Gemini and let you know
Sent from my Nexus S 4G using xda app-developers app
Is there a way so that when the battery dips below a certain threshold the phone can automatically disable things like Bluetooth or GPS to save battery? Is something like this built into JB (I'm on CM 10) or is there an adequate app for this functionality?
Hmm...I think there is. Try going to settings, profiles, and change up or play around with the default/home/work... settings. You can toggle WiFi, mobile data, Bluetooth... Etc
Sent from my HTC Sensation using xda app-developers app
Tasker (app) does it. I think Llama does also and is free.