yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] Flyview:
Hey, it's no bother at all, I welcome requests! I don't think I'll be doing number 1. b/c LD is designed around doing things in the background but restoring everything how it was after. I'll think about how I could do it though. As for number 2 it's long been on the request list and I will get to it soon, I've just been super busy. Cheers!
[Android Apps and Games] Flyview:
[MENTION=5366282]tenghc[/MENTION] Keep in mind too that the biggest battery savings come from turning off the internet completely. Adding in a WiFi exception for when you're at home will greatly reduce battery savings.
[Android Apps and Games] Flyview:
DELETED: Accidental double post.
[Android Apps and Games] tenghc:
Thanks for your concern [MENTION=2584205]Flyview[/MENTION]. While at home, I won't worry about the battery while at home because I can plug my phone to my charger anytime. Better than using Mobile data and toggling on/off wifi always that will use much more battery juice.
[Android Apps and Games] muniz_ri:
+1
[Android Apps and Games] BigMacca:
Hi All,

Since moving to CM12 (only a week or so ago), my highest wakelock is 'ConnectivityService'. which as far as I can tell Android trying to decide if it's going to use WiFi or Cellular data.

Does anyone else have this or have any idea's how to reduce it?

I don't remember it being an issue previously....

Cheers

Macca
[Android Apps and Games] Flyview:
Can you try with LD disabled for the same period of test time? What is your disable time set to?
[Android Apps and Games] KendrickOliver92:
How many hours it will last in my S4?
[Android Apps and Games] BigMacca:
Hi flyview, thanks for getting back to me.

The disable time is set to 2 minutes and the interval is set to 35 minutes (but off overnight).

I don't really use the phone that often, so it's not like I'm unlocking the screen to txt every 3 minutes.

I'll try running with lean droid disabled, but I suspect that it will go away as in pretty much always have a WiFi connection between home and work

Cheers

Macca
[Android Apps and Games] BigMacca:
Update.

I've had leandroid disabled for about 6 hours and I've had no more occurrences of the connectivityservice wakelock. WiFi had been enabled throughout.

I did a bit of testing and I can trigger the wakelock by disabling mobile data and then disabling WiFi. The connectivityservice then kicks off again for 30 seconds our so.....

Any ideas [MENTION=2584205]Flyview[/MENTION]?

Cheers

Macca
[Android Apps and Games] Flyview:
So the connectivity service kicks in when there's no internet whatsoever? Or does it kick in when you've re-enabled connections and it's looking to connect? How long is it holding a wakelock every time? I have seen an increased ConnectivityService wakelock as well, but I assume the savings from disabled internet outweigh the drain this wakelock causes. Some quantified testing would be good!
[Android Apps and Games] BigMacca:
Hi Flyview,

The wakelock starts when both WiFi and mobile data are disabled.

From the bit of testing I've done, it looks like the connectivityservice causes a 50-60 second wakelock every time you disable WiFi when mobile data is already disabled.....
[Android Apps and Games] Flyview:
That's nuts! What device / Android version? How are you testing so I can try the same?
[Android Apps and Games] BigMacca:
I'm on a OnePlus one running CM12S (stock os) which is based on 5.02.

I'm currently using AK's kernel, but had the same thing on stock as well.

Looks like someone else came to the same conclusion as me

http://xdaforums.com/moto-x/moto-x-qa/connectivityservice-wakelock-wifi-off-t2899450
[Android Apps and Games] Flyview:
Interesting. Based on the conclusions from that thread, it would seem it only happens when data is already off. Can you try and see if the wakelock is as bad if you first turn off WiFi, and then wait a few seconds and turn off data?
[Android Apps and Games] BigMacca:
I've just tested shutting WiFi off first then mobile data and we still get ConnectivityService hogging a 50-60 second wakelock.....
[Android Apps and Games] tenghc:
Is there any API to disable/enable leandroid? I wish to disable/enable it automatically using tasker. Thanks!
[Android Apps and Games] Flyview:
I'm going to test this all out myself. Can you tell me the exact steps you take and what you use to measure?

No, but people have been asking for that so I can put it in. I just have to expose a toggle intent right?
[Android Apps and Games] BigMacca:
No problems. I'm using betterbatterystats to track my wakelocks.

ensure both WiFi and mobile data are enabled

turn off mobile data

disable WiFi and then shut the screen off

wait for 90 seconds or so

unlock the screen and go and check your partial wakelocks in betterbatterystats. you should see connectivityservice in there.

