Android :: How To Tell Device Is Sleeping?
Nov 24, 2010
Here's my scenario. I have an app that is playing backgound sounds. Using the BroadcastReceiver I can tell when the display turns off, and then kill the sounds. I can also tell if the screen turns back on. However, if the device is in the lock state I don't want the audio to start. Therefore I wait for the ACTION_USER_PRESENT intent to signal. That all works, except that if the user turns the screen back on quickly after it was turned off, you don't get the lock screen or the ACTION_USER_PRESENT message. So, is there a way to tell, when the screen turns back on, if the device is locked or not, which I guess also means sleeping or not?
View 1 Replies
Oct 16, 2010
I'd like to keep the screen on whenever one of my Activities are running and the phone is plugged in to a power source. I know that Wakelocks are tricky, so I'm looking for an example or some documentation on how to accomplish this specific goal.
View 2 Replies
View Related
Sep 5, 2010
I 'm working with GPS in my application. When phone go to sleep, the GPS's data don't update. I want to stay phone screen wake up until my app will be close. How can I prevent sleeping in Android?
View 2 Replies
View Related
Sep 20, 2010
I've created service which has LocationListener in it. In order to keep service running the service is set as foreground. I have some questions about phone power management and sleeping in that circumstances: Will phone go to sleep while such service is running? How can I save power in this stuation?
View 2 Replies
View Related
Sep 27, 2010
I am developing an application, for an optimal operation I need that the app prevents phone from sleeping. How can I do it? It has to be like google maps: System Tools prevent phone from sleeping
View 11 Replies
View Related
Mar 29, 2010
Often my mobile network is turned off and I just use a Wi-Fi hotspot.
If the phone is not plugged in, the Wi-Fi connection will go to sleep after some length of inactivity.
I could be wrong, but a call to ConnectivityManager.getActiveNetworkInfo().isConnected() does not wake the connection.
So, what is the best way to wake the connection?
In general, I'm looking to write an isConnected() method which will return true/false, optionally blocking returning until a wakeable internet connection is awoken.
View 3 Replies
View Related
Nov 13, 2010
I'm making an application which will utilize both touchevents and sensorevents. The problem with touchevents is that they fire off very often, and thereby consumes massive amounts of CPU time. The common solution is to do a Thread.sleep to make it cool down.However, if one wants to use both the onTouchEvent and onSensorChanged in the same activity, applying the Thread.sleep hack will also slow down onSensorChanged. This is obviously caused by the two methods being called from the same (ui) thread.Is there some way to call onTouchEvent from a different thread than the ui, so one could do the Thread.sleep trick without slowing down onSensorChanged as well?
View 1 Replies
View Related
Dec 14, 2009
Why do so many of the applications say they prevent the phone from sleeping? Is this a problem if the applications are left open or a problem with the applications all of the time no mater if they are open or not?
View 4 Replies
View Related
Jul 26, 2010
I am struggling a bit with the LocationListener in Android.I want to make an app that will get the current GPS location, and then afterwards sleep for a long time. A day or more. In this period of time i want the GPS notification icon to not show.What i have now, is in the onLocationChanged a Thread.sleep(x) but this will keep the icon on in the sleep period. How can i do this, and is there a better approach than to use Thread.sleep?
View 1 Replies
View Related
Jul 22, 2010
I used to have a BB Tour. I could set it up to turn off notifications for email and text messages when I had the phone plugged in. The phone would still ring. I am looking for an app for my HTC Incredible that I could do basically the same thing. I would like to set the phone up so when I'm sleeping the notifications for SMS/MMS and EMAIL messages are muted, but the ringer for the phone is still active. Does anyone know of such an app or setting to do this?
View 4 Replies
View Related
Apr 10, 2009
I have a long lived service, it wakes up (via the AlarmManager) at intervals and connects to a web server. If the phone goes to sleep and one of my polling intervals happens the phone wakes up enough to let me attempt to connect to the network but the ConnectionManager claims there is no network. Given the system log this is correct, it was torn down. Pushing "Menu" once is enough to get the network back up and then my service can connect. How do I get the network to reconstruct itself?
View 2 Replies
View Related
Mar 17, 2010
I noticed that if the Android phone is listening on a ServerSocket on the 3G network, and is then put to sleep with the power button, it no longer listens for incoming connections. The incoming TCP connection does not wake up the phone. Is this there a way to enable waking up a sleeping phone on incoming Server Socket connections, the way that incoming data on a regular Socket does?
View 2 Replies
View Related
Feb 9, 2010
I have noticed that when display goes to sleep, my TimerTask is also freezed, until display is waked up. I need my TimerTask to execute (a BlueTooth operation every few minutes) even while the display is sleeping.
How do i achieve this (eventually using something else instead of a TimerTask)?
View 3 Replies
View Related
Aug 31, 2010
I took the plunge and finally rooted my phone (hand clap!!). I flashed a custom kernel (by NETARCHY[4.0.3a]). At 1st everything worked fine (followed EarlyMon's "How to Fix FROYO"---since i lost all my data). The following day i tried another kernel (baked kernel #5). That kernel didnt work to well on my phone so I reflashed NETARCHY's kernel. When i noticed that my battery was draining quickly, i looked in my SPARE PARTS and noticed that my phone is not sleeping---problem is I dont know what it is. Do i need to do a hard reset again---or should i flash another kernel?? Stuck between a rock and a hard place
(Mods--did this in a rush, please excuse if this is posted in wrong forum)
View 3 Replies
View Related
Jun 22, 2010
A few days ago I after reading some threads on reboots and decided to check the awake time and found that phone wasnt sleeping. Battery life wasnt affected all that bad I thought, lasting throughout the day, however I did an FDR reloaded only a few programs and the problem went away (along with the reboots that occurred nearly everytime I started navigator and only navigator). Battery life was exceptional afterwards, still having at least 60% remaining after unplugging around 8 am and checking later than 7pm
I reloaded the following apps
Shazam
xing barcode scanner
LED desire
Google Earth
Spare Parts, and just now sys panel lite.
Today I experienced another reboot, checked awake time and found it to be at 100% again. After unplugging at 8am and checking at 7 pm, battery remaining is at 36%, way under normal (im usually at 60%+ with heavier usage). Very moderate use today , maybe a dozen short calls, a couple emails, no browsing, took 1 picture and sms'd it, and LED desire (first time used since re-installed) I do keep both my wifi and BT on, 4g off. Ive been in good signal range all day.
View 9 Replies
View Related
May 13, 2010
I was testing my phone and found that if i JUST set it to sleep it will notify me of new emails. But i waited until it was asleep for over 25 min and i sent 2 emails from 2 different email accounts and neither one showed up on my phone until i unlocked it and hit airplane mode and then unchecked airplane mode. i have the mobile data set to always on. I do have only 1 bar at -99 signal strength. but if i turn on and off airplane mode the emails come right in after a prolonged sleep.
View 9 Replies
View Related
May 28, 2010
I have BH Man 1.6 factory and my phone won't sleep anymore I read about some sleeping problem awhile ago and now I can't find it again could anyone help me get my phone to sleep!
View 15 Replies
View Related
Aug 19, 2010
so I have spare parts installed and my running time is usually 100% or close to it. I'm assuming there is a stuck process or something that is keeping the phone from sleeping. Is there an easy way to find and kill it?
View 10 Replies
View Related
Sep 5, 2010
I had pretty bad battery life today, took off the charger at 11:30, just plugged in at 15% 11 hours later, with a short charge in the car on the way to a late lunch. No text messages, no emails, no phone calls . I got a few apps off the market, did a little web surfing, & watched one 4 minute youtube video. This is my first Android phone, I had a HTC Touch Pro before this. BTW - The lack of comms today is because I'm not working right now, but in the middle of federal hiring process with the next appointment on the 13th, wish me luck. Bluetooth, GPS, and wifi are always off. Screen brightness is left at the lowest level. This is all shown with the Power Control widget on a home screen. I also have the Samsung Program Monitor widget on the same screen, and nothing stays running. Auto sync is always off, I rarely actually use gmail. The stock email app is set to check two other email accounts every hour.
I tried a little test, but just don't know what to make of it. I have Battery Monitor and Android Manager Free installed. Whenever I mention Task Manager, I accessed it through AMF. Before beginning, I removed the Weather Channel widget from the home screen and terminated the app in the Task Manager. I had installed a BBC news app today, but uninstalled before testing; it automatically updated a couple times today and showed up in Task Manager after I terminated it. I made sure Background Data was turned off, I generally only turn it back on when I launch the Market (gives a popup saying it needs it). I plugged the charger in with the phone at 26% charge, just for a minute to reset the last time unplugged. Using Battery Monitor (which apparently just shortcuts to the built-in Android battery monitoring screens found through Settings) I checked the status periodically, along with seeing what was active in Task Manager. Every 5 to 10 minutes I would press the power button to turn on the display, then check Battery history - Since last unplugged. I'd check the Task Manager, terminate Battery Monitor and AMF, then press the power button to turn the screen off............
View 3 Replies
View Related
Sep 1, 2010
I've been having poor battery life with my Droid Eris and downloaded Spare Parts to find out what was the cause of it. According to Spare Parts my phone is spending nearly 86% of the time without sleeping (Nearly 10h out of the 11 1/2h since my phone was unplugged) I tried to find a possible app that was causing the problem but couldn't find anything unusual.
View 3 Replies
View Related
Aug 6, 2010
Ever since updating to Froyo earlier this week (official OTA update) I've noticed that my battery life seems to have gotten worse. I just checked my usage and am showing that out of 14 hours since reboot it's been awak for 11 hours. Eight of those hours were spent plugged in on my nightstand last night.
View 1 Replies
View Related
Aug 21, 2010
I have an issue with my desire, as alot of people have reported my battery life has taken a significant hit since the 2.2 update. Prior to the update i was getting about 2 days usage out of the phone, its now struggling to last a day at times and by that i mean about 8-10 hours. I think there is an application or process that is stopping my phone from sleeping and i was wondering if you could help identify and then fix it if possible? Also, one of the things i have noticed is that my applications have started updating automatically...prior to 2.2 update I would get notified but could chose whether or not to download them...is there any way i can revert the phone back to the original state?
View 2 Replies
View Related
Jun 13, 2010
I left my phone on my dresser last night with the WiFi off, screen at the lowest brightness, no gps on etc... and it lost 30-40% of its battery just by sitting here.... This tells me one thing I think, the phone doesn't sleep? Isn't it suppose to sleep if not in use?
View 35 Replies
View Related
May 5, 2010
So I'm just curious if anyone else is seeing this. I understand wi-fi sleeps after 15 minutes of inactivity, but I guess I assumed mobile networking would always stay on. What I'm seeing is, if I leave my phone alone for a little while, as soon as I wake it up, the 3G symbol is not displayed. A second or two later it will show up, and then it will sync. This behavior makes it so that my Gmail push is not as instantaneous as it would be if the 3G always stayed active. I believe (although I'm not positive), that the phone must wake 3G every once in awhile to get e-mails though, although it might just wake up when i get a text or phone call.
I don't see this as a major problem, especially if it's helping me save battery life, but I am curious if this is due to a setting, or if it's just the way the phone works.
View 8 Replies
View Related
May 7, 2010
A couple of days ago I posted a question on what you guys did so that you could still receive emergency calls at night without the phone disturbing you letting you know you got a spam email at 3am.Several of you mentioned that I could go and change my notification volume, but doing that every night was too much work and I was bound to forget or silence my calls and forget to turn it back on in the morning.I found this wonderful FREE app called Sweet dreams. You set the time at which you go to sleep and it has several options such as disabling gps, wifi, bluetooth and putting your ringer and notification volume at whatever you want.You set the wakeup time as well so the phone turns things back on for you in the morning.
View 8 Replies
View Related
Jul 28, 2010
I am concerned my phone isnt going fully to sleep. My battery seems to drop about 20% in about 4 hours of just sitting there not doing anything. It also takes a long time before the phone idle shows up on my battery use screen. Is there anyway to check awake vs asleep times like you can on the evo?
View 2 Replies
View Related
May 19, 2010
I had just posted on these forums about my phone not sleeping. That was with 1.5. The next day, I put the 2.1 leak on my phone. And that seemed to fix the problem and the phone's up time was far greater than its awake time. A couple days later - and once again, the up and awake times are the exact same and my battery seems to be going down faster. I've been poking around for any other posts with the same issue - but haven't found any.
View 2 Replies
View Related
Apr 29, 2010
I know that the LED is supposed to flash green when you have a notification, text, missed call, whatever. My question is does anyone's LED actually flash is the phone is sleeping? I figured that even though the screen was off the light would flash so you could tell something was there without having to turn the screen on, but I haven't noticed it. As soon as I turn the screen on, that is when it seems that the light will flash.
View 11 Replies
View Related
Dec 6, 2009
As I continue to downlaod and try new apps, I notice that some of the permissions that some of them have are/is: "Prevent phone from sleeping". I didn't think much about it, but after conditioning my phone...for a few days I was getting around 11% awake time, now after a few of these apps after a recharge this AM I am showing 26%...before the charge my awake time was very high again. I always use Adavanced Task Killer after messing with the phone, 9/10 trials.
View 3 Replies
View Related
Oct 27, 2009
I have had my phone sleeping correctly for three days. Today I installed task killer, and it hasnt slept since. I tried to uninstall it, but no luck. I reset the phone and only installed handcent and its normal again. I also noticed my battery was lasting very well untill i installed task killer....shortly after installing..the battery was dropping quickly.
View 27 Replies
View Related