yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] Flyview:
Interesting. You send commands to Cerberus through SMS right?

Even if GPS is enabled, you can't really track it other than during that short sync window every 20 minutes like you said. Hmm now I can't remember if I re-enable location during sync windows or if it's only data connections.
[Android Apps and Games] romasik:
Yes Wifi enabled and data too. Why ? I think when wifi connected data must be off and network mode too not reswitch . This profit for battery!

Read you PM I send you translate LD on Russian! )
[Android Apps and Games] hyborian:
This might help too

https://www.google.com/amp/s/www.ad...d/disable-mobile-data-on-wifi-on-android/amp/
[Android Apps and Games] Depressed T.Bear:
Cerberus commands can be sent via SMS and/or via the internet from the web interface. I think commands via SMS are not 'all' and only basic functions.

No. When the track command is sent, cerberus starts to log exactly how and where the device is moving. But I'll only see it on the web interface once the device gets a data connection again to upload it.
[Android Apps and Games] Flyview:
I think you misunderstood what the option is for then. The option just delays data being re-enabled, it doesn't prevent it. Right now LD is set up to only mess with connections when the screen is off. I'll have to make a new section to affect connections while the screen is on. I was always hesitant to include this because I want LD to stay out of your way when you're actively using the phone. There is a stock Android option in the developer settings for if you want data connected while WiFi is connected.
[Android Apps and Games] Flyview:
New update up on Google Play and XDA Labs beta channel!

People with dual-SIM phones, please test data, cellular radio, and network type switching is working for both SIMs.

4.1.1 (2019.02.12) (BETA for now)

-Added multi-SIM support for disabling cell radios and changing network type [requires Phone permission]

-Fixed detection of services on Oreo+ (requires ROOT)

-“Except if active option” now checks instantaneous transfer rather than average

-Root not required for cell radio pre-5.0

-Don’t disable BT while in call, regardless of BT exceptions

-Check if WiFi requires login even if option not selected [in case they select it]

-Fixed app detection on some Android 5.0 builds

-Fixed not being able to pick values in Chinese translation

[-Split up exceptions into their own CardViews]

[-Fixed nextTurnOffAlarm not being saved during time exception]

[-Increase efficiency by not calling root methods before checking more obvious things like !inCall]

[-Moved except if active above wifi exceptions]

[-Changed “network mode” to “network type”]

[-Still schedule turn off alarm if tethering, just don’t disable connections, so that if tethering automatically disables itself, we still disable connections. Don’t need this for charging because we get notified when charging state changes]

[-Updated BillingManager to hopefully prevent null pointer exceptions (2019.02.12)]