repeat the test and watch the connectivityservice wake lock increase

You can switch the order of WiFi and mobile data disabling and still get the same result.

Cheers

Macca
[Android Apps and Games] tenghc:
Yes, It will be easier if there is an intent for toggling enable/disable.
[Android Apps and Games] DrZen:
Flyview, I just installed Leandroid after having replaced the dying battery in my Nexus 5. I noticed that Leandroid allows push notifications to come through, unlike one other app I tried before. So what function does Restore Periodically serve, if all my apps (Gmail, Facebook etc) are pushing notifications on arrival anyway? Thank you.
[Android Apps and Games] Lossyx:
Where can i translate this app? (Into Swedish)
[Android Apps and Games] Flyview:
Push notifications still require internet. The restore periodically will restore the connections as they were before being disabled for a brief time. That means the internet comes on for 60s every 20min or whatever, and then the push notifications would come through.

Send me an email at teqtic at gmail dot com. Thanks!
[Android Apps and Games] steelersmb:
I just rooted my Galaxy S6 and I don't think that Lean Droid is turning off data. Has anyone else tried this yet on the S6?
[Android Apps and Games] Flyview:
Are you using SuperSU?

Sent from my Nexus 5
[Android Apps and Games] DrZen:
Thanks for your response. On my Nexus 5 push notifications arrived instantly at all times (tested by sending me email, Pushbullet pushes etc) - no relevance to how long it had been since I turned off screen. I had Deep Battery Sleep installed (but turned off), so that may have interfered with Leandroid functioning. I uninstalled both apps, reinstalled Leandroid, and it is now working as it should (pushing only on turning on screen / periodically, not instantly).
[Android Apps and Games] Flyview:
Yea LD was likely not able to function before. I assume DSBS works kind of like Greenify, and would hibernate LD.
[Android Apps and Games] chaoscreater:
I don't use this app but I'm getting the same thing and like one of the users, I'm also using my OnePlus One 64GB. Getting the same connectivity wakelock.
[Android Apps and Games] Flyview:
I was going to try this and then I realized all of these advanced battery stats app need to install to the system partition. On my Nexus 5, there's only a few mB left on the system partition and filling it up will make the phone bootloop. I have to be careful, any idea how much space the latest version takes on the system partition?
[Android Apps and Games] BigMacca:
it's currently taking up 16mb on my phone
[Android Apps and Games] Flyview:
Do you have the latest version? I noticed in the changelog for the latest beta he said he reduced the size on the system partition again.
[Android Apps and Games] BigMacca:
I'm on 2.1.0.0 b2
[Android Apps and Games] Flyview:
Would you please try B3:

Changelog

2.1.0.0_B3

#693, 695: fixed crash on 2.3.x devices

#693: reverted back to "old" (small) system app apk to work around CM/LP 5.1.1 installation isuues

#696: fixed behavior of the "back" icon on older Android devices
[Android Apps and Games] BigMacca:
Done, now taking 12.8mb
[Android Apps and Games] inzaghi89:
I've one proposition for an app. At the moment when you pause LD for a while. Let say I need internet connection all the time. Clear all notifications - LD disappears too. IMO it shouldn't. It should stay there. Sometimes I forget about this and only way to bring LD back is search at menu and start it again.
[Android Apps and Games] Flyview:
I finally got around to running this test. Android 5.1.1, Nexus 5.

Results (wakelock of ConnectivityManager):

Data off, turn off WiFi, turn off screen: 50s

WiFi off, turn off data, turn off screen: 54s

That sucks, I don't know why it's holding a wakelock after connections are disabled, it's not like the connection dropped and it's waiting to reconnect, they were actually disabled. Still, I think if you are using LD to completely turn off the internet, the savings can be bigger than the drain from this wakelock. Just ensure you aren't periodically re-enabling very often and that your turn off time is longer than how often you tend to go back to your phone.
[Android Apps and Games] Yann_b:
Hello,

On my phone Xperia SP with CM12.1 , when the screen is off the connections is not enable periodically. The notifications for a new mail it's not displayed

Is it possible to see the log with logcat ?

Yann_b
[Android Apps and Games] Droidphilev:
Hi,

I did try to search the thread but had too many hits so hopefully you don't mind me asking:

i'm searching for an app that simply does:

connect to wifi > cell 2G

disconnect from wifi > cell 2G/3G or 2G/3G/LTE

Why i ask:

