yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] rewkim:
Just discovered LeanDroid (v3.0.1) and am thrilled that this exists. So far it seems to work fabulously at extending my battery life - I'm on a rooted G3 (4.4.2) - but I'm running into two small hiccups, and am not sure how to resolve them:

1. I have Bluetooth set to *not* turn off after the screen is turned off because I want to keep getting notifications on my Pebble, but I notice that when unlocking my phone after a period of time (say, 30 mins) there will be a notification from Pebble on my phone that reads "Connecting to Pebble..." Tapping on the notification sometimes takes me to the Pebble connection screen where I need to reconnect; additionally, my Pebble shows no connection to my phone and I have to re-establish a Bluetooth connection.

2. How frequently does "Periodically" mean for establishing WiFi or data connections? I thought I read that it was something like 20 mins, but I've definitely gone an hour without any new notifications, even though I know there *should* be notifications (e.g. I'm getting new e-mail on my desktop computer that don't come through until I unlock my phone after an hour).

Thoughts?

Thanks!

Andrew
[Android Apps and Games] Flyview:
So you gave Bluetooth completely unselected on the first page? Then it shouldn't be touching the Bluetooth connection. If you click the "periodically" button you'll be able to choose how often and for how long connections are restored in the background.
[Android Apps and Games] rewkim:
re: "periodically": I [idiotically] didn't realize that was a button that opened up new options. Thank you - that was an easy remedy.

As for the Bluetooth, I might try reinstalling LeanDroid, because even though Bluetooth is unselected, it's still dropping my Pebble. I'll let you know if a reinstall changes anything.

Thanks!
[Android Apps and Games] Flyview:
Did you figure it out? Can you make sure that with LD completely turned off or uninstalled that your Pebble stays connected?
[Android Apps and Games] Flyview:
I just lowered the price for LeanDroid. Enjoy!
[Android Apps and Games] ratbags:
Does it switch off Wi-Fi again if not connected within x seconds and switching on data? This would be a good option.
[Android Apps and Games] Wikzo:
What's the point of disabling wifi and/or data when you cannot toggle autosync? I installed the app in the hope of a more lightweight version of Deep Sleep Battery Saver, but I really don't get what this app provides when it cannot turn off autosync while in standby.

Even when I get it to disable data, I still receive mails instantly when phone is off (I checked by sending a mail to myself, and the LED on the phone lights up in a few seconds). When I turn phone on, I can see that wifi has correctly been disabled, but data shows a "H+" icon.

I am using the built-in root option in Cyanogen 12.1, if that makes any difference.

Am I missing something?

EDIT: Do I need to tick "Cellular network mode to ..." as well for the autosync to be disabled? I tried "2G", but then the app crashes. Using Moto G 2nd gen 4G (XT1072, thea) with Cyanogen 12.1.
[Android Apps and Games] fatspirit:
http://xdaforums.com/showpost.php?p=57802506&postcount=1081
[Android Apps and Games] Wikzo:
Oh. Can I have both root options installed at the same time? Will the newest SuperSU interfere with the built-in root access in CM 12.1 nigthly? (Sorry, I am new to CM)
[Android Apps and Games] Darke5tShad0w:
The CM root manager had always been a poor solution, I suggest to change to SuperSU.

There is an option in SuperSU to "respect cm root" but im not sure what it does and is its something you want to look into.
[Android Apps and Games] Flyview:
AutoSync will not work without internet. In fact the stock ROM doesn't even have a sync option except for email and twitter accounts for example, other apps can still use internet as they please. You should be fine with installing SuperSU on top of whatever CM comes with.
[Android Apps and Games] Sartre:
I have a feature request; change network mode to X when connected to wifi.

Example:

When connected to wifi -> network mode changes to 2G.

When disconnected -> network mode changes back to default.

Otherwise great app!
[Android Apps and Games] fatspirit:
It's kinda useless since cellular data is disabled when WiFi is OK, and more juice would be used just to switch modes back and forth.
[Android Apps and Games] Sartre:
It saves a lot of battery for me when using Wanam´s Smart Network with this feature as the 4G/3G is not that good in the areas I usually frequent when on wifi. So it´s not about the cellular data but the phone using less power keeping a good connection for calls.
[Android Apps and Games] mva1985:
This is the only battery saver I use anymore and i've tried many.

