I'm on CM13 Android 6.0. How can I make Tasker turn 3G on when certain app is open and turn off when certain app isn't open, unless that I turn 3G on? I already tried Secure Settings (don't know if I tried the right option) and Toggle Data 5.0, which gave me the "Can't toggle mobile data. Is your device rooted? Error -2: Command "service" not found" error.
EDIT: Solved, just changed SELinux to permissive.
Related
For past few weeks, the Wi-Fi & Data in my rooted LG L90 with Kitkat 4.4.2 gets automatically enabled. Earlier, when I disable these it stays disabled till I go and enable it.
I tried to restrict background data, turned off my Wi-Fi router at home, for data I created a new Access point in Mobile network and disabled auto sync, nothing worked.
I even tried applications like AutoData and others and these were of no use.
Please help me to disable Wi-Fi and Data permanently and it should be turned on only when I enable it.
santo21 said:
For past few weeks, the Wi-Fi & Data in my rooted LG L90 with Kitkat 4.4.2 gets automatically enabled. Earlier, when I disable these it stays disabled till I go and enable it.
I tried to restrict background data, turned off my Wi-Fi router at home, for data I created a new Access point in Mobile network and disabled auto sync, nothing worked.
I even tried applications like AutoData and others and these were of no use.
Please help me to disable Wi-Fi and Data permanently and it should be turned on only when I enable it.
Click to expand...
Click to collapse
Most likely you have an underlying app installed that wants to use WFi and phone data whenever it wants.
Go ahead and grab avast! Antivirus. This app allows you to control what apps use the Internet and when, as well as other features. Try disabling WiFi/data on each of the apps you've installed, and I can guarantee a 98.5% chance that this will solve your problem.
Issue partially resolved
thenookieforlife3 said:
Most likely you have an underlying app installed that wants to use WFi and phone data whenever it wants.
Go ahead and grab avast! Antivirus. This app allows you to control what apps use the Internet and when, as well as other features. Try disabling WiFi/data on each of the apps you've installed, and I can guarantee a 98.5% chance that this will solve your problem.
Post thank?
Click to expand...
Click to collapse
Installed Avast Anti Virus and through its Firewall settings, I was able to disable WiFi & Data to some extent. This is far better than my previous situation. Thanks for your help.
Maybe you can use Tasker to further curb this behaviour.
So I have a G920T that is factory unlocked with an CSC being XAR that works perfectly most of the time. After I updated from 5.1.1 to 6.0.1, however, the mobile data toggle in the notification centre is gone, which according to my observation on the Internet happens to a lot of other users in the U.S. (except for Verizon users). I am reluctant to root as that would permanently disable me from using Samsung Pay, so I figured out a way to modify the system UI without root using a Windows computer and ADB commands:
1. Enable USB debugging in the developer mode
2. Connect the phone to the Windows computer
3. Run adb.exe in cmd on the computer
4. Input
settings put secure sysui_qs_tiles Wifi,Nfc,PowerSaving,RotationLock,Bluetooth,WifiCalling,Location,SilentMode,AirplaneMode,DormantMode,Flashlight,UltraPowerSaving,AllShareCast,Sync,SFinder,
and enter
It seems to work pretty well as the toggles can be moved, removed and added, as long as the syntax is correct. But when I try to get the data toggle, inputting MobileData, (as suggested by many other people on the Internet) doesn't work, neither do Data, CellData, or CellularData,. If I put Cellular, however, a mysterious toggle with an unfinished icon appears in my toggle tray saying "Emergency Calls Only", and if you click on it it's gonna display your recent data usage in the notification centre, with options to go into the data usage settings or "Done". Nonetheless, it still does not allow you to turn on/off your mobile data with one click like before. So I'm really just wondering: anyone knows what syntax I should use for the data toggle? Or it's basically impossible because Samsung has permanently removed this feature from non-Verizon U.S. phones?
Thanks!
Screenshots:
https://drive.google.com/open?id=0B1IVkT3djgHeYUIzaFhyOFdTRTA
https://drive.google.com/open?id=0B1IVkT3djgHeRlJKckFGbEQ5UG8
Is there such app please?
What do you mean? Do you want the app to disable data when connected to WiFi? If so, your solution is MacroDroid by ArloSoft. You can set a trigger (i.e. Connecting to WiFi, Disconnecting from WiFi) to activate a response (i.e Turning off data, Turning on data) so you can set many different things, not just what you said.
Find it here: https://play.google.com/store/apps/details?id=com.arlosoft.macrodroid
Sent from my LGE VS425PP using XDA Labs
I'm searching also for this, meaning an App where you can manage your data and wifi connection, for example on/off when screen on/off. And for an unrooted device (Custom) ROM.
It maybe only works on rooted phones see https://play.google.com/store/apps/details?id=com.gyagapen.cleverconnectivity ?
EDIT: I tried MacroDroid and Mobile Data Off/On Action gives the message:
requires rooted device or ADB hack to grant permission android.permission.WRITE:SECURE_SETTINGS
The ADB hack seems by using a Google ADB tool from develeoper android area.
I do not like both of those two options, so manual toggle seems to remain the thing.
My purpose is to make sure that if someone steals my phone, they can't turn off both wifi and location accessibility. So that I can find it and trace the phone. Because you know, a lot of techies and apps tell us that you can find your phone if it is connected to the internet and its location is turned on. Now, all needed to do on the part of the thief is to turn off the wifi and location. Is there any way we can turn on wifi and location in android secretly and only the owner of the phone has the access to turn them off? My phone is Samsung Galaxy Note 2. Thank you so much in advance.
Hmm, since the android os is very much similar to the linux os, I'd make a script that enables wifi even when you switch it off. Ie: You switch off wifi, the script switches it back on. Now, the key thing here is that android is similar to linux, and that means we can run sh scripts, right? But the only issue I see is that we will have to somewhat make the script run in the background all the time, or make an "if" statement that says "if wifi is off, switch it back on" or something similar, but I can't do that. Instead, I will be guiding you to make the .sh script.
First of all, get the idea of how the wifi works, what files it uses and what stages happen when you connect to a wifi, which you can check out here.
Then, based on that, start scripting the .sh file. Guides on how to do this, can be checked out by a quick google.
Alternative: Ask someone on stackoverflow or something similar to do it for ya hehe
Try to use some tasker like MacroDroid and setup trigger to disable wifi and action to enable wifi, same with GPS... And disable tasker notification from notification bar.
dns43 said:
Try to use some tasker like MacroDroid and setup trigger to disable wifi and action to enable wifi, same with GPS... And disable tasker notification from notification bar.
Click to expand...
Click to collapse
Thank you so much, seems simple to implement....
Hizzur's Answer
i don't know. sorry!
I have a android APK which has two buttons,enable and disable wifi.If i press the enable wifi then the android device's wifi gets turned on.If i put this apk on other mobiles then the press of "wifi enable in the app" will turn the Wifi ON in the device.But in my android device(6.0) its not wokking.I talked with an android app developer and he said that the call from the app doesnt go through to the android framework or something.He said is there any way we can call the Wifi manager from the app? the app is similar to https://www.tutorialspoint.com/android/android_wi_fi.htm