all the apps i have tried that claim to do this have the same problem: they don't switch when wifi (dis)connects (auto but switch when wifi is turned on/off (manually). The problem i face is not battery consumption but a nasty cellphone network at home. 3G has good signal but very bad quality. Since the signal is good the phone never goes to 2G as it thinks the signal is good.
[Android Apps and Games] tenghc:
You can use tasker as an alternative to switch to 2g when your Wi-Fi is connected. Just don't forget to use root when you enter the task.
[Android Apps and Games] Droidphilev:
Thank for this info. Isn't tasker not too heavy for a simple task like this?
[Android Apps and Games] tenghc:
If you use it for just 1 task, of course you will feel the heaviness. But if you can create more task, you can feel it's usefulness. It's the automation!
[Android Apps and Games] Droidphilev:
Thanks for the info. If there's need for me to do more automated stuff i can take a look :)
[Android Apps and Games] BigMacca:
Hi [MENTION=2584205]Flyview[/MENTION]

I've been running for the last few days with the connectivityservice wakekock disabled with no ill effects :)
[Android Apps and Games] Flyview:
Something must be killing/freezing LD. Are you using Greenify? Please post your settings in LD.

LD is based around the screen turning off/back on. It would be easy to add something like this in but hard to convey it around the current design of the app.

What? How did you get rid of the wakelock?
[Android Apps and Games] BigMacca:
You can use wakelock blocker if its built into your rom or you can simply amplify it.

I've had it disabled now for 3 days and haven't noticed any issues - Connections still switch from Wfi to Mobile data (and vice versa) without any issues.

So far, so good :)
[Android Apps and Games] Flyview:
A little teaser of 3.0.0.
[Android Apps and Games] trein91:
Is it possible to let non Lollipop users use the switch to 2g function too? Or does this require xposed? (Intelli3g has it, and uses exposed, but it seems to have some issues switching back to fast internet modes again afterwards)
[Android Apps and Games] Flyview:
Not really no. The method to do the switch is only available on Lollipop last I checked. I will try again.
[Android Apps and Games] Flyview:
3.0.0 - Beta 1 has been published to the Beta channel/group and should be available within about an hour!

Changelog:

-Added new disable exception: Except if specific services are running

-Added new disable exception: Except if connected to specific WiFi networks

-Fixed rare null pointer exception

-Only check for root on start if one of the root options is selected

-Minor layout improvements

-Added Vietnamese translation
[Android Apps and Games] Flyview:
I just made this change. It will be in 3.0.0 Beta2 or the official update, whichever comes first :)

I also found the bug that was causing network mode to sometimes not be restored (if service restarted).

EDIT: I need someone on CM12.1 to help me fix switch network mode for CM.

EDIT2: 3.0.0 - Beta 2 is up:

[-Fixed crash in Beta 1]

-Added new disable exception: Except if specific services are running

-Added new disable exception: Except if connected to specific WiFi networks

-Fixed preferred network mode not being restored if service restarted

-Do not allow dismissing of notification when LD paused

-Fixed rare null pointer exception

-Only check for root on start if one of the root options is selected

-Minor layout improvements

-Added Vietnamese translation

EDIT3: For the people who were asking about tasker integration to enable/disable LD, can you try with this intent? com.teqtic.leandata.INTENT_TOGGLE_SERVICE
[Android Apps and Games] xsbxhome:
Tnx 4 all, best app eva
[Android Apps and Games] trein91:
Yeah mate that intent works perfectly. It toggles leandroid on and off fine.
[Android Apps and Games] Yann_b:
Thank you, my problem is resolved, it was not linked to Leandroid

Yann_b
[Android Apps and Games] Flyview:
Anyone try the new options yet? I think I will publish to production soon. But I think I'll be changing to process exceptions instead of specific services.
[Android Apps and Games] muniz_ri:
Just requested access to the beta group. I will try out as soon as I can get the app.
[Android Apps and Games] JerryGNYC:
Specific WiFi networks appears to be working well for me on my GS4 (SPH-L720T). Thanks!
[Android Apps and Games] Flyview:
Just accepted everyone, you should have access now. Don't forget to hit the opt in link!
[Android Apps and Games] ratbags:
The xposed mod smart network allows switching of network modes on kit kat. I use it. In fact, I recently stopped using leandroid and I'm using smart network in conjunction with better WiFi on off!! I like the fact I can whitelist ssid's and switch network mode as mentioned.
[Android Apps and Games] muniz_ri:
I am not showing the option to whitelist an ssid. G900T running 5.0, OB1 deodexed.
[Android Apps and Games] Flyview:
Did you get the update to beta 3?
[Android Apps and Games] muniz_ri:
I did and just uninstalled and reinstalled but no change.
[Android Apps and Games] Flyview:
Can you post a screenshot of the disable exceptions page? Does the version name in Settings -> Apps -> LeanDroid show as "3.0.0 - Beta 3"?
[Android Apps and Games] muniz_ri:
Sorry about that, I see it now in the disable exceptions page. thx
[Android Apps and Games] Flyview:
Just pushed 3.0.0 - Beta 4 :)

