yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] Depressed T.Bear:
Hi, how do I start? Please don't get me wrong Flyview! I was using GreenPower Premium since it's release, when the alternative Leandroid came alive, I was following it's development. I checked the price, which was round about 2.5€ as far as I remember, but since I had GreenPower - there was no need for me to switch... Now I upgraded my phone, it runs 8.1 and GreenPower isnt working as intended anymore, moreover, this app is 'dead' since years.

Now I wanted to check out Leandroid, but I saw that the price was nearly doubled! I read some bad reviews about the rising of the price...

I'm just curious, why did you do this?
[Android Apps and Games] sonvegeta:
Sorry for the time to reply!. In fact, I think Leandroid is the ONLY app that works on oreo, and with magisk, without any problems. I think you can be very proud for yourself, so continue with it, because this app is AWESOME, like all the other apps you make. If I can make a suggestion, a RAM management tool would be a very good product too.
[Android Apps and Games] Flyview:
Because I've put a lot of work into it and I think it's worth $3.99USD. The free version also works pretty well.

Thanks!

It looks like Oreo is the end of the road however. Unless new exploits are found, data disabling is broken on Android P as Google has heavily restricted "hidden APIs" and reflection that were never meant to be used.
[Android Apps and Games] sonvegeta:
Yes, I know. I also know that the code itself isn't finished. When it is we can see if we have a path to work. Until then, the path is truly like it is.
[Android Apps and Games] mrchaien:
is it really save battery? using greenify with my non rooted phone. note sure that greenify is useful or not. anyone else here can share your experience with this app? thanks in advance
[Android Apps and Games] dsg2003:
But there is not a magisk module for this app, right? You only use magisk as root solution?

---------- Post added at 07:32 AM ---------- Previous post was at 07:28 AM ----------

Yes, i would like to hear some experiences of some users, too.

Geenify is a nice app. But you cannot expect wonders from it. There are some apps like facebook or Vodafone app, that run in background and cause battery drain. And with greenifiy you can erreadicate this. But that is not very, very much.
[Android Apps and Games] Depressed T.Bear:
Thanks for the answer, I'm gonna buy it soon. I already tested the free version for a couple of days now, the only thing I'm missing is a location based WIFI setting, which worked great in GreenPower.

Facebook is known to keep running / restarting in the background all the time, at least if you dont have root with greenify. Unrooted users should use Island (also from oasisfeng, dev of greenify) to put those apps 'really' to sleep. It works great on unrooted phones and helps a lot concerning battery life.
[Android Apps and Games] TNCS:
No, strangely if I switch on the screen (not unlock), I can see no data, and data icon (H+, because it 3G without unlock) re-appear quickly in around 1-2sec. And if I unlock, the phone will change from H+ to 4G icon.

If I use fingerprint directly, I can see no data icon, and 4G icon will re-appear quickly also in around 1-2sec.

This is also noticed if I use desktop client like say example Whatsapp... I'll loose my Whatsapp after 10min...
[Android Apps and Games] Depressed T.Bear:
After some time of using, I really miss an option to automatically enter the airplane mode during the night.

Normally, I'd simply make it with tasker, but since there's no plug in and the sending of intents doesn't work, I always have to open Leandroid, stop it, enable airplane mode...

So I'd suggest to add either a night-mode which enters airplane mode - or a proper Tasker plug-in.

And maybe an option to turn off mobile data while connected to Wi-Fi would be nice too, to save even more battery.

How do you think about that?
[Android Apps and Games] Thaisa:
Version 4.0.1 works like a charm on my tablet. I haven't tried this version on my S5 Mini but I hope it works too.

Thanks for continue this project. [emoji6]
[Android Apps and Games] Therrm:
Hello guys,

Is there a way to give permissions to Leandroid to enable/disable data without root through ADB? I've purchased a new Samsung device and would like to avoid rooting it right away.

Thanks
[Android Apps and Games] djsolidsnake86:
not working on miui 10 based on android 8.1
[Android Apps and Games] djsolidsnake86:
On miui 10 based on 8.1 wifi doesnt go off if im in airplane mode with wifi on

