Android :: Way To Wake A Sleeping Wi-Fi Connection

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.

Android :: Way to wake a sleeping Wi-Fi connection


Android :: Server Socket To Wake Up A Sleeping Phone

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

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 View Related

Android :: How To Prevent Sleeping

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

Android :: GPS LocationListener And Phone Sleeping

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

Android :: Prevent Phone From Sleeping?

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

Android :: Sleeping In OnTouchEvent Blocks OnSensorChanged

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

Android :: Applications Prevent Phone From Sleeping?

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

Android :: Turn Off GPS Icon When LocationListener Is Sleeping

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

Android :: How To Keep Droid Device From Sleeping While Plugged In?

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

Android :: Application To Silence SMS / MMS & EMAIL Notifications When Sleeping

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

Android :: Getting Network Restarted After Phone Starts Sleeping

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

Android :: Have TimerTask (or Equivalent) That Executes Even While Display Is Sleeping?

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

HTC EVO 4G :: Phone Not Sleeping

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

HTC EVO 4G :: Phone Not Sleeping - 100% Awake

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

Android :: Cancel/abort Connection From ThreadSafeClientConnManager Connection Pool

Oct 14, 2009

I'm using ThreadSafeClientConnManager to manage a pool of client connections, because my application has several threads, which are simultaneously connecting to a webserver.

Abstract sample code:

CODE:..............

Now lets say on of this threads is downloading a large file, but then the user of my application is switching to another activity/screen. Therefor the file is needless and I'd like to abort this download connection.

In ThreadSafeClientConnManager I found this method: public ClientConnectionRequest requestConnection (HttpRoute route, Object state) Returns a new ClientConnectionRequest, from which a ManagedClientConnection can be obtained or the request can be aborted.

So far I've been using:

CODE:.........

Now from what I understand, I've to use:

httpclient.getConnectionManager().requestConnection(HttpRoute route, Object state);

And that's the point where I'm stuck. I assume that for the route I can just use new HttpRoute(new HttpHost("10.0.0.1")) or whatever my server is, but what to put in for Object state?

And second, as soon as I've the ClientConnectionManager I can call getConnection(long timeout, TimeUnit tunit). But then from there, how I do I execute my HttpGet httpRequest = new HttpGet(URL_TO_FILE); as I did before with HttpResponse response = (HttpResponse) httpclient.execute(httpRequest);?

I've been gone through the documentation and tried out quite a few different things, but I wasn't able to obtain a working solution. Therefor any suggestions and/or code examples are more than welcome.

View 1 Replies View Related

Android :: Popup When No Connection Default Connection Failed Dialog

May 12, 2010

Whenever a application needs internet and connection fails, I get a message dialog

Connection failed
This application requires network access. Enable mobile network or Wi-Fi to download data.

and two buttons, Settings, Cancel.

How do I detect there is no internet connection?

How do I popup a same dialog in my application?

View 3 Replies View Related

HTC Incredible :: Email Not Coming In After Sleeping DI For A While

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

Samsung Behold 2 :: Phone Isn't Sleeping?

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

Motorola Droid X :: Phone Not Sleeping

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

Samsung Epic 4G :: Phone Not Sleeping?

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

HTC Droid Eris :: Phone Not Sleeping?

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

HTC EVO 4G :: Phone Not Sleeping Since Updating Froyo?

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

HTC Desire :: Phone Not Sleeping After 2.2 Update

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

HTC EVO 4G :: Phone Awake / Up Time - Not Sleeping?

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

HTC Incredible :: Mobile Network Sleeping

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

Android :: Keep FTP Connection - Or Any Connection Object - Alive Between Activities

Oct 27, 2010

I'm coding a very basic FTP client on top of my application and I have 2 activities. The first one is the file explorer and the second one is the image viewer. Once I click on the image filename on the explorer, I want to pass the connection to the other activity to handle extra stuff. Basically, I want to keep the same org.apache.commons.net.ftp.FTPClient object (which handles the connection) alive in-between the 2 activities. I know I can't pass an object inside an intent so I don't know what my best bets are.

View 1 Replies View Related

Android :: Able To Have Voice Connection And Data Connection Simultaneously

Jul 23, 2010

What's the technical term for being able to have voice connection and data connection simultaneously? Like AT&T was promoting heavily for a while.Apparently, the new T-Mobile Vibrant has this capability. A friend got one and was accessing the web while talking to me, double jealous now.I have benn lusting after the Verizon version, Fascinate, and wondering if there is any chance it will as well.

View 2 Replies View Related

HTC Incredible :: Solution To Sleeping Through Night With Phone

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

Motorola Droid X :: Check If Phone Sleeping?

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







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