Tasker... prevent phone from deep sleep - Tasker Tips & Tricks

Everything I find is about people wanting to setup Tasker to make their phone deep sleep. I need mine to stay awake.
Phone: Samsung Galaxy S4 GT-I9505, on 5.1.1. CyanogenMod 12.1.
Issue: Using phone on work wifi to listen to music, wifi disconnects after 15 minutes (assuming due to the Android deep sleeping). Annoying that I have to reconnect so I don't use all my mobile data.....
Wanted solutions: A Tasker profile set up that when connected to work SSID, task will run to keep Android from deep sleep (battery will be hit hard but I can make it work), and phone will resume usual deep sleep once I leave work. I'm also open to hearing suggestions if you think deep sleep is NOT the cause.
Unwanted solutions: Apps like Stay Alive!, don't seem like they can be set to activate how and when I want. Prove me wrong though and I'll definitely be interested!
Other info: settings/wifi/advanced/keep WiFi on during sleep is set to ALWAYS. Doesn't seem to make a difference.
The only battery saver I have is Greenify, but I don't think that's causing the issue, yeah? My greenified apps are Messenger, Facebook, Google Play Music (not what I use for music, I use SoundCloud or the stock player), Adobe Acrobat, es file explorer, and Instagram.
My phone, obviously, is rooted. I also have Xposed.
Apparently Tasker used to have a display sleep setting, I don't have it in mine. And all I can do in Secure Settings from what I see, is the wifi sleep policy, which tells me that it's already set to never go to sleep...

just add your music app to not optimized…

loogielv said:
just add your music app to not optimized…
Click to expand...
Click to collapse
??? That doesn't really answer my question. The wifi connection drops every 15 minutes. While not a huge ordeal with a stock music player, it IS a big deal with SoundCloud (and Pandora, as I occasionally use, too).

Also, as the topic I posted in.... I'd prefer Tasker profile suggestions on how to do what I need it to do. Unless you say another potential reason you think is the cause, and why.
I'm open to build.prop editing as well IF you know what works.

androiduser1719 said:
Also, as the topic I posted in.... I'd prefer Tasker profile suggestions on how to do what I need it to do. Unless you say another potential reason you think is the cause, and why.
I'm open to build.prop editing as well IF you know what works.
Click to expand...
Click to collapse
I'm in a similar situation as yourself with Tidal app - did you ever find a working solution?

Related

[Q] Wlan/Wifi sleep control and booting question

Hello,
Here's too question : First, I've seen, in BetterBatteryStats i think, that you could see how long wifi has been on AND ALSO how long it was working (meaning receiving/sending). Cause the "wifi on" stat is always at 100% even though in advanced options i've set it to sleep after i put the device to sleep.
Second, at every boot in status bar i see "Currently checking media" but i don't understand that, since this is internal memory, and since the system has started already, why the hell it's doing this before loading everything? And also it takes at least 5-10seconds before it's starting doing it... All that take more than 20seconds...
Last thing, i saw in Android battery usage "Wifi sharing", what is that exactly?
Thanks!
In order:
The WiFi sleep seems to work intermittently. I stopped using that and use Llama to turn off my WiFi 1 minute after screen off. Tasker will be able to do this too, I believe. It works very well, and I can even set it not to turn off if certain apps are running, like Internet radio.
Media checking is something that happens. It is a good thing. It gets lists of all media files so you do not have to search when loading most apps. If charging while off, I normally leave the Note plugged in until all searches are done, and then another minute or two to reach 100% battery when I boot.
WiFi sharing is a leech on your battery, unless you happen to want to share your WiFi. It was one of the first items I blocked once I rooted the phone. You need Root to block, disable or remove this.
Thanks for all that, but there're things i don't get : 1/ Are you saying that "turn after screen's off option" is useless/defective? And why you tell me to use tasker (not free) if Llama (free) can do the job? 2/ Do not have to search what? And why telling you keep the note plugged 2min after Media Checking? 3/ Wifi Sharing app (the trouble maker) is not android tether function, right? If so, in which app does it share wifi? As said, i tried to freeze it with Titanium but it kept loading. I don't like Freeze with Anttek cause there's still an icon app in my Folder Organizer widget (which list all apps icon on a screen).
PS: I really wanna find back the app where was displyed the info i mentionned in 1st post (see when wifi's working and not just when it's on)
1. Yes, I think the WiFi sleep function is defective. Just my view. Llama does the job much better, which is why I suggest it. It does a great deal more too, which is also why I suggest it.
2. The media search operation is searching for all media. This is music, photos and videos (not sure what else, if anything). Once completed applications do not have to look at your SD card every time they open to search for media. This makes the apps faster and saves battery. Ignore the rest of what I said.
3. I do not know if WiFi sharing is the Tether function. It certainly seems like it could be. If it is frozen by Titanium it should not be starting. I have no idea why it does.

NetworkLocationLocator battery drain