Wky?
[Android Apps and Games] djsolidsnake86:
When will be fixed?
[Android Apps and Games] Flyview:
Unfortunately WiFi can't be toggled programmatically while in airplane mode.
[Android Apps and Games] eliezerjk90:
I just tried it out of curiosity with greenpower premium (I have their apk extracted since they disappeared from play store) and data toggling is still working. So maybe there's some other way to do it?

---------- Post added at 05:11 AM ---------- Previous post was at 05:08 AM ----------

Strangely, GreenPower Premium is also working for me on oreo and pie, both with magisk. Some features are unreliable anymore (apps black- and whitelist) but the core functions are working just fine. The thing is they are no longer available in play store, but luckily I backed up the apk before.
[Android Apps and Games] Flyview:
Interesting, the data toggling works in Pie? Actually not sure if I remember correctly but they still work for now, if the app isn't built for Pie. I'll check again, but this still means the targetSDK will have to stay on Oreo forever.
[Android Apps and Games] Flyview:
Good news, I've found a way to fix the data toggling on Android P. Keep a lookout for an update in the coming days as I update a few more things to get it ready.
[Android Apps and Games] Flyview:
You can just set LD to disable cellular radio (same thing as airplane mode if you have all the other connections also checked), EXCEPT during waking hours (exceptions page). Does this set up not work for you?

LD already disables data whether or not WiFi is connected, but only after some time with the screen off as usual. Right now all the toggles work on this cycle. There's also a stock Android setting somewhere in the developer settings about keeping data on while wifi is connected that you can use.
[Android Apps and Games] Flyview:
New update out on Google Play and XDA Labs!

4.1.0 (February 5, 2019)

-Fixed data toggling on Android P

-Updated purchase system

-Increased boot priority

-Updated About dialog style (spacing, date style, website link)

-Added animations

-Linked "Our other apps" to website

-Added Traditional Chinese translation (Thanks Adan!)

-Updated to latest Magisk libsu
[Android Apps and Games] hyborian:
Great app, thnx !
[Android Apps and Games] Flyview:
I have reduced the price for premium and subscriptions by up to 60%. If you were on the fence to upgrade, now's the time to do it!
[Android Apps and Games] djsolidsnake86:
The data toggling is fixed also on android oreo?

What about wifi fix when airplane mode is on?
[Android Apps and Games] hyborian:
Ouch, I bought it sometime back lol
[Android Apps and Games] Flyview:
Should be, but it was always working for me on Oreo, please let me know if it doesn't. I have already answered that it just isn't possible to toggle WiFi programmatically when airplane mode is on. This was a surprise to me too. I'll check if there's any workaround.

Email me if you want a refund.

Cheers guys, let's keep this app alive! Are there any other apps still out that can toggle these connections?
[Android Apps and Games] djsolidsnake86:
nope, on oreo if there is airplane mode on and only wifi is on, it will not go off.. please check it
[Android Apps and Games] hyborian:
No refund, it's an app I have on memory 24/7, systemized even. It's a great companion to Greenify which I use for hibernation, Naptime for aggressive doze, Servicely for wakelock control. Top 4 for me in battery savings apps.

I can create a macro using Macrodroid to toggle the connections, Naptime can toggle them off too when dozing, or some other apps that I don't remember, but it's the conditions that you have that are unique, like not turning off wifi if in a public place (e.g. Starbucks, McDonalds) where verification is needed to log in, etc.

I don't know about Tasker, no time to learn it.

---------- Post added at 08:32 PM ---------- Previous post was at 08:17 PM ----------

When screen is off, I would like to turn off cellular data too. I don't know if it is possible to have a feature where we can have a whitelist of apps that can turn on cellular data when needed ? Like Whatsapp which is the only app I need at the moment to be in a whitelist.

Currently, I never toggle off cellular data as I can't delay any whatsapp message. I never toggle radio off too as I cannot delay calls or sms/Textra too.

I do toggle off everything on a retired phone I only use for playing a game.
[Android Apps and Games] Flyview:
I don't think it has anything to do with Oreo. The methods for toggling WiFi just don't do anything if the phone is already in airplane mode. I'm not sure if this was always the case or if it started with Oreo.

