Android :: Check Phone Sleep Status

Jun 6, 2009

I'm trying to check if the phone is currently asleep in a service. It's currently a very messy implementation (I'm reading a file in the filesystem that says if the phone is asleep or awake every 10 seconds) so I'm wondering if this is possible with PowerManager or something.

Android :: Check phone sleep status


Android :: Check Key Status?

Feb 14, 2009

Is there any way to poll the state of a given hardware key? I'm not talking about using an event.

View 3 Replies View Related

Android :: Check USB Connection Status?

Nov 6, 2010

I was wondering if would be possible to perform an action for each time the USB status of the device changes.

For example if the user plugs in the cable and it is in sync/charge mode it performs a certain action, if the user then changes the phone into USB Memory Card mode another action is performed and if the user then disconnects the cable then the another action is done.

View 1 Replies View Related

Android :: Check Login Status ?

Nov 15, 2010

I have to do login with my app.

After the login, if it is correct, I wanna show a tabview with:
- My Stats
- Upload Photo
- MapView

This is my code for the login activity

CODE:.......

How can I check if the Login is correct or not?

View 2 Replies View Related

Android :: Check Internet Connection Status?

Aug 12, 2009

I'm basically trying to check that the device is connected to the internet to that I can access and parse an RSS feed. This is also the 1st android app I have written so I'm still finding my way around so any help/advice would be appreciated. I'm sure the variables should be assigned to something but I don't know what. The classes don't appear to have public constructors so I can't do "WifiInfo info = new WifiInfo()".............

View 5 Replies View Related

Android : Check Current Status Of GPS Receiver?

Jan 7, 2010

How can i check the current status of the GPS receiver?

I already checked the LocationListener onStatusChanged method but somehow it seems that is not working, or just the wrong possibility. So basically i just need to know if the gps icon at the top of the screen is blinking (no actual fix) or solid (fix is available)..

View 18 Replies View Related

Android :: Check Which Notifications Are Active In Status Bar In Droid Dev?

Sep 2, 2010

I have made an app that sets notifications in the drop-down status bar of Android phones. However, there is a bug in my code (sometimes the notifications are set, sometimes they are not). I want to be able TO CHECK (in the code) IF THE NOTIFICATION IS VISIBLE TO THE USER. (i.e. can the user see the notification in the status bar?).

How can I do this?

View 2 Replies View Related

Android : How To Check Network Status For Both Wifi And 3g Mobiles

Jun 15, 2010

Android developers can check this code to check the network status on wifi and 3g mobile

You need the following permission to get status view source print? 1 <uses-permission android:name="android.permission.INTERNET"></uses- permission> 2 <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"></uses- permission>

View 2 Replies View Related

HTC EVO 4G :: Widget For Sound Profiles To Check Device Status Via Homescreen?

Jun 5, 2010

Is there a widget for sound profiles? I know I can create a shortcut for the "sounds and display" setting but it would be a lot easier if I can toggle say, normal, silent, and vibrate from a simple widget.

Also I frequently have bluetooth devices connected to my phone. I've found a lot of bluetooth toggle widgets, but I'd like to be able to check the device status via my home screen.

View 6 Replies View Related

Android :: How To Know Phone Is Going To Sleep

Sep 16, 2010

How to know Android Phone is going to sleep? Help me with a sample code.

View 1 Replies View Related

Android :: After 30sec Phone Goes Sleep

Jan 1, 2010

My problem is or has just started for some reason it was working fine yesterday. When i use my phone and then leave it alone 30 secs it goes into sleep mode and the lock is applied, now before i used to be able to push the menu or home button and the lock screen is displayed to which i can then swipe it down to unlock. This has stopped working all of a sudden, i press home or menu button and the lock screen will not swipe down to unlock the only way i can get into the phone is by pushing menu twice. I liked using the swipe down to unlock it. Is there any reason this has started to happen all of a sudden?

View 2 Replies View Related

Android :: Phone Sleep Function

Sep 16, 2010

I previously had a blackberry curve and loved the sleep function where phone would shutoff every night ay 10 and turn itself on at 6:00, is there an app/function for the droid where I can do the same?

View 1 Replies View Related

Android :: Does Youmail App Not Let My Phone Sleep?

Dec 28, 2009

Why does the youmail app not let my phone sleep? Background: Installed youmail app, realized battery was going FAST. Looked at awake time and it was 100%. Uninstalled all apps since the awake time debacle. awake time returns to normal. Re-install only youmaill app, awake time goes back to 100%. Go into preferences or settings, whatever and set for NO polling at all unless requested, no notifications, nothing. Awake time still 100%.Un-install youmail, awake time back to normal.I really like the app and the widget, someone tell me there is a way to fix this. I would like to re-install and use this app.

View 2 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 :: Service Seems To Sleep When Phone Is Inactive

Feb 7, 2009

I've written a test service to understand how android implements a service. I believe I understand the difference between Context.startService and Context.bindService. If I am not mistaken, Context.startService will tell android to keep this service running, even after the Activity that started it has ended.

While testing the service, I have come across something interesting.

My problem is that the service appears to sleep or pause for a few hours, run a short time, and then sleep for a few more hours, then run a short time, etc when the phone has become inactive. In other words, when I am doing things on the phone the service is doing what is is supposed to. But after I have finished doing things on the phone and the screen goes blank the service appears to sleep or pause. I don't know if I have implemented the service wrong or if this is how Android services work.

The test service I have written simply sets a postDelayed handler to increment++ a variable in the Runnable every minute, and then write the value of that variable and a timestamp to a file (log.txt) on the sd card. This how I know that the service appears to sleep. Because there are gaps in the timestamp that correspond to when the phone was inactive. If the service were truly active the whole time, there should be a line item in the log.txt file every minute.

From the log.txt file below you can see that over an eleven hour period there are only 36 line items with time stamps ranging from 10:27 PM through 9:23 AM. If the service was running and active the whole time there should be over 600 lines in the text file. The phone was on AC power the whole time so Android should not have tried to stop services due to power issues. The phone was not used or touched from about midnight to 9 the next morning, so there should not have been a low resource clean up.

I have spent several days looking for an answer and everything I can find seems to validate that when a service is started and not bound, it will stay running (http://code.google.com/android/reference/android/ app/Service.html). However, it appears it does not. Unless I have completely missed the ball on this.

I have included the service.java and activity.java as well as the log file.

Here is a sample log.txt

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

Here is the service java file:

Java:

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

View 5 Replies View Related

Android :: Network Access When Phone Sleep

Mar 21, 2010

I'm using a combination of alarm (set with AlarmManager) and background service to periodically synchronize data in my application. The only problem I have is that when sleep policy terminates Wi-Fi connection the synchronization no longer works. Is there a way to "wake up" the Wi-Fi connection that has been put to sleep? GMail somehow manages to do that because it notifies me about new e-mail even if the phone entered sleep mode.

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

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 :: 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!"); } } } } }

View 2 Replies View Related

Android :: Code To Notify When Phone Screen Goes To Sleep?

Sep 18, 2010

I am an android developer I have a problem..
I want to be get notified when the phone screen goes to sleep Help with a sample code.

View 1 Replies View Related

Android :: Prevent Droid Phone From Going To Sleep Using My Code?

Sep 16, 2010

I want to prevent android phone from going to sleep using my code?
How to do that?

View 2 Replies View Related

Android :: Unable To Select - Check - Check Box In CheckboxView

May 21, 2009

I've got the following row xml file which consists of CheckboxView and TextView;

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

When the app run, i'm unable to "tick" any of the check boxes...

View 2 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 EVO 4G :: Phone Won't Sleep

Jun 9, 2010

Everytime i have checked my awake time and up time, they are the same! i don't know why! i have had an android phone since feb (had the hero) and it has never done this to me before.

rooted using unrevoked.
don't have wifi, bluetooth, or gps on.
when i check to see what's using my battery from the about phone->battery
-> Battery use i see this :
cell standby 23%
wifi 26% ( just realized it somehow got turned on through the day)
phone idle 24%
android system 12%
voice calls 9%
display 4%
dialer 2%

I can't think of anything else to mention, but PLEASE someone give me some advice as to what is making my phone stay awake!

View 9 Replies View Related

HTC EVO 4G :: Phone Does Not Sleep

Jun 15, 2010

When my phone is unlocked it stays unlocked with the screen on... did i change something somewhere?

View 4 Replies View Related

HTC EVO 4G :: Phone Not Going To Sleep

Sep 18, 2010

Ok well I just realised that my phone is dying rather quickly now and come to find out, my phone is not going to sleep for some reason. Never had this problem after 2.2 update and all the sudden it happens. Last thing I downloaded from market wad pdanet. Any ideas to what could be going on?

View 8 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 EVO 4G :: Phone Wont Sleep

Jul 21, 2010

After weeks of being afraid, i finally installed the new update to my evo last night. My phone isnt/wasnt rooted before the install...and my battery life seems to really crappy since i did the install last night. I took the phone off the charger at 7am, used it just for texting basically, sent maybe 50 texts back and fourth and now the phones at 68% battery life via system monitor.

I check the about phone and it says the uptime and awake time are the same...is this because it was changed with the new software? the phone was on and plugged in all night and its only giving me an "UP" time and awake time of 3 hours and xx minutes?

Anyone else have this problem? with the phone being awake, will this kill my battery faster? i searched and could only find problems with the eris, not the evo, any ideas?

I had this problem the first week i got the phone, i had terrible battery life and sprint reset it, and made the problem disappear...i had awesome battery life averaging 10-18 hours on a single charge with heavy useage...any ideas?

View 1 Replies View Related

HTC EVO 4G :: Phone Wont Sleep ..

Aug 3, 2010

So after applying the update my awake and uptime are identical. I'm trying to see whats the easiest way to find the source of it? Im guessing its an app that I was using on 2.1 that isnt working right with 2.2.

View 6 Replies View Related

HTC Incredible :: App That Won't Let Phone Go To Sleep

May 27, 2010

Today I noticed some very rapid battery drain and narrowed it down to Palmary Weather. I figured out that you must use the back key until the app exits for this to work correctly. If you just press the home key while in the app, it will keep the phone awake.

OK, I was just giving a quick heads up, but might as well keep a running list to make this easy. Just please make sure you've actually proven these apps have caused this issue or else we might have 1,000 listed. Also, this is not saying that the app is causing you an issue, just the obvious ones to look at when you do have a problem.

Known Problem Apps

- Flickr (if Facebook for HTC Sense is also setup to sync)
- Palmary Weather (updated:issue only occurs if you do not exit the app correctly...working fine now)
- Profile
- Slacker Radio (some do not have an issue if you hit Menu/Exit to close app...others still have issue)
- Google Listen (must be configured to only download while on Wi-Fi and while charging)
- Meebo
- Alice
- MyLock

View 46 Replies View Related







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