[-Updated IABService to finish if billing error (2019.02.12)]
[Android Apps and Games] eliezerjk90:
Amazing support bro. Keep it up. However, I have a suggestion. Is it possible to have something like "app blacklist"? It's like LD will disable the data and/or wifi if the app is in foreground. I play some games and it's sometime annoying that I received notification in the middle of the game.
[Android Apps and Games] romasik:
I was wrong, the application does not work on oreo (Turns off to work. Enable data sometimes it starts up 1 times after a preset interval, sometimes not (. The application is added to the white list everywhere. Tasker works as expected. Beta not work properly too ((

upd: hmm, strange, if I plug in the charger, then everything works as expected (
[Android Apps and Games] Flyview:
New update out on Google Play and XDA Labs! Final changelog below, lots of bug fixes in this one!

4.1.1 (2019.02.13)

-Added multi-SIM support for toggling cell radios and changing network type (requires Phone permission)

-Fixed detection of services on Oreo+ (requires ROOT)

-Get around doze by using setAlarmClock

-Fixed sync duration being set to sync interval

-“Except if active option” now checks instantaneous transfer rather than average

-Don’t disable BT while in call, regardless of BT exceptions

-Fixed app detection on some Android 5.0 builds

-Fixed [not being able to pick values in] Chinese translation

[-Root not required for cell radio pre-5.0]

[-Check if WiFi requires login even if option not selected in case they select it]

[-Fixed alarm times not being saved when canceled]

[-Use wall clock time for time exception alarms]

[-Split up exceptions into their own CardViews]

[-Fixed nextTurnOffAlarm not being saved during time exception]

[-Increase efficiency by not calling root methods before checking more obvious things like !inCall]

[-Moved except if active above wifi exceptions]

[-Changed “network mode” to “network type”]

[-Still schedule turn off alarm if tethering, just don’t disable connections, so that if tethering automatically disables itself, we still disable connections. Don’t need this for charging because we get notified when charging state changes]

[-Updated BillingManager to hopefully prevent null pointer exceptions (2019.02.12)]

[-Updated IABService to finish if billing error (2019.02.12)]

Thanks! I mean yes anything is possible, but you can just turn on DND :)

Sounds like a battery saver issue to me (again). Is the notification being shown and not disappearing?
[Android Apps and Games] romasik:
I do not understand what kind of notification? no notifications. The application has been added to the energy saving exclusion list and to white list the power optimization list. Tasker works and leandroid does not(, only if plug charge.:(
[Android Apps and Games] Flyview:
LD should be showing a notification when enabled. It used to be optional but is no longer optional since Oreo. If the notification isn't showing, it means the service isn't running.
[Android Apps and Games] romasik:
Service running
[Android Apps and Games] Flyview:
Ok that's good. How are you testing if it works? What makes you think it isn't working?
[Android Apps and Games] romasik:
Does the program work when the screen goes off Data off, when the phone unlocks the data on. Inclusion does not work at the specified interval.
[Android Apps and Games] Flyview:
Yes that's how it works, but how are you testing it, step by step? Are you sure it's not running into any exceptions you've set?
[Android Apps and Games] romasik:
I not have message from viber then i use Leandroid. If i use Tasker via my profile i all work.
[Android Apps and Games] eliezerjk90:
Sure. But I thought it would be also useful to conserve battery while playing offline games. Anyway it's just a suggestion. I use tasker anyway so I just need to create a profile for that. :D
[Android Apps and Games] romasik:
Everything works, the problem was in my ROM, I set everything up again, now everything is ok. But the question! Why when Leandroid works, my phone does not go into deep doze, only light. When I use the tasker with my profile, the phone goes into a deep doze and when Leandroid does not go. If in Leandroid off checkbox on interval reconnect then go in to deep doze.
[Android Apps and Games] romasik:
This screen . Then i off LD and on Tasker with my profile (when screen off , off data and network mode to 2G. And reswith interval 10 min on 20sec)

View attachment 4706381
[Android Apps and Games] Flyview:
In the most recent update I made it wake up on time to toggle, sync, etc during doze by setting real alarm clock alarms in the system. I didn't know it would prevent doze overall, but I guess that makes sense. What app is that that you're using to track?

So this actually brings up a good question. Should we go back to the way it was? Here are the 2 scenarios:

1) Old way - LD is affected by Doze:

Once in doze, LD could be late by up to 15min to turn connections off or on. For example, waking up to sync, turning off after a "sync" period that should have only lasted 30 seconds, or waking up to restore connections for a time exception period.

2) New way (current) - LD is not affected by Doze, but phone never enters Doze overall (I guess b/c LD keeps waking it)

LD will toggle connections, sync, turn off connections exactly when expected and scheduled

3) I might have an idea for a different way altogether that allows Doze to happen, but would at least turn connections off on time after a sync period. Other wake up alarms LD uses would still be delayed, so for example it could still be late turning on connections for your time period exception.

I'd love your input on this guys!
[Android Apps and Games] Depressed T.Bear:
Device never enters Doze would be a total deal breaker imo. So I'd highly appreciate to fall either fall back to the old method - or try out your new idea.

---------- Post added at 02:30 AM ---------- Previous post was at 01:31 AM ----------

And BTW the app on the Screenshot should be GSam Battery Monitor ( https://play.google.com/store/apps/details?id=com.gsamlabs.bbm). Very nice app!

---------- Post added at 02:31 AM ---------- Previous post was at 02:30 AM ----------

And BTW the app on the Screenshot should be GSam Battery Monitor ( https://play.google.com/store/apps/details?id=com.gsamlabs.bbm). Very nice app!
[Android Apps and Games] hyborian:
I agree that it will be a deal breaker. Our battery monitoring apps will tag LD as a rogue app.
[Android Apps and Games] eliezerjk90:
Just curious. If we disable battery optimisation for LD (or any other apps), wouldn't it means that the app would not be affected by doze?
[Android Apps and Games] hyborian:
Currently, LD is the top app reported by my wakelock detector as waking up the cpu. Battery life still as usual for me, maybe because i use Naptime app with aggressive doze. Of course i have LD in the doze whitelist. Will observe a bit more.

This screenshot is from my mtk phone.
[Android Apps and Games] Flyview:
Yea, I'll be reverting that change and allow Doze to delay LeanDroid.

Nope, contrary to popular belief the "Battery optimization" list has nothing to do with Doze. It has to do with "App Standby" and network access. That's why LD reminds you about it when you use the "Disable WiFi except requires login" option. That option needs internet access.

Everything about Doze is explained well here:

https://developer.android.com/training/monitoring-device-state/doze-standby

How much time do the wakelocks add up to? It might have many wakelocks but they should be pretty short. They're needed to keep the phone awake during toggling of connections, etc.
[Android Apps and Games] Flyview:
If you're also running GSAM's battery monitoring (I remember now I used to as well), could you also confirm the current version is preventing Doze from kicking in?
[Android Apps and Games] Depressed T.Bear:
I just installed it again to check. Right now I'm actually not sure. According to GSam, the device enters 'light' doze, but never 'deep' doze.. Checking the Doze logs of Naptime however shows, that the device is not going to doze mode once Leandroid is active. :eek:
[Android Apps and Games] hyborian:
After further observation using gsam on a few phones, unrooted and not, doze does not go into deep sleep or zero doze with leandroid. Freezing or uninstalling LD brings back doze and deep sleep.
[Android Apps and Games] Flyview:
Awesome thanks for checking. I'm working on a new update that will be the best of both worlds. I spent most of yesterday playing with Doze to really understand what its effects are. Here's what I found:

During Doze, alarms are delayed "up to 15min". Testing with setExactAndAllowWhileIdle, I actually found it to fire about every 10min. If LD wants to turn off connections quickly (ex. after a short sync period), Doze could delay us turning off connections by up to 15min. setAlarmClock works to prevent this delay, but has the downside of ending Doze, and if set often enough, phone never enters Doze at all. It also shows the next alarm time icon and time, which some don't like.

Holding a wakelock alone during Doze didn't help fire a scheduled alarm on time, but I did discover that Doze doesn't prevent the phone from being awake and running code. So we can use a handler that runs whenever the phone is awake to check if the turn off alarm should have come by now, and then execute the alarm code manually. Holding a wakelock while we wait the short duration would ensure the device is awake to actually run the handler code but I found it isn't necessary because the phone seems to wake up plenty on its own anyway, even during Doze!.

This way, we ensure that connections are still toggled off quickly after a sync period during Doze, without holding any additional wakelocks, and still allowing Doze to delay other alarms like sync alarms, or on-going turn-off alarms with a longer duration (if a connection keeps running into an exception, we keep trying to turn off every turn off interval).
[Android Apps and Games] Depressed T.Bear:
Thanks for the information! Sounds good, can't wait to test it :)

One more little thing came to my mind. Would it be possible to implement a new exception for Wi-Fi? When I'm outside and unlock my phone, Wi-Fi gets activated. That's good, but I'd like to see an exception function which turns Wi-Fi off again if it doesn't connects to a (known) SSID within a customizable timeframe (let's say like 5 seconds). [at least I couldn't find it, if it's already there tell me where I can find it please :D ]
[Android Apps and Games] Flyview:
Maybe in the future. All the exceptions right now have to do with disabling once the screen is off. I didn't want LD getting in the way of anything once you actually unlock.
[Android Apps and Games] Flyview:
I have another question for you guys. I can set up LD to restore connections periodically for sync periods during Doze, but most notifications still won't come in because the device is still in Doze and apps don't have network access and their alarms aren't firing. Should I let the sync alarm be delayed by Doze to the point that it only fires during "maintenance windows", when apps are allowed network access? Keep in mind that some apps can still use FCM (Google's cloud messaging) to receive "high priority" messages while in Doze, which would be the only advantage of running LD's sync periods outside of Doze maintenance windows. Here's an example scenario I tested:

LD has disabled connections.

Phone enters Doze.

Someone sends you an email.

LD restores connections for 30s every 15min. Gmail doesn't update (Gmail doesn't use FCM?).

Maintenance window of Doze comes maybe an hour later. Data connections are probably not available unless LD's sync period happens to fall at the same time, so you still don't get the notification that you have new email.

If instead we let the sync periods be delayed until the maintenance window, LD would restore connections during the maintenance window, and everything would get updates. But this would mean the sync period might only happen once an hour or every couple hours depending on how deep your phone is dozing, instead of what you have it set to. I think I'm going to go for this strategy, it makes the most sense. I'll make LD's turn-on alarms for the general time exception and cell radio exception still fire during Doze however, because Doze doesn't affect phone calls coming in, so we want cell radio turning on on time, based on your time exceptions.
[Android Apps and Games] Depressed T.Bear:
Sounds good to me!
[Android Apps and Games] hyborian:
+1 here
[Android Apps and Games] Flyview:
Alright, new update is out on Google Play and XDA Labs! Please test and let me know what you guys think :)

4.1.2 (2019.02.20)

-Reverted back to not using setAlarmClock so Doze still happens

-Turn connections off quickly after sync during Doze

-Don’t check traffic if not set to toggle any data connections

-Fixed sync interval not being set properly until service restarted

-Fixed a NPE and a IOB exception

-Added free trial info to purchase options

-Reversed purchase options order

-Stopped using signalState for determining if cell radios are enabled
[Android Apps and Games] Depressed T.Bear:
Works good for me so far :) Doze is working as intended, as well as Leandroid.
[Android Apps and Games] hyborian:
So far, so good !
[Android Apps and Games] logicaldays:
I will try this one! Hopefully with this app my phone will last me more than half a day :)
[Android Apps and Games] Depressed T.Bear:
Welcome to the family, son!

It really saves a lot of juice :)
[Android Apps and Games] sonvegeta:
Thank you so much! like I said to you in the Play Store, i'm now only with my dear i9300, but los 15.1 is fresh for it. But, i'll do what I can to help you in the means I have.
[Android Apps and Games] Depressed T.Bear:
Hey Flyview, how's it going? :)