How would the LD know when an app like WhatsApp "needs" data if data has been off? If you need constant connectivity you can't toggle it off. That's a shame because that's where most of the battery savings come from. The toggle cellular radio except if has signal is nice because then it will only turn it off if you're in an area with no reception (subway, deep inside a building), and where the phone would use a lot of power trying to find signal.
[Android Apps and Games] romasik:
Please add support two sim card swith to 2G, and add options swith to 2g and off mobile data when wifi connected for screen on!
[Android Apps and Games] djsolidsnake86:
i wanted mean that the problem is on oreo and pie, not on nougat
[Android Apps and Games] fernseher:
[MENTION=2584205]Flyview[/MENTION]

Thanks for continuing support for LD! LD and Kinscreen are in the top 5 of the apps I install first on every new mobile. BTW both in premium version :good:
[Android Apps and Games] hyborian:
Ok, noted. I'll look into that cellular radio toggle. Can cellular data be detected too if it has a weak signal, just like it does on cellular radio ?
[Android Apps and Games] hyborian:
Wi-Fi, Data, Network mode

What does Network Mode refer to ? Cellular data, cellular radio ? Sorry, confused a bit as there is no Network Mode option in front
[Android Apps and Games] Ihe87:
How to purchase without gapps installed?
[Android Apps and Games] Flyview:
Cellular radio and cellular data are the same thing when it comes to signal strength. Cellular data uses the cellular radio. So I'm not sure what you're asking.

Network mode refers to your preferred network mode (4G, 3G, 2G, etc). There is a "Switch network mode" option on the first page, if available. I thought I changed the title to just "Wifi, data" on the exceptions page if it wasn't available, I'll check.

Unfortunately the purchase system is built up using the Google Play billing library and I don't have another way of making and verifying purchases at this time.

Does anyone have a phone with multiple SIMs? I'm trying to implement support for multiple SIMs but have some questions. Can you set data enabled for either SIM or does it apply to both? Same question for the "preferred network mode".

Thanks!
[Android Apps and Games] djsolidsnake86:
Have you found something for this? On nougat was working, pie and oreo not
[Android Apps and Games] hyborian:
"Cellular data uses the cellular radio" - this answers my question, thanks

On my dual SIM cards, each sim card can have a data plan. However, the phones will use only one at a time, like I have to select which sim card will be used for data, and which one is preferred as default to make phone calls. One sim card can be used for both options, or split up between them. If phone calls/sms are received for either number, it will be received. The other sim that is not the default for making calls can be selected while calling if you want to use it.

Both my Sim cards are 4G+, but only one sim card can be selected at a time to be 4G+, and the other one will use the 3G network (2G is no longer available in my country). This is on my older phones. I have not installed an extra sim card on my newer phones, I think both can now be 4G+ at the same time.
[Android Apps and Games] Flyview:
Awesome thanks! And what happens with LD the way it is now? Does it always disable the same SIM's data or does it correctly choose the one you've chosen to use for data? What about switching network modes? Which SIM does it affect?
[Android Apps and Games] hyborian:
I don't know, I have not yet disabled data, I will try that. How will I know which one gets disabled ? Is there a log somewhere ?

Even if there are two sims, there is only 1 data active, and the phone's mobile data turn on/off works on that, irrespective of sim card selected.
[Android Apps and Games] Flyview:
Damn, then disabling of data should work just fine the way it is and I've spent the better part of today making it work for 2 SIMs at the same time. Still, I must be missing something. Why do people keep asking me to make it work for dual SIM?

Here's how to test:

Set it to disable only data.

Set it to disable 0min after screen off.

Remove all exceptions.

Turn screen off.

Wait 10s.

Turn screen on but don't unlock.

Check status bar/notification tray to see what happens.

Just to be perfectly clear, when you manually toggle data, it toggles it for the SIM you've selected to be the data SIM?

Try with either SIM "selected". The main question is, is LD toggling the correct SIM?
[Android Apps and Games] romasik:
This function not work on oreo, and data restore immediately please fix it. And possible add then wifi connected network mode to 2G.
[Android Apps and Games] hyborian:
I don't know why they ask that. When I toggle data, it toggles it for the data served by whichever sim was selected to use for data. It doesn't care which sim, all it knows is there is data to be toggled. There is no option to toggle for separate sims.

I checked 2 of my newer phones. The sim card for data must be selected.

Default Mobile data -select sim 1 or 2

Dual Sim 4G - enable or disable

