Android :: WiFi Disconnected When Phone In Sleep Mode?

Oct 6, 2010

I have a service which polls a server at certain intervals. I use an AlarmManager and a BroadcastReceiver to start the service. My problem is that after a certain duration, even though the WiFi is still enabled, but for some reason, my application can't contact the server. I get an "Unreachable network" error. Note that I've already acquired a partial wake lock as well as a wifilock. Here's my code for the BroadcastReceiver.

public class ServiceAlarmBroadcastReceiver extends BroadcastReceiver {
public void onReceive(Context context, Intent intent) {
WakeLock wakeLock = null; WifiLock wifiLock = null;
try { PowerManager pm = (PowerManager) context .getSystemService(Context.POWER_SERVICE);
// acquire a WakeLock to keep the CPU running
wakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "MyWakeLock");
if(!wakeLock.isHeld()){ wakeLock.acquire();
} Log.i("ServiceAlarmBroadcastReceiver", "WakeLock acquired!");
WifiManager wm = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);
wifiLock = wm.createWifiLock(WifiManager.WIFI_MODE_FULL , "MyWifiLock");
if(!wifiLock.isHeld()){ wifiLock.acquire();
} Log.i("ServiceAlarmBroadcastReceiver", "WifiLock acquired!");
context.startService(new Intent(context, ThePollerService.class));
} finally { // release the WakeLock to allow CPU to sleep
if (wakeLock != null) { if (wakeLock.isHeld()) {
wakeLock.release(); Log.i("ServiceAlarmBroadcastReceiver", "WakeLock released!");
} } // release the WifiLock if (wifiLock != null) { if (wifiLock.isHeld()) { wifiLock.release();
Log.i("ServiceAlarmBroadcastReceiver", "WiFi Lock released!"); } } } } }

Android :: WiFi Disconnected When Phone in Sleep Mode?


Jelly Bean :: Galaxy S2 With 4.1.2 - WiFi Goes Off When Phone Is In Sleep / Lock Mode

Sep 18, 2013

I have samsung galaxy S2 with 4.1.2; when my phone goes in sleep/lock mode the wifi disconnects. when i unlock my phone then wifi connects again. I installed many wifi keep alive applications but none of them work wifi keep alive application which keeps my wifi session on -- even if my phone is in sleep mode

View 7 Replies View Related

General :: Get Tasker To Turn Airplane Mode When WiFi Is Disconnected?

Apr 11, 2014

I am trying to get Tasker to turn Airplane mode when the wifi is disconnected IF theres no cell signal and then turn airplane mode off again agter 2 seconds. At the momnt this is what I got:

Airplane mode ON using Secure Settings.
Not Wifi Connected >[code]....

When I press the PLAY button on the task it does turns on Airplane mode but when I test it by turning off my wifi it shows that the Task is active but Airplane mode is not turned on.

View 1 Replies View Related

HTC Droid Eris :: Auto-rotation From Sleep Mode / Delay In Waking From Sleep Mode

Jan 5, 2010

I apologize if these topics were already covered in previous threads.I wasn't able to find anything related in my searches. Auto-rotation for keyboard when answering a text message received in sleep mode does not work. If I actively send a text when phone is already awake, keyboard rotates with no problem but when I go to reply to a text that I received while phone is in sleep mode, the keyboard does not rotate. Is this the norm?I am also experiencing a delay when the I wake the phone. After unlocking the phone, I used to go straight to my home page, now I get a "loading" message which takes several seconds. Is this due to the number of apps I have loaded? Is it possibly due to number of photo frames I have on my home screen or the complexity of the wallpaper?

View 5 Replies View Related

HTC Desire : Wifi Keeps Going Into Sleep Mode

Jun 4, 2010

I installed juice defender this morning then deciding i didnt want it i uninstalled it, since then my wifi keeps going into sleep mode after about 15 mins which i dont want. before i installed juice defender it just stayed on all the time so i got notifications etc. ive reinstalled juice defender and disabled all its features as far as im aware but wifi is still going into sleep mode. what can i do to get my wifi back on all the time.

View 4 Replies View Related

General :: WiFi Always On And Sleep Mode On ICS?

Jun 14, 2012

I have a smartq t20 tablet (great cheap tablet!) running ICS, my question is, when I leave wifi on all the time, what happens when the tablet goes to sleep (not awake according to the battery details)?I can leave a download running and it would continue when the screen is off, does this mean my tablet is never going into deep sleep? Or is that unrelated?