Just want to ask if you made any progress regarding the night mode. Don't worry, this is not an ETA question ;)

I'm just desperately waiting for it, because right now I always have to toggle airplane mode manually - I want to keep the setting for WiFi to not disconnect when connected to my home SSID. Unfortunately, Leandroid then keeps WiFi on the whole night.
[Android Apps and Games] hyborian:
I use a Macrodroid macro to do something like that when I unlock my phone. Check it out. Macrodroid is an app like Tasker but simpler to use.
[Android Apps and Games] Depressed T.Bear:
Thanks, I bought Tasker years ago, but honestly why should I run an additional app which will most likely consume more battery juice? :D
[Android Apps and Games] hyborian:
Well, YMMV, its battery usage for my use is negligible. I use macrodroid for so many other tasks - automated twrp backups, file maintenance, battery saving utilities, toggle font sizes and magnification from anywhere, airplane mode with wifi on, brightness/sync/rotate stuff, call shortcuts, etc.

I can use both LD and macro, no problem for me, even if they can share some functions.

Since you only want to use LD, that's fine too :)
[Android Apps and Games] xdarthanonx:
If you want it done at a specific time, you could try crond with am broadcast -a android.intent.action.AIRPLANE_MODE.
[Android Apps and Games] Depressed T.Bear:
Thanks, for the meantime I installed Tasker and made some profiles. Though, I'd still prefer to use leandroid only :P
[Android Apps and Games] Flyview:
Hey no sorry I haven't looked at that yet. Hmm so really you could just disable that exception, and set LD to not do anything during the day? Why do you not want it to disconnect from your home SSID?