Other one - same

These 2 phones are new, so both phones can have 4G active for both sims. On my older phones, 4g for one and 3g for the other, or vice versa, up to us to select.

I will do the tests later ...
[Android Apps and Games] hyborian:
Ok, this test may answer your question. Tested on my older phone.

Sim 1 is on the left, Sim 2 on the right

Status bar shows 2 networks:

4G+. 3G

Disabled only Cellular Data, result is :

4G+. 3G.

- nothing happened, Data is probably disabled in background. I will find a way to show whether Data is active or not in the lockscreen, but it won't tell anyway whether sim 1 or sim 2

Now, disabled Cellular Radio, and Cellular Data also gets disabled automatically, result is:

Blank 3G

Now, set data to be used by Sim 2, status bar shows below, showing the switch correctly.

3G 4G+

Disabled Cellular Radio, Cellular Data also automatically disabled. Result :

Blank 4G+

It stopped Sim 1, not Sim 2 which is for data.

*. Throughout this test, Sim 1 was the Sim card selected for calling. Maybe that is why disabling radio disables Sim 1, even if I switched who uses Data.

Now I will try a test where Sim 2 is now the Sim card for phone calls.

---------- Post added at 08:32 AM ---------- Previous post was at 08:03 AM ----------

Ok, now made Sim 2 the Sim card for calling. Disabling radio now turns it off correctly whether I switch who uses Data.

Disabling Cellular data alone does not do anything to 4g or 3g shown on the screen. 4g or 3g are affected by disabling radio though, and it disables whatever Sim card was selected for phone calls.

---------- Post added at 08:50 AM ---------- Previous post was at 08:32 AM ----------

Now, I allowed the quick settings tiles panel to be pulled down when I am on the lockscreen. This way I can pull it down immediately after screen on and see if the Mobile Data toggle changed or not.

I enabled mobile data, so the toggle in the quick settings tiles show it as active.

Disabled Cellular Data only ( not radio). Result is Mobile Data toggle shown as inactive after screen on. 4g 3g shown on screen untouched by toggling Cellular data on or off, only Cellular Radio toggle affects them.

So LD toggles Cellular data (mobile data) properly.

There is only 1 mobile data toggle on all my dual SIM phones. I don't know about other phones.
[Android Apps and Games] Depressed T.Bear:
OK that works as intended, thanks.

Here, I'm running into problems. Basically it works, but not the way I want / need it to.

At daytime, I don't want all connections to be turned off (Bluetooth and GPS for example). But, I want them to be disabled in the night (aka. Airplane mode) - and not be recovered when I just turn on the screen to see the time.

So currently, I'd have to change those settings everytime before I go to bed and when I wake up. Moreover, turning on the screen will result in turning on everything at night.

The easiest solution IMO would be to implement day and night modes, which work independently of each other. And ofc airplane mode for easier setup in the night mode.
[Android Apps and Games] TraianDr:
Useful app
[Android Apps and Games] hyborian:
Flyview, I was thinking more about it, I think the request for dual sim support is for the radio signal, not the cellular data, as only 1 data can be used at one time, which is logical. When we surf for example, it only uses the data of one, the other one's is unused. Dual-sim phones therefore have only one Mobile Data toggle in the settings or quick settings screen.

My Huawei phone has a clearer description under the Dual Sim settings. One has to select the sim card to be used for :

Default mobile data

Default calling SIM (for phone call and sms)

In the phone call or sms screens, we still have the option to use the other sim card's number for phone calling or sending sms; otherwise, the phone call or sms will be using the default sim card.

Lets' say we disable radio signal without any exception. Currently, when cellular radio is disabled by LD, it only disables the radio signal of the default sim card. The radio signal for the other sim is still active - i.e. it can still receive phone calls or sms.

I guess you have to figure out now how to disable the radio of the other one.
[Android Apps and Games] Flyview:
From the WifiManager.setWiFiEnabled method documentation:

* Enable or disable Wi-Fi.

*

* Note: This method will return false if wifi cannot be enabled (e.g., an incompatible mode

* where the user has enabled tethering or Airplane Mode).

It looks like the change came with Android 8, you're right: https://www.b4x.com/android/forum/threads/android-8-airplane-mode-and-wifi.100473/