I know the wifi itself drains more battery when left on even if it isn't being utilized but I was wondering about the CPU side of it.

View 3 Replies View Related

Jelly Bean :: WiFi Not Turn Off While In Sleep Mode

Dec 3, 2013

My android 4.1.2 really turns off the wifi when in sleep mode. I see it in the battery monitor.

But after I formated the cellphone, It started with the bug of not turning off the wi-fi in the sleep mode, even when set to do it Maybe some app that I installed before has changed some internal settings!

Before, my battery was lasting almost 4 days, I not use it too much, but now it lasts 2 days only... and I have sure that it's because of the wi-fi bug.

View 6 Replies View Related

Samsung Captivate : WiFi Connection Turns Off When In Sleep Mode By Default

Jul 22, 2010

I am new to smartphones and thought that this might be good for others who are new and don't have the unlimited data plan grandfathered in to know.

This was posted in reply to another question I had had about Pandora so the credit goes to poster MeVirtually.

By default the wi-fi setting is set to go to sleep (and use cellular data instead) when the screen is off, which will most likely happen while you are streaming music as well as other things. To change it so the wi-fi never turns off, to into the phone's menu -> wireless and network -> wi-fi settings -> tap the menu button and select advanced which has an option for wi-fi sleep policy that had been defaulted to sleep "when screen turns off". There you have the option to change it to "never" or "never when plugged in".

View 4 Replies View Related

Android : Run An App When Phone Is In Sleep Mode?

Jun 1, 2010

I'm developping a LiveWallpaper on Android 2.1. This application must download an image every fifteen minutes and draw it on the screen. Everything works except when the phone is in sleep mode. Do you think it is possible to run an application like this when the phone is in sleep mode? And if yes how?

View 3 Replies View Related

Android :: How To Detect Whether Phone Is In Sleep Mode In Code?

Mar 1, 2010

Is there any way to detect whether an android phone is in sleep mode (screen is black) in the code?I wrote a home screen widget. I don't want the widget gets updated when the screen is black to save the battery consumption.

View 1 Replies View Related

Android :: Best Way To Schedule An Event That Will Wake Up Phone / Goes Into Sleep Mode?

Mar 2, 2010

I was investigating the issue of setting up a delayed activity/event, that will occur and trigger even if the phone is in sleep mode (wake up, do what you need to do, go back to sleep). I was thinking of the following methods: 1. sendMessageDelayed 2. Timer 3. AlarmManager.The basic requirement is to be able to set a triger in the future, and be sure that this trigger wakes up the system if it is sleeping,perform the task, and go back to sleep.A partial wakup is required (no screen flickering). Currently i'm using the sendMessageDelayed, and i keep a wake lock held for the timeout period (bad practice).

View 8 Replies View Related

HTC Hero :: Cannot Get Phone Into Sleep Mode

Oct 27, 2009

Over the last week or so I've been obsessed with trying to get my hero into sleep mode, in order to save battery. For those who don't know about this, there are many threads around the net telling of a fix for the messages bug, which prevents the phone entering sleep. It's supposed to reduce CPU usage, thus saving battery.
Now, I've followed the methods of many people who claim to have done this successfully, down to a tee, but for the life of me, I can't get it to work. For some reason my awake time is always at 100%. It's now at the pont of driving me mad, and I'm just wondering if anyone else has tried and failed to do the fix. If anyone needs background info on this problem, I'll post a link up later, as I'm sending this via my phone at the minute.

View 13 Replies View Related

HTC Incredible :: How Do Prevent My Phone From Going Into Sleep Mode.

Sep 10, 2010

Let's say I want to use my gps all the time. how do I prevent my screen from going dim/shutting off ?

View 4 Replies View Related

Samsung Moment :: Sleep Mode On Phone

Jul 1, 2010

i have the moment and pressing the red hang up button will turn the screen on when its in sleep mode, but when i press it again to turn the screen off it wont, it has to time out. now the button still works to end calls and if i press and hold it will bring up the shut down window but like i said it wont just turn the screen off i have to wait for it to time out each time. is this a hardware problem or what is wrong.

View 7 Replies View Related

Android :: App That Can Turn Off Wifi Whenever Put Phone To Sleep?

Nov 2, 2010