You can now detect running apps with a secondary option "Detect background services" which will take into account background services from that app in addition to foreground app and "foreground" services".
[Android Apps and Games] Flyview:
3.0.0 is out for everyone! Let me know if there's any problems.
[Android Apps and Games] Yann_b:
I installed the latest version but I do not see the news options, why ?

Yann
[Android Apps and Games] trein91:
I know I've asked this before but. Any possibility of allowing non 5.0 lollipop versions to use the switch to 2g function as well?
[Android Apps and Games] Flyview:
Are you looking on the "Except" page?

It's not about allowing or not allowing, unfortunately if you don't see the option that means the app has failed to find the method this function depends on in your Android version / ROM.
[Android Apps and Games] Yann_b:
Where is the except page ?

I am use CM12.1

Yann
[Android Apps and Games] Flyview:
The disable exceptions page comes up when you click the "except ->" button on the first page.
[Android Apps and Games] Yann_b:
Thanks

Yann
[Android Apps and Games] Flyview:
How should I make this more obvious? I can't believe people miss this.
[Android Apps and Games] quincho54:
I think, you don't need to. I have seen it right away. If you want to do something, switch the color.

Head up, you did an extraordinary job. Your LD and Greenify combined is the perfect match for android.

Thanks a lot for aĺl your work.
[Android Apps and Games] Flyview:
Thanks! I built this for myself initially and it's just grown and grown :)

Does anyone running CM12.1 see the switch network mode function?
[Android Apps and Games] trein91:
Used cm 12.1 for a brief period. It didn't have that function.

Was hoping you would be able to bring the function to kitkat too. Since im also using intelli3g which depends on xposed to work. (but it has some weird drawbacks too)
[Android Apps and Games] ratbags:
Switch network can be done on kit kat via xposed. I use smart network for that purpose.
[Android Apps and Games] Flyview:
Sorry I'm not making this app use xposed. It's bad enough it needs root.
[Android Apps and Games] CoolPlayer:
Can this application change CPU frequency ?
[Android Apps and Games] fatspirit:
No. And AFAIK, it was never planned.
[Android Apps and Games] Flyview:
Yea that's best left for Kernel management apps.

Can someone running CM12.1 email me to test a new update? teqtic att gmail.com
[Android Apps and Games] AndrOmega:
Can this application enable or disable airplane mode ?

:confused:
[Android Apps and Games] inzaghi89:
AFAIR - it can't.
[Android Apps and Games] fatspirit:
You won't see an airplane icon, but since LD can switch all radios off, it would be practically the same.
[Android Apps and Games] Flyview:
Yes, except it's not called airplane mode.

^^

Exactly. Once WiFi/Cell radio/Bluetooth are turned off, that's the same as Airplane mode.
[Android Apps and Games] RushArt:
Just bought this nifty application. I wonder is it possible to add these functions, though:

1. Turn off account sync

2. Turn off all the managed data at pre-defined time (Night time)
[Android Apps and Games] inzaghi89:
At the moment it is possible to set period of time when ld shouldn't disable switches. So I think this works on opposite way ?

Account sync will be nice. But for me isn't needed.

Wytapane na Oposie za pomocą SwiftKey.
[Android Apps and Games] RushArt:
Ah, what I meant is I want it to shut down my Wi-Fi and Data connection at night. Like turn it off at 12 night and open it at 8 in morning. Even when I open my phone, the data is not turned on.

Yeah, not everybody is going to use account sync. But for people that use it, the option will be wonderful.
[Android Apps and Games] Flyview:
Like mentioned above, you can set this up with the exceptions. I.e. disable after 5min and restore periodically, except 12AM - 8AM. This would disable the connections normally during the day as well as at night, but it would only re-enable them periodically during the day and not at night. If you don't want them disabled at all during the day but only at night you could set it to disable except 8AM - 12AM (and set periodic re-enabling as you wish). Does that make sense?
[Android Apps and Games] belloni:
This is probably a dumb question but can I get some clarification please...?