I find it to be efficient and well laid out and NOT complicated to setup.
[Android Apps and Games] ratbags:
I believe this would require xposed which the author has no desire to use.
[Android Apps and Games] Flyview:
No it doesn't require xposed, at least not on Lollipop. LD already does this, but is only triggered by screen off/on since LD is designed all around that.

Thanks!
[Android Apps and Games] LSH4:
Question

How does this compare to Deep Sleep Battery Saver? They seem very similar, and I just installed DS Battery Saver. Should I switch?
[Android Apps and Games] ratbags:
So....does leandroid actually turn off Wi-Fi with screen on if not connected within x seconds? Kind of like "better Wi-Fi on/off" app? If not, it should.
[Android Apps and Games] fatspirit:
Not as simple as that, but generally yes. Please read OP if you need some more details.
[Android Apps and Games] jobella:
WiFi and data not turning off when monitoring data transfer

On my rooted LG G3 running fairly stock T-Mobile 20e ROM 5.0.1 with Xposed the latest update 3.0.1 does not turn off WiFi /data /network mode when I enable the option to keep WiFi/data on if data is transferred at 3KBps. I even picked up the rate to 5KBs. I

I want to use the option because I didn't want to turn off WiFi if I was on a WiFi call or if I was uploading or downloading something with my screen off.

I don't know how the older Leandroid versions worked because I first used Leandroid with version 3.01.

I have an app to see data transfer speeds and I see my idle data transfer rate is well under 3KB/s (or even stopped) as expected but WiFi / data never turns off. Even after my phone sits off the charger all night WiFi never turns off. I checked my phone a few times at night and I know WiFi is on because as soon as I turn on my screen I have the WiFi calling symbol in the status bar and my battery drain is consistent with WiFi being on all night.

Does it need a solid 3KB/s rate or is one second per 10 minutes enough to stop WiFi from being turned off?

If I unselect the option to keep WiFi on without checking data transfer Leandroid turns off WiFi as expected.

I have the paid option.

I did not try whitelisting apps in Leandroid.

I tried using an Xposed module called Sma** Net*** instead of Leandroid to do basically the same thing that Leandroid does and that works fine. I can whitelist apps with that module. The Xposed module does not monitor data transfer rate but I can whitelist apps as I can do with Leandroid.

I want to use Leandroid instead of the other apps because of the data monitoring feature.

Thanks
[Android Apps and Games] Flyview:
That's strange. Did you recently change ROMs? Please email me teqtic at gmail and I can send you a debugging version so we can see exactly what's going on.
[Android Apps and Games] jobella:
I have been on the same Lollipop T-Mobile ROM. I just found out if I check the box under 'Switch' and fill in 2G -GSM, then it works fine (does what I want) because it switches off WiFi and switches me to 2G only. I assume just disable is good enough. Is it user error?
[Android Apps and Games] jobella:
Thanks for your quick help. It's working fine now. Maybe it didn't switch right because I had an earlier free version on there and I removed and replaced it with the paid version. Or, it may have been user error on my part or possibly some Tasker profile or other software I have that interfered with it. Either way, it turns off WiFi and mobile data without checking the 'switch' box as it should. If I check the 'switch' box it does switch me to 2G and back to LTE when my screen comes on again, as it should.

Again, thanks for your prompt help. It works fine!

Joe
[Android Apps and Games] fingret:
Some questions.

1. I have leandroid notification ON. When I reboot my phone, the notification is gone and I need to manually start leandroid to get the notification back. Is this the way it is supposed to be?

2. My phone is rooted but the SuperSU "apps" list is empty. Although the SuperSU log mentions LeanDroid several times. Also, when I click "LeanDroid" in the SuperSU log, SuperSU tells me "SuperSU Pro is required for this feature". Is this correct behaviour?
[Android Apps and Games] Bwangster12:
I saw some posts on it, but no clear info... does Pushbullet not work with Leandroid? Obviously with data going out, I'd imagine pushes or SMS mirroring wouldn't work... but is there any logical solutions here? Switching to 2G or 3G doesn't work on my LG G2 Verizon phone. It switches to those, but doesn't go back to 4G.
[Android Apps and Games] inzaghi89:
Why? I'm using leandroid and Pushbullet. All works well no issue. Ofc you need to disable ld when using Pushbullet or add exceptions.

