[Q] Change Wifi sleep policy on the fly? - Vibrant General

This is really more of a generic Android issue, but since I have a Vibrant I figured I'd post here. I've noticed that when connected to wifi, if the Wifi sleep policy is set to 'Never', then my battery is incredible. But, sometimes, I leave a wifi zone, and in this situation, the wifi drains the battery like there's no tomorrow, constantly searching for a known network. I'd rather just leave wifi on so that I don't need to think about.
What I'd like to do is have some service monitor the wifi connection, and set the wifi sleep policy to never if I'm connected to wifi. If not connected, set it to 'When screen turns off'. This way I get the best combination while still having the ability to have wifi enabled all the time.
Does anyone know of something that already can do this? Or is it something that I should investigate writing myself? I'm certainly not opposed to developing it myself, but I'd rather not reinvent the wheel.

In response to myself, it wouldn't even need to poll the wifi connectivity. Android could just notify the service when the connectivity changed. I don't know if it's possible for a service or user app to change system preferences. Anyone know?

Take a look at the XDA "superpower" and "tasker" in the market. The superpower app has screen off profiles and some other nice features and tasker is very customizable.

All~G1 said:
Take a look at the XDA "superpower" and "tasker" in the market. The superpower app has screen off profiles and some other nice features and tasker is very customizable.
Click to expand...
Click to collapse
Thanks for the suggestion, I just went ahead and wrote my own utility:
http://goo.gl/dZZWH

Related

wifi issue

Is it me or anyone having Wifi sometime take forever to scan? (not auto connect when you move in a known/recorded wifi area)
wrongfeifong said:
Is it me or anyone having Wifi sometime take forever to scan? (not auto connect when you move in a known/recorded wifi area)
Click to expand...
Click to collapse
No problems for me... I do hate how much battery wifi drains for me though.. I thought its supposed to use less battery than 3g, but for me its the other way around
wrongfeifong said:
Is it me or anyone having Wifi sometime take forever to scan? (not auto connect when you move in a known/recorded wifi area)
Click to expand...
Click to collapse
What FW? I'm on XXXXXX24 and mine is fine.
pngface said:
No problems for me... I do hate how much battery wifi drains for me though.. I thought its supposed to use less battery than 3g, but for me its the other way around
Click to expand...
Click to collapse
It shouldn't drain too badly. You may need to tweak your wireless networks settings or troubleshoot your phone.
bongd said:
What FW? I'm on XXXXXX24 and mine is fine.
It shouldn't drain too badly. You may need to tweak your wireless networks settings or troubleshoot your phone.
Click to expand...
Click to collapse
For example when I leave wifi on in the night and the battery is at 100%, when I wake up its going to be something like 75%, and when I check the battery usage it says Wifi has used 40%... isnt that way too much
i'm starting to think alot of x10s are defective, this and the in-call volume. i don't have that volume problem, but i do have this terrible wifi problem, the thing has a mind of its own. if leave the wifi zone it almost never reconnects by itself, i need to go into settings, disable wifi, enable wifi, select the network that it should have connected to already, and click connect. sometimes i just need to turn wifi off then on, on rare occasions, it will connect automatically. i can't find any pattern for what causes it to not connect.
I sound like a broken record by saying this, but it is an android issue compounded with router incompatibilities. Happens on the froyo nexus I have too.
needmoregigs said:
I sound like a broken record by saying this, but it is an android issue compounded with router incompatibilities. Happens on the froyo nexus I have too.
Click to expand...
Click to collapse
Do you know if there is a list of routers that are compatible with the nexus one or android phones for that matter?

[Q] Disabling WiFi network scanning...