New update up on Google Play (XDA Labs Manager seems to be down):

4.1.3 (2019.03.07)

-Toggle in separate thread again to prevent ANRs

-Minor bug fixes
[Android Apps and Games] Depressed T.Bear:
In my current situation, I'm jumping between the university and my home during the day.

So I'd like to keep LD on (while I'm outside). And while I'm home, I don't want to miss notifications, keep my VPN connected etc. That's why I'd like to keep it connected (here). :cowboy:
[Android Apps and Games] jaggillararla:
Have you considered to update the design a bit? A material ui?
[Android Apps and Games] Flyview:
Heh are the cards not material enough? I don't think it's very important since this is mainly a functional app.
[Android Apps and Games] Depressed T.Bear:
I think it's the same like RGB illumination inside our PCs, which gives us huge FPS improvements ;)
[Android Apps and Games] sizzlers:
Thank you, thank you very much guys , I was screaming for an app like that for years and now sudden scroll on xda and saw the article. You got a buyer here , finally app
[Android Apps and Games] StonebridgeGr:
is this app open source?
[Android Apps and Games] powerkid39:
Hi there, great app. I couldn't find a solution to my problem after searching this thread so I thought I should ask.

After granting superuser on magisk manager, I still can't tick/choose the options requiring root. It still shows warnings that the option is unchecked because it needs root. Tried restarting but still nothing