Wytapane na Oposie za pomocą SwiftKey.
[Android Apps and Games] Flyview:
Both don't seem right. The notification should come back on by itself after a reboot, especially if LD wasn't paused. Are you using any sort of startup manager? Clear SuperSU and then try and tick off one of the root options, as long as you get the SuperSU dialog prompt to allow LD su access, it should be working.
[Android Apps and Games] Bwangster12:
What do you mean when using Pushbullet? If I have Pushbullet running on my phone and I randomly decide to Push something from my PC, won't that Push not come through because data is toggled off? Adding an exception for Pushbullet will cause data to never turn off, right?
[Android Apps and Games] Flyview:
I'm not too familiar with pushbullet but presumably yes you're right. You could set up an exception for your WiFi at home if you only really use it there. But then that would be giving up battery savings at home.
[Android Apps and Games] inzaghi89:
Yes, you're correct. There is no other way to use pushbullet with LD turned on. You need to set an exception for Pushbullet and... when it's open LD wouldn't disable network data, or add to monitor PB service, so internet wouldn't be disabled for always.

Personally I'm disabling LD manually when I'm sure to use PB at home.
[Android Apps and Games] Flyview:
If you don't select "detect background services", pushbullet would only cause LD to disconnect while pushbullet is in the foreground. If pushbullet uses a foreground service, that will also be considered foreground.
[Android Apps and Games] admuerte:
Dear Flyview, i have issue with LD, i have change rom on my OnePlus from CM12S to Temasek CM12.1. and now wifi does not turn on after phone is unlocked, i must delete LD, or reanable my wifi network. Maybe it is some issues with SuperSU or the rom? With CM12S worked fine.

Clearing cache does not helped.

Just tried one more thing: locking and unlocking phone solved issue, but i think i dont wanna do it everytime.
[Android Apps and Games] pianman:
Hi,

I am having the following issue: I have Gt-i9192 with baseband i9192DDUCOF2 and Cm12.1, with leandroid only wifi switch off function, data connection switch off doesn't function. I set stop data connection after 1 minute after screen off , but data switch off not function. I give root permission with cm12.1 app and not with supersu by Chinefire.

Update:I had install Supersu by Chinefire on cm12.1, and now leandroid works perfectly.
[Android Apps and Games] Flyview:
There you go, you need SuperSU.
[Android Apps and Games] Flyview:
Hi loyal LeanDroid users. I just noticed that on the latest version of Lollipop after the stagefright patch, app exceptions are no longer working correctly. It seems background or foreground services are not being detected. Can you guys please check your LD and report back? The way to check is to open the app exceptions list in LD and scroll through looking for "(running)" to appear beside apps that you know have services running. For me, only the most foreground activity (LeanDroid) shows as running.
[Android Apps and Games] Darke5tShad0w:
I am showing a few with running. Phoneleash and avast don't though and im sure they are ment to be. I'll posy some screen shots when i shift to my computer in a minute.

Im using an S3 with resurrection rom 5.5.3 which is based on cm 12.1
[Android Apps and Games] fatspirit:
New permission is now required: https://android.googlesource.com/platform/frameworks/base/+/aaa0fee
[Android Apps and Games] Flyview:
Beautiful, thanks a lot. Hadn't had much time to look into it. I'll try and put out an update tonight :)
[Android Apps and Games] Flyview:
Note the last part. Damn, this won't be that easy.
[Android Apps and Games] amjad03:
Great work bro. I used it for a day and really liked it and got the paid version.

I only have one suggestion. If able can you put an option to restore network mode to 3g/lte only when data connected instead of screen unlock.
[Android Apps and Games] Flyview:
Thanks. This would require some sort of design change for it to be clear to the user. Right now everything is centered around inactivity with the screen off, and then unlocking the phone again.

I can't believe they snuck in that ActivityManager permissions change into this latest 5.1.1 (number didn't even increase). Anyway looks like it's the same deal on M so it was coming. Kind of sad to see Android get more and more locked down over time.
[Android Apps and Games] Darke5tShad0w:
Now I think about it the last few times I have updated apps through the playstore and turned off the screen It had failed to update when I checked it next.