I was wondering, is it possible to "disable" WiFi scanning once connected to a preferred network? I'm just guessing but does it use so little memory/battery to continually scan every few seconds that nobody has bothered to develop a script or app that allows this to be done?
I had a quick search on Google and the forums here but yielded little to go on.
I'm using a custom ROM atm based on Froyo 2.2.1.
Any help would be ideal. Thanks!
depending on your phone,cant you uncheck "notify me when an open network is available"?
turbo614 said:
depending on your phone,cant you uncheck "notify me when an open network is available"?
Click to expand...
Click to collapse
Unchecking this doesn't stop it from scanning, it just stops it from notifying you of an open network. It will still scan around.
I'm guessing the answer is no then?
Not to worry. Thanks.
Davey Boy said:
I'm guessing the answer is no then?
Not to worry. Thanks.
Click to expand...
Click to collapse
Once you're connected to a network it does not scan for new networks unless you're on the networks screen and then it will scan for them. Close the screen and it stops scanning.
Superorb said:
Once you're connected to a network it does not scan for new networks unless you're on the networks screen and then it will scan for them. Close the screen and it stops scanning.
Click to expand...
Click to collapse
I would argue that. Phones differ for sure, but mine (Eris) scans for networks and puts an icon in the status bar showing available networks if I leave wi-fi turned on. If I then open the networks screen it will show me all available networks, locked and open, but it scans regardless. It does use battery power, but a relatively small amount.
PieceKeepr said:
I would argue that. Phones differ for sure, but mine (Eris) scans for networks and puts an icon in the status bar showing available networks if I leave wi-fi turned on. If I then open the networks screen it will show me all available networks, locked and open, but it scans regardless. It does use battery power, but a relatively small amount.
Click to expand...
Click to collapse
It does scan, but not constantly. Something like every few minutes or so. Maybe it's just the ROM I'm running that does this though.
Yea, my phone notifies me of available networks within range, whether on the Wi-Fi screen or not.
While I appreciate the battery/memory usage may be minimal, with the aim of optimizing my phone, an app that could disable/enable Wi-Fi scanning would be great. Am I the only person who thinks this?! Lol.
Sent from my GT-I9000 using XDA App
Davey Boy said:
Yea, my phone notifies me of available networks within range, whether on the Wi-Fi screen or not.
While I appreciate the battery/memory usage may be minimal, with the aim of optimizing my phone, an app that could disable/enable Wi-Fi scanning would be great. Am I the only person who thinks this?! Lol.
Sent from my GT-I9000 using XDA App
Click to expand...
Click to collapse
I agree. I only use wifi when I'm at home. I also use Green Power, and that will disable wifi if 3g is enabled. When connected to wifi my ROM will still scan for new networks every few minutes. I'd like a way to completely disable wifi scanning.
@Davey Boy
I too wonder about this. Like you, when on the wifi settings page it seems to scan every 12 seconds or so even though I am connected to my home network. People have said that it only does this when in that particular screen but how do they know this?
I would like to think they are right but is there any way to prove it?
Please let me know if you get anywhere with this.
Yea unfortuately all wifi connections scan due to ip leases. Depending on the router after a certain amount of time in dhcp mode your ip address expires and then is re-issued. Another reason the wifi card pings the router to ensure the connection is still alive. So honestly to stay connected the wifi needs to scan.
wranglerray said:
Yea unfortuately all wifi connections scan due to ip leases. Depending on the router after a certain amount of time in dhcp mode your ip address expires and then is re-issued. Another reason the wifi card pings the router to ensure the connection is still alive. So honestly to stay connected the wifi needs to scan.
Click to expand...
Click to collapse
Pinging the router every few minutes is different from scanning for networks. Also, lease time is normally 24+ hours, so there is no need to constantly scan for networks or ping the router.
carlos67 said:
@Davey Boy
I too wonder about this. Like you, when on the wifi settings page it seems to scan every 12 seconds or so even though I am connected to my home network. People have said that it only does this when in that particular screen but how do they know this?
I would like to think they are right but is there any way to prove it?
Please let me know if you get anywhere with this.
Click to expand...
Click to collapse
I too am wondering why we can't specify a prefered network and not bother scanning for others! I also have to kill wi-fi sharing service (with android optimizer) everytime I enable wi-fi
I have same problem after upgrading to 2.3 Wi-Fi shown as it is Active, but it is turning off and on and scaning and off again all times
hellllllllllllllllllllllllllllllllllllllllllllllllllllllllp hellllllllllllllllllllllllllllllp
heeeeeeeeeeelp
helppppppppppppppppppp
I have same problem after upgrading to 2.3.5 Wi-Fi shown as it is Active, but it is turning off and on and scaning and off again all times
sorry...........
Old topic but still interested. Any workaround found?
You can change the speed to a ridiculous amount of time. In your build.prop WiFi.supplicant.scan.interval should be set to a number of seconds. It is not advised to say change it to 24000000000000. Or something insane because if u lose signal it won't be reconnecting for you until that time is up.
Sent from my SAMSUNG-SGH-I747 using Tapatalk 2

[Q] Completely Disable Wireless

I am looking to use some modified Nook Colors for a business purpose. I would like for the wireless capabilities to be completely disabled as they will be used for mostly survey purposes and I don't want people getting on the internet and such. I will be using CM7 as this is quite polished at this point. Is there an easy way to completely disable the ability to turn on the wifi and bluetooth radios? I was hoping for something as easy as deleting a driver file or something else that the device needs to turn these things on.
Thanks.
I use mine as a point-of-sales system, and I sometimes want all wireless function off, so the battery will last a whole business day, and I use a widget that you can download for free. Any child proofing app would work. You can limit the use of the device extremely easily.
Sent from my NookColor using xda premium
You can try removing /system/etc/wifi...

Auto switch off/on data-3g/wifi

I'm looking for app, which can turn off data, when connection to know wifi spot is made and from the other side, when there is no known wifi spots, turn data /3g back on.
I know, that if both wifi and data is on, phone use wifi, if there is known spot, but don't phisicaly turn off data connection automaticly.
I tried SmartConnectivity, Smart Wifi toggler, but it's not working, as I want.
Try "Tasker"
Sent from my Nexus 4 using Tapatalk 2
scream4cheese said:
Try "Tasker"
Sent from my Nexus 4 using Tapatalk 2
Click to expand...
Click to collapse
Jap, tried. But I don't know, how to make task for that kind of function...:/
https://play.google.com/store/apps/details?id=org.cprados.wificellmanager
good app. doesn't use location services but instead remembers cell towers (like y5 which doesnt work anymore with 4.2+) so good on battery.
akulp said:
I'm looking for app, which can turn off data, when connection to know wifi spot is made and from the other side, when there is no known wifi spots, turn data /3g back on.
I know, that if both wifi and data is on, phone use wifi, if there is known spot, but don't phisicaly turn off data connection automaticly.
I tried SmartConnectivity, Smart Wifi toggler, but it's not working, as I want.
Click to expand...
Click to collapse
Qualcomm's battery guru does this there's a learning period but after that it should perform in the manner you're describing
Sent from my Nexus 4 using xda premium
maybe in a few years that app will get somewhere. as it is, google location based wifi switchers aren't a good idea, unless you're using location services 24/7 anyway (latitude, gnow, etc).
I use wi-fi matic + macrodroid. When I come home, wi-fi matic detects the cell tower I'm connected to and switched on wifi. Once connected, macrodroid switches airplane mode on, and sipdroid connects to my sip provider. Once I leave and lose the wifi connection, macrodroid disables airplane mode. Then wi-fi matic sees that I left my area and switches off wifi. Totally automated
agreed... I don't use it myself(I'm a self-switcher) but I did install when it first came out and found it behaves like the op desires
Sent from my Nexus 4 using xda premium
Mobile data is automatically switched off when WiFi is connected.
No need to disable it manually.
Sent from my Nexus 7 using xda premium
El Daddy said:
Mobile data is automatically switched off when WiFi is connected.
No need to disable it manually.
Sent from my Nexus 7 using xda premium
Click to expand...
Click to collapse
That's not true. If U look in Settings-Data usage Mobile data is still ON. Of coures it's not used, because wifi have prioritiy, but data is ON anyway.
For 2 days I was switch off it data/wifi manually and battery life is better.
ziddey said:
maybe in a few years that app will get somewhere. as it is, google location based wifi switchers aren't a good idea, unless you're using location services 24/7 anyway (latitude, gnow, etc).
I use wi-fi matic + macrodroid. When I come home, wi-fi matic detects the cell tower I'm connected to and switched on wifi. Once connected, macrodroid switches airplane mode on, and sipdroid connects to my sip provider. Once I leave and lose the wifi connection, macrodroid disables airplane mode. Then wi-fi matic sees that I left my area and switches off wifi. Totally automated
Click to expand...
Click to collapse
Great. I think Wi-Fi matic + Auto WiFi/3G switch app should do what I'm looking for.
Thank you!
akulp said:
That's not true. If U look in Settings-Data usage Mobile data is still ON. Of coures it's not used, because wifi have prioritiy, but data is ON anyway.
For 2 days I was switch off it data/wifi manually and battery life is better.
Click to expand...
Click to collapse
No its not on.
Sent from my Nexus 4 using xda premium
akulp said:
I'm looking for app, which can turn off data, when connection to know wifi spot is made and from the other side, when there is no known wifi spots, turn data /3g back on.
I know, that if both wifi and data is on, phone use wifi, if there is known spot, but don't phisicaly turn off data connection automaticly.
I tried SmartConnectivity, Smart Wifi toggler, but it's not working, as I want.
Click to expand...
Click to collapse
Okay here is .prf i just created put it in your tasker folder(auto-import).
It works perfect.
Open tasker and import it.
On any WiFi you connect(you can change that by pressing green arrow and add your know WiFis if you would like) it disables Mobile Data(You cant receive MMS if Mobile data is off) on WiFi you connect and when you lose your connection whit WiFi it disables WiFi and kicks in Mobile Data On so you dont need to worry to disable WiFi it does automatically.
ENJOY!
If it works thank me.
http://goo.gl/AS76Q
El Daddy said:
No its not on.
Sent from my Nexus 4 using xda premium
Click to expand...
Click to collapse
Yes, but service is ON, look in Settings-Data Usage: Mobile data=ON And that service is using battery...I'm not the first one, who found that "problem".
But it's not used, that's true.
Anyway, I found a solution with Wi-FI matic and Wifi/3g switch, not it's working like I want.
So thanks for help.
akulp said:
Great. I think Wi-Fi matic + Auto WiFi/3G switch app should do what I'm looking for.
Thank you!
Click to expand...
Click to collapse
Llama (just search the Play store for it, I can't post the link...) seems to be a good single app location aware solution. The first play store review pretty much says it all "More flexible than Atooma, but not brain-melting like Tasker. Just makes using your phone easier, and more helpful."
I've been struggling with Tasker for several days trying to get it to do the same thing (toggle wifi and mobile data settings automatically based on my location). I had Llama set up and working beautifully in maybe an hour and a half, which included the time to read the devs instructions and FAQ (click "View Developer's Website from the Play store).
It uses cell towers to determine your location, so there is no battery hit, or you can optionally enable wifi polling or GPS for more accurate locating. It can also perform actions based on when your wifi changes state (connects or disconnects) regardless of your location. And since it's "Tasker-like" it can perform a lot more than just handling your data connections: adjust volumes or screen brightness, launch/kill apps, even shut off or reboot the phone (only if rooted). For example, mine is set up to remove my lockscreen password when I am home and re-enable it when I leave the area of my home wifi and it was fast and simple to get configured.
Karlo666 said:
Okay here is .prf i just created put it in your tasker folder(auto-import).
It works perfect.
Open tasker and import it.
On any WiFi you connect(you can change that by pressing green arrow and add your know WiFis if you would like) it disables Mobile Data(You cant receive MMS if Mobile data is off) on WiFi you connect and when you lose your connection whit WiFi it disables WiFi and kicks in Mobile Data On so you dont need to worry to disable WiFi it does automatically.
ENJOY!
If it works thank me.
http://goo.gl/AS76Q
Click to expand...
Click to collapse
Wow, great!
I'll try and report...
But I think there is one thing missing what Wi-FI matic do. Wi-FI matic activate WIFI based on cell towers.
With this Tasker script you have to turn on WiFi by yourself, is that correct?
Than script turns off data and turn it back ON, when you lose connection. But than again, when wifi is presented, you have to turn it on by yourself...
I think, this script is doing something similar as this app
https://play.google.com/store/apps/details?id=notus.com.tr.autowifi3gswitch&hl=sl
akulp said:
Wow, great!
I'll try and report...
But I think there is one thing missing what Wi-FI matic do. Wi-FI matic activate WIFI based on cell towers.
With this Tasker script you have to turn on WiFi by yourself, is that correct?
Than script turns off data and turn it back ON, when you lose connection. But than again, when wifi is presented, you have to turn it on by yourself...
I think, this script is doing something similar as this app
https://play.google.com/store/apps/details?id=notus.com.tr.autowifi3gswitch&hl=sl
Click to expand...
Click to collapse
If you want you can add to turn wifi on based on cell towers in tasker and even much more.If you need more help feel free to contact me.
Karlo666 said:
If you want you can add to turn wifi on based on cell towers in tasker and even much more.If you need more help feel free to contact me.
Click to expand...
Click to collapse
Yap I know, tasker is powerfull, but my knlowedge about that is weak...
So If you are so kind, could you please add in previous task (thath one sent to me in your first post) or make a new task for turning on wifi based on cell towers...

How do I disable wifi autoconnect?

I just recently got a Nexus 4 from Google. Running 4.2.2 stock, all well and good.
There is one feature however which I really dislike and which has potential security and privacy issues to be considered: unless I shut down wifi entirely, my phone will automatically connect to ANY AND ALL open wifi networks it finds, using those in preference to cellular data to try to get on the internet. This is.. entirely suboptimal but I have not found a way to stop it. I disabled 'auto notification of open wifi networks' which did what it said, it doesn't NOTIFY me any more, it just silently connects.
Is there a way to prevent such behaviour without having to turn wifi off all the time?
Thanks!
nmlss2011 said:
I just recently got a Nexus 4 from Google. Running 4.2.2 stock, all well and good.
There is one feature however which I really dislike and which has potential security and privacy issues to be considered: unless I shut down wifi entirely, my phone will automatically connect to ANY AND ALL open wifi networks it finds, using those in preference to cellular data to try to get on the internet. This is.. entirely suboptimal but I have not found a way to stop it. I disabled 'auto notification of open wifi networks' which did what it said, it doesn't NOTIFY me any more, it just silently connects.
Is there a way to prevent such behaviour without having to turn wifi off all the time?
Thanks!
Click to expand...
Click to collapse
Forget all remembered networks, and manage how much your Wi-Fi is on. It's a quick tile.
In all my years of owning an android it has NEVER connected to a router I didn't want it to do it's user created
Sent from my Nexus 4 using xda app-developers app
strapped365 said:
Forget all remembered networks, and manage how much your Wi-Fi is on. It's a quick tile.
In all my years of owning an android it has NEVER connected to a router I didn't want it to do it's user created
Sent from my Nexus 4 using xda app-developers app
Click to expand...
Click to collapse
Thank you. I have owned several Android phones, this is the first one that behaves like this. The only thing I'm unclear on is 'manage how much your wifi is on'?

Categories

Resources