I'm on Stock Oreo 8.0 LG V30+ (H930DS) on Magisk 18.0

Thanks in advance!
[Android Apps and Games] sizzlers:
Should the connection switched off as soon the screen is off ? Or it takes some time. Also I have Naptime and Servicely installed as well , are they conflicting with each other and especially with leandroid
[Android Apps and Games] hyborian:
No, just don't turn on the setting for Wifi, mobile data, and location in Naptime. Of course, don't block Leandroid in Servicely, and Leandroid should be in the Doze whitelist - i.e. battery optimization off, autostart on
[Android Apps and Games] h4rd:
I have very big problem about my phone battery. Despite the changing of with new battery, its not give a chance of using long time. I hope its going to be my solution :)
[Android Apps and Games] sizzlers:
Is the service disabled when charging ?, cause I'm not seeing any switcheroo on the networks. Somehow the app worked once and can't figure it out what's happening . Removed Servicely and network options in Naptime and Samsung . Hmm

Using Samsung exynos s8 Hades ROM and Nx kernel .
[Android Apps and Games] popy2006:
Hey guys.

I have a question regarding BT.

Is there a way to accomplish the following with LD?

LD should disable BT when not in use

LD should activate it in an intervall, so nearby devices (ex. smartwatch) could connect

thx

pOpY
[Android Apps and Games] sizzlers:
I don't get it , why it doesn't work , haven't seen any WiFi or data icon switch off when screen is off . Do I need to wait some time for the app to work or? Rooted s8 exynoss, hades rom
[Android Apps and Games] popy2006:
Another question:

I have an Pebble (Bluetooth) & car head unit with BT and i want that my phone connect to the devices.

When i am running Leandroid with an time window of 60min and 60 sec on the watch and car did'nt connect when the dispay is off.

How do you handle this?

Did you use the "All Toggles -> except" time window for this?

Or just let bluetooth on and dont handle it with Leandroid?

Thank you

pOpY
[Android Apps and Games] sizzlers:
Sorry for my question earlier , i figured the issue out , it was my dumb mistake not watching that AFTER 10 mins it switch off the signals , so i payed for the app to make it on 0 and every penny is worth it . Never will have phone not rooted cause of you guys . THANK YOU
[Android Apps and Games] Flyview:
Thanks for the support!

Sorry no, it isn't. If it was, it would be completely free.

Have you tried restarting the phone after granting root, and then restarting LD? Hopefully you've got this figured out by now.

Glad you figured it out! Also, there is a disable exception option for not disabling while charging (disable exceptions page).

If your battery is really old, it might just be worn out. LD will make a difference but it might not be enough for you. How has it worked so far?

Yes, you can accomplish that by choosing to disable BT in LD, and having the periodic restore option turned on. Check the disable exceptions page for the exceptions you want to set, like to not disable BT if anything (or a specific device) is connected. I'm not sure what you're asking in the second part. Is it set to periodically restore connections every 60 min for 60 sec? That means that if LD has already disable connections and the screen remains off, it could take up to an hour for LD to restore connections and for BT to connect. If the phone starts dozing it could take longer.
[Android Apps and Games] popy2006:
Thanks for your support!

Yes you got my second question right.

I have tried the exceptions so BT will enable 60seconds every 60minutes.

Sadly my way to work is about ~30 Minutes -> you know thats an issue because most of he time it does'nt connect.

I know i could set it to an lower intervall, but than the battery saving effect is not so great.

Any chance to get better BT options/features like:

activate BT when call comes in, so the car stereo can connect and answering the call througth it

enable BT for some definable time when phone is moved after long idle phase (in the morning), so it could connect to the wearable (pebble...)

Keep up the great work

pOpY