I have android wear (bluetooth) on all the time, so if I select "switch" to 3g and except "bluetooth if connected" is ticked, does this mean it will ignore my request to switch to 3g when screen is off?
[Android Apps and Games] Flyview:
Hey, feel free to ask any questions, this is what the thread is for! The "except if Bluetooth is connected" only applies to disabling Bluetooth. Perhaps it isn't very clear, but there's exceptions specific to each connection type (indented), and then there's general exceptions below that. Having said that, let me know if LD is able to pick up your Android Wear BT connection. BT-LE connections are harder to detect than classic BT connections.
[Android Apps and Games] RushArt:
Actually what I meant to say is, I want it to turn off completely at the quiet hour. Like even when I turn on the screen at 12 at night, the data and Wi-Fi will stay turn off.

Oh, another question, is it possible to use LeanDroid with other lockscreen replacement? Like I don't want it to turn on data when I unlock my screen but I use ACDisplay as lockscreen (instead of Samsung stock).
[Android Apps and Games] Flyview:
Sorry no, everything that was on previously is restored once the screen is on/unlocked. Things would get a little too complicated if there were exceptions for that too. BTW it will only re-enable what it disabled itself, even if all options are checked. I.e. if data was already manually disabled when LD disables connections, it won't re-enable that on screen on. That's why it's called "Restore".

As for the lock screen, I'm not sure. Chances are ACDisplay doesn't tell the system it's "locked" and so my method to find if on the lock screen will probably show that the phone is already unlocked, rendering the screen on/screen unlocked option useless. Try it out and let me know!
[Android Apps and Games] matthewstate:
Is there anyway to upgrade to the premium version without google play? I've already bought the upgrade but I've decided not to go with gold play services on my phone at the moment.
[Android Apps and Games] Flyview:
Ah, sorry no unfortunately there is no other way right now.
[Android Apps and Games] RushArt:
Tried it, and the data turns on although it is just ACDisplay screen is on. It is possible to detect which app is on UI right now and set a whitelist so data won't turn on for 3rd party lockscreen?
[Android Apps and Games] Flyview:
Umm yup that's possible. Would have to add another option for the restore radio buttons.
[Android Apps and Games] RushArt:
That's really great to hear!
[Android Apps and Games] Flyview:
It'd be pretty tricky. It would be in the foreground when you turn the screen on, but then it would have to somehow detect that it has left the foreground, to signify the unlock. There would be nocallback for that, it would have to keep checking :/ It might be worth just adding some sort of support for ACDisplay specifically. I'll try and contact the dev.
[Android Apps and Games] Flyview:
I just pushed a new update to the beta channel, it will start to be available in about an hour so keep an eye out! Please let me know of any bugs here or in the beta group.

3.0.1

-Include system-installed apps in app exceptions

-Fixed network mode switching for CM12.1

-Don't disable network location if GPS in use

-Fixed conflict between disabling cell radio and switching network mode

-Fixed rare crash on some 4.2.x devices

-Fixed rare crash when determining signal strength

-Fixed crash when opening app with service disabled and no root

-A few minor fixes

-Updated translations
[Android Apps and Games] doroy:
Awesome! love your app :highfive:
[Android Apps and Games] Flyview:
I'm going to start posting the beta apk's here as well. Here's 3.0.1 - Beta 1.
[Android Apps and Games] Flyview:
People are saying they are losing the premium features with the new 3.0.1 Beta. Can anyone who's bought LD legitimately confirm please? I posted the apk above.
[Android Apps and Games] spanish33:
Premium features work. I got a message saying consider upgrading or purchasing or something to the effect after installing the beta but all the features work.
[Android Apps and Games] Flyview:
Thanks for the info! I'll take care of the small dialog bug.
[Android Apps and Games] inzaghi89:
I've the same. But after taping on 'buy' all features back and ld works as before. So I didn't mention it as a bug

Wytapane na Oposie za pomocą SwiftKey.
[Android Apps and Games] Flyview:
The new update has been released!

3.0.1

-Include system-installed apps in app exceptions

-Fixed network mode switching for CM12.1

-Don't disable network location if GPS in use

-Fixed conflict between disabling cell radio and switching network mode

-Fixed rare crash on some 4.2.x devices

-Fixed rare crash when determining signal strength

-Fixed crash when opening app with service disabled and no root

-A few minor fixes

-Updated translations