Is there an app that can turn off my wifi whenever I put my phone to sleep? To conserve battery, I always have to turn off my wifi before I turn it off, and turn it back on when I unlock it. After a few days of this, it gets pretty annoying. I'm used to the iPod touch where when you sleep it, the wifi automatically turns off to save battery,and when you unlock it, and turns it back on. It would really save me the time.

Also I noticed this Wifi sleep policy thing. I don't really understand, can someone elaborate or explain more. Is it that when your not using your wifi for +15 min, it automatically turns off? Do you turn it on manually, or does it do it auto when you starting using wifi programs like browser.

View 10 Replies View Related

HTC Desire :: My Phone Never Enters Sleep Or Standby Mode

Jun 22, 2010

i just got a htc desire 5days ago i moved over from a iPhone 3G. I have a big problem with it. Battery lasts for about 4-5h i have read forums and googeld for 2 days now.So far i changed my Background to a black one i made wifi turn off after 15min no Bluetooth etc.I think the problem is that my phone never goes in to sleep mode.when i go setting > about phone > battery the up time and awake time is the same.I downloaded advance task killer but the only program i can see running is Smart Keyboard Pro and Amazon. I kill amazon and it stays dead for sometime i cant kill smart keyboard pro it restarts it self straight away.I have had the phone on charge for about 6h now and the battery seams stuck half way and don't relay increase or its increasing very slowly.

View 13 Replies View Related

HTC EVO 4G : Unusual Battery Drain - Phone Won't Go Into Sleep Mode

Nov 13, 2010

Last two days my battery has been draining like crazy and my phone won't go into sleep mode. I charge before I go to sleep and take it off when it's done and it will die before I wake up in about 8 hours .
Use to be at like 97 or 95 when I get up

I've gotten pretty good at managing my battery life , I use superpower and juiceplotter to monitor it .normally I waist less than 1% an hour when not in use and the phone is asleep

I've deleted every app I've installed since 1 day before this started. Only thing unusual I see in my logs is this message (Adding Alarm{464294e8 type 2 com.android.phone })

And this

Alarm triggering: Alarm{46354990 type 2 com.google.android.location} Adding Alarm{465bbb80 type 2 com.google.android.location }non stop repeatedly every second when phone is not in use.

View 12 Replies View Related

Samsung Fascinate :: Apps Closing When Phone Goes Into Sleep Mode

Sep 30, 2010

Until yesterday if I had an app like Pandora or ESPN Radio playing/running when the screen kicked off the app would keep playing. However, now when the phone goes to sleep everything else gets shut off. I have not altered anything myself per se. Even uninstalled a few apps like AutoKiller [which I had installed for weeks and everything worked fine with it on and installed] but the problem persists and remains. This really perplexes me as I want/need these apps to play with the screen off like they did before. For the life of me I don't know why this is; nor can I find anything in settings to change.

View 1 Replies View Related

HTC Eris :: Phone Randomly Either Not Waking Up From Sleep Mode / Just Powering Down?

Nov 29, 2010

I can't be 100% sure which one it is. But I installed Nonsensikal 13.2 about a week ago, love it, and was about to basically settle on this as my default rom until Saturday. Starting Saturday my phone has become non-responsive about 5-6 times. Meanin the lock screen won't come on, and the power button will not turn the phone on or off.I'm assuming this means that the phone is still on when this happens, because if it had just powered down randomly I'd think the power button would turn the phone back on I have to pull the battery out and power it back on to start working again. I don't have setcpu or autokiller running, but I am running juicedefender (in case any of that is helpful for anybody.)

View 3 Replies View Related

HTC Incredible :: No Email / Text Notification - Phone In Sleep Mode?

Jun 4, 2010

Is there any way to get an email or text notification once my phone is in sleep mode? If my phone is "awake" it rings but once asleep I don't get any notification. Also, if my phone ringer is set to vibrate is there any way to set my email/text notification to ring or does it have to be both vibrating or both ringing.

View 1 Replies View Related

HTC Droid Eris :: Putting Phone Into Sleep Mode With Dedicated Key?

Feb 23, 2010

I know this is going to sound dumb but how do I put the eris into sleep without not touching it? like the droid has a dedicated key at the top which is also the power key so how do I do it for the eris?

View 1 Replies View Related

HTC Incredible :: No Ring Alert When Phone Sleep Mode (Not Powered Off)

May 4, 2010