All makes sense now lol.
[Android Apps and Games] fatspirit:
Author of Quick System Info PRE made process fix almost in no time.
[Android Apps and Games] Flyview:
I fixed it too, had to change quite a bit. So this change was only committed in July? I believe it was working on 5.1.1 before the latest Stagefright patch. Anyone still running the pre-patch to confirm it was working?
[Android Apps and Games] Flyview:
Just published a new Beta:

3.0.2

-Fixed running app exceptions on latest Lollipop

-Fixed rare crash

-Updated Polish translations

It is now easier to be part of Beta testing, you no longer need to be part of the G+ group, you can simply follow this link:

https://play.google.com/apps/testing/com.teqtic.leandata
[Android Apps and Games] admuerte:
Flyview

Do you need translations to other languages of Your app. I can help with lithuanian language.
[Android Apps and Games] liver20:
last version dont see option to chage to 2g
[Android Apps and Games] Flyview:
Nothing has changed in regards to that. Are you sure you're not just on an Android version that isn't supported?
[Android Apps and Games] liver20:
Android 5.1.1 CM12.1 SultanXda
[Android Apps and Games] Flyview:
Right, CM isn't supported I don't think. Did it work recently?
[Android Apps and Games] Jimi Mack:
I thank you but I seem to resolve my issue by uninstalling, then doing a fresh install to version 1.22. The update from the Play Store may not have gone well.
[Android Apps and Games] Flyview:
Cool, thanks for the suggestions. The idea of multiple sample points is pretty good, as long as the time set by the user isn't already really short (like a minute).

P.S. Right now if it finds usage within the window, it will try again after the same interval of time.
[Android Apps and Games] cschmitt:
So maybe I should use an interval < 15 minutes for the initial check.

Overall, it seems to work pretty well. I'm mainly looking to shut off data at night without having to think about manually disabling it.
[Android Apps and Games] RobboW:
I'm set to cut connections after 7 minutes and enable them every 35 minutes to keep email up to date (work exchange email account and calendar), see how that goes. For me it's more to keep functionality and limit mobile data use when I'm not home than about battery savings. My phone goes fine for battery with all the mods and changes I made.
[Android Apps and Games] jayinc11:
Done-catlog sent to your email. Thanx for your time.
[Android Apps and Games] Terrez:
I have CM-11 (4.4.2), I'm sure it's because the services are killed in the background and do not return to relaunch.

I have been 8 hours since I installed 1.2.2 and it has not happened again, I'll keep you informed.

Regards
[Android Apps and Games] Torpin:
It just list all the app installed and listen to them. Then the user can choose app that won't let cut data connection when active.

It may be usefull with sports tracker, or music streaming.

But your app do the same with the option to cut data connection only when there is no activity.

It can be complementary with sports tracking apps or anything that use data and gps I think.
[Android Apps and Games] Flyview:
Yea there's no errors there. Search just for LeanData not LeanDataService and paste another screenshot. Looks like it's something in the Activity not the Service.

Thanks!
[Android Apps and Games] paul c:
Coming back to the "wifi turning on" issue (where the phone gets stuck turning on wifi, which can only be resolved via a reboot):

I ran a logcat whilst on wifi all last night to see if I could catch when the wifi gets stuck turning on - and wifi toggled obediently every 10 minutes, as per my settings (using LD 1.2.2)

I switched off logcat, and when I went back to my phone - still within the range of the wifi network - after about 30 minutes. It woke up to mobile data, but did not connect to wifi (on the quick settings tiles, it was listed as "wifi off", and going to settings/wifi I had the "turning wifi on" dialogue.

So the issue persists, I can't deduce exactly the circumstances which generate it, but my feelings are it's linked to how wifi reacts to trying to turn on within a certain sleep state (the recording of the logcat did not allow the phone to go to sleep)

Edit, could some form of debug logging be inserted into LD, to facilitate troubleshooting?
[Android Apps and Games] Flyview:
Interesting. It might be due to the phone sleeping before it gets a chance to fully enable/disable the WiFi during the turn off or sync events. I wake up the phone to do this and hold a wakelock until I call enable/disable but then I release the wakelock. I might have to wait and ensure it has enabled/disabled before releasing the wakelock. You would think WifiManager does this itself, but maybe not!
[Android Apps and Games] paul c:
If you want to send me experimental builds at any time, just pm me, I'll be pleased to help.
[Android Apps and Games] RobboW:
Is it possible something is trying to wake the phone to do an update? Something that likes to be on wifi when updating. For instance, a game or a GPS app. Things that could need a large amount of data, so prefer wifi.

The other thing that crosses my mind is antivirus? Do you use it? I have Wakelock Detector running to work out any apps that suck resources or wake it too much and suck the battery. I use Avast antivirus and it causes a LOT of wakelocks, I bet it also wants the net. I will keep the app due to me having a lot of email attached to the phone, but it wakes it as much as email, doing it's job of course. You can also get an app called Network Connections. It will list what has opened up a connection so could help give a clue to something. In my last peek at wakelock detector, LeanData was one of the top five wakelock instigators, so may not save as much battery as you'd expect, although for my purpose of trying to limit mobile data usage without crippling useability, I feel it should work pretty well.

I found that my wakelocks were basically all associated with email in some form. Email app, exchange service, antivirus. LeanData of course needs to wake it to enable the connection and sample etc, you can't avoid that. The big thing is to cut out apps that are really not necesary if you find them waking it too much for no apparent reason. One that annoys me is ebay. It has wakelocks logged, not too many to cause a problem but I have the settings for notification and recently viewed items turned off. It really shouldn't need to be waking the phone, so what's it doing :confused:

What about a kernel tweak causing some anomaly with it?

https://play.google.com/store/apps/details?id=com.uzumapps.wakelockdetector&hl=en

https://play.google.com/store/apps/details?id=com.antispycell.connmonitor&hl=en
[Android Apps and Games] Flyview:
I think there is a bug with the turn off and sync alarms. It may be taking more than double the amount of time you have set because it's getting re-set. Sigh, I have to be more careful with updates, but I'm trying to fix everything as quick as I can and make everything work!
[Android Apps and Games] WhiteEVO:
Flyview, you're doing a great job with this app! Thanks!
[Android Apps and Games] RobboW:
I was going to suggest maybe it should have stayed here in the thread rather than go on google play yet. Work out the kinks here. There's soooo many variables to try and account for and you may never get it perfect for all users.
[Android Apps and Games] paul c:
Really appreciate your efforts! Also, I find it strange nobody has commented yet on the icon, I think it's the best icon I've seen ;)
[Android Apps and Games] Flyview:
Heh, thanks but I may have to change it. I got it off a site and I believe it's free for non commercial use. I have to check.
[Android Apps and Games] jayinc11:
There's quite a bunch, here you go

Do you want me to email you the text file?

The main screen
[Android Apps and Games] Flyview:
Thanks. That looks to me like it is working. Are you causing the crash and then taking these? I'm not seeing any errors. The ActivityManager "process has died" is normal, it's the system killing LeanData once in a while.

If you are checking the logcat right after the crash, then try not searching for LeanData, but filter the log to Error level so it isn't full of other stuff.
[Android Apps and Games] Terrez:
Hello, the application terminates closing, there's no way to hold 24 hours
[Android Apps and Games] liver20:
Never used before.

Can be good like doze app that with screen OFF you choose that apps can be connected to Internet

Enviado desde mi A0001 mediante Tapatalk
[Android Apps and Games] Darke5tShad0w:
This option?

This screenshot is from Resurrection Remix, a CM12.1 rom.
[Android Apps and Games] liver20:
Ok my version is 3.0.0

Enviado desde mi A0001 mediante Tapatalk
[Android Apps and Games] Flyview:
Please let us know if it works after updating!
[Android Apps and Games] quincho54:
Hi flyview, I don't know if you fixed my problem with your last update or I fixed it the same day by checking some options out. I had a major problem with google play store not running. It worked only after clearing data and cache for one time. Afterwards no more chance to get it working till you clean data and cache again. So this morning I used your options for apps, ticking on the backround service option. And it works. But as I said, maybe you fixed it with the latest backup. Thank's anyway for your extraordinary job.
[Android Apps and Games] Flyview:
What do you mean Google Play store not running?