hi everyone, recently i discovered huge battery drain on my note. when i fully charge it the battery drops from 100 to 80 percent in about 9 hours of standby. in order to find the culprit i installed better battery stats and let it run over night. i found out that something called networklocationlocator keeps my device from going into deep sleep (see attached screenshot).
does anyone know which app is behind this service? i think that its google now but i am not quite sure and dont want to uninstall it since its a really good app.
thanks in advance
Sent from my Note
probably when you go to settings and then location services, switch all off, switch back on only when you need it.
It would be interesting what is triggering your phone to seek location, could be a buggy app running silently updating every so often. I think the logs could tell you that. But not sure. I set location of in many apps in app settings cause I feel they dont need it.
I know that switching apps is buggy, It could be google maps running silently in background. Got to settings, apps running and stop those. Might need to stop as well in cached running.
I guess with root, and something like pdroid or lbe you can block apps requesting location services, also an option
Sent with a grin (^.^)
baz77 said:
probably when you go to settings and then location services, switch all off, switch back on only when you need it.
It would be interesting what is triggering your phone to seek location, could be a buggy app running silently updating every so often. I think the logs could tell you that. But not sure. I set location of in many apps in app settings cause I feel they dont need it.
I know that switching apps is buggy, It could be google maps running silently in background. Got to settings, apps running and stop those. Might need to stop as well in cached running.
I guess with root, and something like pdroid or lbe you can block apps requesting location services, also an option
Sent with a grin (^.^)
Click to expand...
Click to collapse
This is a 'bug' with google maps that has persisted for at least over a year now and it affects a lot of devices. Users have been complaining for the longest time and it seems like it's falling on deaf ears at google. It's a shame! There is NO acceptable 'fix' - turning off google locations services will get rid of this problem but again, as i said, that's not acceptable!
jknolls said:
This is a 'bug' with google maps that has persisted for at least over a year now and it affects a lot of devices. Users have been complaining for the longest time and it seems like it's falling on deaf ears at google. It's a shame! There is NO acceptable 'fix' - turning off google locations services will get rid of this problem but again, as i said, that's not acceptable!
Click to expand...
Click to collapse
I dont think its a bug affecting all roms. Nor that it has been there for over a year.

2 issues

I just noticed these issues today usage no different from the past weeks. 1st is I noticed battery drained really quickly with no indication. 2nd is music the equilizer would not work. Idk if the 2nd one deals with the whole ram management issue but it does come back and it's like it's turned half way down
Lots of threads in the forums re: battery drain. For me, my biggest hitters were (1) the stock email app sync and (2) wifi scanning.
I'd suggest going into stock email app settings if you use it and turn sync to manual long enouh to see if it has an impact and make sure your wifi's always allow scanning is unchecked. Then do some reading imto other causes people are niting.
oh, and android 101: shut off location when ur not using it.
Not sure about the EQ but I thought it only works with the stock music app.
jeff_roey said:
Lots of threads in the forums re: battery drain. For me, my biggest hitters were (1) the stock email app sync and (2) wifi scanning.
I'd suggest going into stock email app settings if you use it and turn sync to manual long enouh to see if it has an impact and make sure your wifi's always allow scanning is unchecked. Then do some reading imto other causes people are niting.
oh, and android 101: shut off location when ur not using it.
Not sure about the EQ but I thought it only works with the stock music app.
Click to expand...
Click to collapse
Also, use an automation app such as Tasker to control syncing, wifi, etc.
Yea it didn't die on me today which is good. Will try that tasker
My biggest battery drain was with Google wallet, specifically the NFC Tap & Pay. It's almost as if the Wallet app gets an exclusive hold on the NFC radio & doesn't let go... Finally had to just turn off the NFC radio & the battery drain is much better. .
I have a 300mbps DL and 20+ upload and a 5ghz modem. My s5 has no problem showing 100-200mbps on the speed test app, but my s6 is barely hitting 80mbps. But in real life situations its less then 1mbps. There will be long periods of time for Pandora to load the next song without skipping as well as overall growing the internet is slow. I'm outside my 14 days so I'm hoping its a bug. And that damned screen rotation issue.... My battery has been stellar. But I don't text much or make too many calls from it.

Widgets not updating

My widgets are very slow to update. It may take him a half hour or longer to update. I have checked battery optimization is not on for those apps, although one of those two apps that I have the problem with background data is grayed out. So I can't turn on allow background data. Not sure why that would be great out.
Any thoughts?
Wunderlist Task List.
DTG/GTD
But, I did some things poking around, don't remember for sure what all, but I had read that changing the Animation Scale etc to .5 would help. I did change that.
Before posting, I had found that Wunderlist was on battery optimization. Changing it didn't appear to help, so I posted. But now, it seems to be working. Maybe it's fixed. I'll post back in a day or two and indicate if it is still working or has stopped again.
Well, no, I'm not saying that. I'm just saying that's the only change I made, and at that point it had started working.
Are you having same problem, albeit different widgets?
FYI... mine is now not working again. I'm not surprised. But am frustrated.
Update...
I am finding that it does eventually update. It feels like the phone has been taken over by something. But, then, other things don't seem slow.
I just installed Gsam battery monitor, and ran the ADB cmds to try to identify apps using battery. Maybe I'll find something using a lot of battery and hence cycles.
My battery does seem to be going down quite a bit faster than it should.
It cleared up for a while after a factory reset,But it's back, and, I find that notifications from Lightflow come in 30 minutes after recieved.
It's like the phone is operating in molasses.
I'm beginning to think this phone is crap. If I switch back to my old Mate 9 it works fine.
jd14771 said:
certain apps aren't syncing well with pie. i had this same issue with Beautiful widgets, could not get the weather or time to update unless i manually updated it.
Under <Problem APP's> App Info > Battery
1.A Make sure the app is allowed background activity
1.B Make sure the app is not set to "optimized"
. (note: by default, the optimized list will only show apps that HAVEN'T been optimized, . you have to select "ALL" at the top to see all apps.)
Under <Problem APP's> App Info > Mobile Data
2.A Make sure "allow background data usage" is enabled.
2.B Make sure "allow app while data saver is on" if you have data saver enabled.
. (enable this if you want to be sure an app will receive background data.)
Click to expand...
Click to collapse
Thanks for the suggestions. I don't seem to be having any luck with that. Had already done those.
But!! ...
I just found a post after doing a global search for another issue I am having that seems to coincide with the widget issues, which is, Play Store freezing during updates. The post was in a Xaiomi forum. He said that he found if he had blue tooth on, his play store would constantly freeze. He turned off BT, and rebooted, and it worked.
I just did the same thing...and it is working...both the play store, and widget updates.
Interesting to have the great feeling of success, along with the frustration of a new (newly realized) issue yet remaining (BT).
Looking for a little further and through the settings on Bluetooth, I turned off Bluetooth scan. Now at first I would still have problems with Bluetooth on even though Bluetooth to scan was off. That of course would be very quickly after turning it on or off at cetera.
so this morning I get up having left Bluetooth on all night, with scan off, and everything's working fine. I did find last night that when I would first turn Bluetooth on even with skin off, the problems would be there. But of course when you first turn Bluetooth on it's going to scan anyway.
so I will update this thread little later after I see a little more about weather. Just having scan off actually cures the problem, in case someone else runs into this and it helps them.

Deactivate power saving

Maybe you guys can help me, because the P30 Pro is driving me nuts. How on earth do I get it to stop saving power?! If I wanted a phone that only does single tasking and isn't able to do anything in the background, I'd get a Nokia 3210.
For example: I'm listening to music in the car. Then I pause the music playback via my in car controls. After a few minutes I want to continue, so I press play. What happens? Nothing. The music app stopped running, because Huawei thought it is absolutely necessary to achieve 2 days of battery life. Here's a trick for you if you want to achieve that: Turn off the phone! I'd rather have half a day than something that is this useless. It gets worse. I use an app to warn me about speed cameras. Well, it doesn't work on the P30 Pro. Because even when I go to the settings and go to the app, then details about battery usage, and then tell it to continue running in the background... the app doesn't get any GPS information in the background. Which is bad enough to begin with. It NEEDS to run in the foreground. As soon as it is in the background... IF it even keeps running, because it usually doesn't, despite me telling it to... no GPS, no function. I'm also using a GPS Logger for my photography. Guess what: Doesn't work on the P30 Pro. Because the app just won't run in the background. I've even set the phone to the power mode. Jup, doesn't help.
What. The. Hell.
How can anyone live with this sort of insane "optimization"? If Huawei had ONE place where we can RELIABLY tell it which apps to keep running in the background, and maybe a setting where it just doesn't optimize at all, then great. But this...?
Edit:
Ok, so I did find ANOTHER setting, well hidden, under Apps, then Apps, then the three dots, special access, battery optimization, then select all apps. And THEN are you able to AGAIN tell it not to optimize. Why is this so hidden? And why aren't users, like, warned? Normally, you can reasonably expect your apps to run in the background. And you can rely on it. If the phone does not want to behave that way, tell me. Then I can say if I want this behavior or not.
Ok, some more testing, and... some apps just won't keep running in the background. They just won't. Any ideas? They work on other phones. I've never had a phone they didn't. But the P30 Pro... no chance. Screen goes off or I go to a different app... and goodbye.
you can read it here, its for mate20pro, but it works for p30 aswell
https://forum.xda-developers.com/mate-20-pro/themes/remove-powergenie-to-allow-background-t3890409
Cool, thank you.
I did try a bit further, and without changing anything else, it looks like after a couple of restarts and some more attempts of running the apps in the background, the phone is starting to behave. Still no final verdict, but it's getting better. If it's still too annoying, I'll try the Power Genie thing.
Disabling Power genie has finally fixed my Softphone problem. it finally keeps running in the background to receive my business numbers.

Categories

Resources