This means we can't programmatically enable/disable WiFi while in Airplane Mode or tethering. Do you always keep Airplane Mode enabled on this device?

Are you sure WiFi was connected to a network when LD did it's disabling? I tested it and it's working for me.

Amazing thank you for the help. I wish I had one on hand to do my testing with, but I don't so I still need your help. Make sure you have restore "after screen unlocked" so you have as much time as you want to check things once you turn the screen on but don't unlock.

More questions

So based on your tests you can only select one SIM for data. Can you only select one SIM for voice/SMS? Can it be the same one you selected for data? EDIT: You answered this with your latest post.

Data toggling

On my Pixel 2, the status bar shows "LTE" over the signal triangle when data is enabled, and a little "x" when data is disabled. I guess in your case we can look at the manual toggle status to check whether data was disabled. Based on your tests I think LD is already capable of correctly turning off data for the correct SIM, and since only one SIM can be the data SIM, I don't have to worry about turning it off for both SIMs or restoring the correct state. That's good.

Cellular radio toggling

There's clearly 2 cell radios, one for each SIM. LD should be able to turn both off. What happens when you put the device into airplane mode? Do both SIMs become unavailable?

Cellular network mode toggling

Have you tried this option? Like cell radio, I think LD should be able to change the mode for both SIMs, and then restore them back to what they were originally.

OK I'll think about the best way to implement a "night mode" but it's a little difficult with how the settings are laid out right now. For now, you can use the restore after unlock instead of screen on if you don't want connections restored when you only turn the screen on (and don't unlock). How come you don't want BT and GPS disconnected during the day? You can set up exceptions so that they aren't disabled if they're in use. I'm not trying to change your habits just curious about your use case.
[Android Apps and Games] djsolidsnake86:
not always but when i'm at home yes, i keep only wifi enabled

when i go out i use cellular data
[Android Apps and Games] hyborian:
Cellular radio toggling

There's clearly 2 cell radios, one for each SIM. LD should be able to turn both off. What happens when you put the device into airplane mode? Do both SIMs become unavailable?

- In airplane mode, everything is turned off, and the airplane icon appears.

Cellular network mode toggling

Have you tried this option? Like cell radio, I think LD should be able to change the mode for both SIMs, and then restore them back to what they were originally.

- Ok, I tried it just now. LD changes the mode of the Default sim card for mobile data, Sim 1 for example. If I make Sim 2 the default for mobile data, LD changes the mode of Sim 2.

Yes, LD restores the original.

So this is the difference. Cell radio affects only the Default sim card for calling/sms, while network mode affects only the default sim card for mobile data.
[Android Apps and Games] romasik:
Yes i sure. Data enabled always 2-3 sec and connected. I think Data should not enable if for interval connected wifi! Or i am wrong? And possible add toggle for swith network mode then wifi connected?
[Android Apps and Games] Flyview:
Cool. Could you please email me so I could send you a test build once I'm done working on multiple SIM support for cell radio/network mode options?

Here's how it should work:

1) You have the screen on, WiFi and data are both on and connected.

2) You turn the screen off. LD disabled WiFi and data.

3) You turn the screen on/unlock. LD waits up to 15s for WiFi to get connected, before re-enabling data.

Are you seeing data re-enable right away, and then after some time WiFi connects?
[Android Apps and Games] Depressed T.Bear:
OK I'm looking forward for your implementation, if you need any help from my side (testing, ideas..) please let me know :)

Bluetooth is on in the daytime because of my smart band which gives me additional feedback about incoming messages, calls and so on.

GPS on the other hand is on because of my security app 'Cerberus Anti-Theft' (https://play.google.com/store/apps/details?id=com.lsdroid.cerberus). In case of any emergency or that my device gets stolen, I'd like to be able to track it. I used Greenpower Premium in the past which did a similar job as Leandroid and it had/has some kind of 'integration' with Cerberus. So if I send any commands to Cerberus, Greenpower automatically restored all connections and set itself to pause. That was incredibly good!

Since Leandroid doesn't have that feature, I just want to make sure that at least GPS is working (to see the track of my device) and once it gets online after 20 minutes, Cerberus is able to freeze Leandroid remotely and prevent it from cutting down internet access. Though, this method is still a little bit risky - but better than nothing! :)