My Incredible rings when there's a visible screen. When the screen darkens and phone enters sleep after, in my case 1 minute of non-use, any calls coming in do not ring through. Voicemail picks them up but there is no indication that I have an incoming call unless I wake the phone up and check the upper left hand menu for the voicemail icon. This can't be set up right. When the phone is asleep (dark screen) but not powered off, there has got to be a setting that lets calls ring through and awaken the phone so it can be answered.

View 4 Replies View Related

HTC Desire :: Rebooting - Phone Out Of Sleep Mode To Respond To Text Message

Sep 19, 2010

I took my phone out of sleep mode to respond to a text message, only to find I couldn't get the keyboard into landscape mode. I then found that the trackball wasn't working, and the phone seemed as if it was moving through puddy. When I tried putting it to sleep, the screen would dim but not go black. I eventually had to remove the battery to resolve the issue. The next day, the same thing happened.

Both times, the issue happened at around 8 o'clock. I thought thru what apps I had downloaded recently, and looked through Astrid To-Do. I found it had scheduled back-ups at 8 o'clock. I turned that off, hoping that it would fix my problems. The next day, at 8 o'clock, my phone randomly restarted. That was all. No overheating, no hanging, and it booted up just fine. The next day, it rebooted again, but I don't know if it was around 8 o'clock. Today, just about an hour ago at 2:30, it rebooted again, with no overheating or any other problems.

I'm at a loss about what could be causing this. I uninstalled Astrid To-Do app completely now, but I'll have to wait to make sure that fixed anything. I have about 7 days left before my 30 day return policy kicks in, but I moved to Boston from Iowa to go to college, and I would have to mail it back, which I would prefer not to do (cost and time without a phone being the major issues).

I'm running:
Firmware 2.1-update1
Baseband version 2.05.10.06.29
Kernel version 2.6.29-e9066436

View 4 Replies View Related

General :: Power On Phone From Sleep Mode - Randomly Receiving Notification

Feb 3, 2014

Sometimes when i power on my phone (from sleep mode), i get this notification. How to block or remove this thing?

View 5 Replies View Related

Android :: WiFi Network - Password Invalid After Disconnected

Apr 20, 2010

I have a WiFi network at work and it requires a New password generated from a secure token each time when I try to re-connect. Since Android WiFi setting remembers the password, if it try to re-connect using the saved password (it becomes invalid after disconnected), my secure token become invalid. If I remember to remove the connection each time after I disconnect, I can enter new password when the connection is discovered as a new connection again. The problem is what if I forget. In addition it is inconvenient. Do you know any Android application supports remove a chosen WiFi connection password each time the connection is lost?

View 1 Replies View Related

Motorola Droid X :: GPS / WiFi Not Allowing Phone To Sleep?

Sep 25, 2010

back with 2.1 there was the issue with GPS, and once it was activated not allowing the phone to "sleep." You could see the results of this in the "Battery History" screen that Spare Parts would give you.First of all this does not seem to be fixed with 2.2 unless im missing something in my settings, and actually it seems to have gotten worse.Even when i change my WiFi Sleep Policy to turn off when "screen is off" it seems as though the phone cannot go to sleep, and my Wifi is not turning off as it should.

View 6 Replies View Related

HTC EVO 4G :: Wifi Is Disconnected When On Standby - Battery Drain

Oct 18, 2010

At home i've noticed that even though I have wifi on, it'll drain 15-20% of my battery over night (8 hours). When I turn the display on it'll show that there's no wifi connection available, but wifi is still enabled. After i turn the display on, it'll quickly connect to my wifi. Is this normal? How do i make it stay connected to my home wifi when the display is off/phone is in standby?

View 7 Replies View Related

Nexus :: Wifi Disconnected At Lock Screen

Mar 16, 2010

It seems that I have problem to leave Wifi on in order to get skype & SIP calls when the screen shutoff (black screen / idle)
I changed the "wifi sleep policy " to never but still i cant get incoming calls

I tested it several time even tried to ping it but it seems that it is disconnects after the screen shutoff.

View 5 Replies View Related

Android :: Sleep Mode App?

Aug 1, 2010

Is there any kind of app that can block incoming texts and calls, but still allow me to keep my phone on? I'm going to Mexico for vacation, and I dont want a 45378594365 dollar phone bill.

View 4 Replies View Related

Android :: Sleep Mode In Emulator

Apr 6, 2009

Is the actual version of the emulator able to reproduce the sleep mode? (Android 1.1 SDK r_1)

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved