Questions tagged [sleep-mode]

A power-saving condition of a computer or mobile device where it appears it is not on; the screen is not on and typically no sound is output. The computer's state is maintained in RAM.

Use this tag to identify questions related to checking on whether a device is in sleep mode, what capabilities are available in that mode, and how to "wake up" the device if appropriate.

191 questions
45
votes
1 answer

Android Sleep/Standby Mode

I have made an app that starts a service, which starts a timer, which fires off a small function after an amount of time. This is working great on the emulator and on the Motorola Droid 1, but it doesn't work on the Droid X when the phone has been…
Brandon
  • 1,335
  • 2
  • 12
  • 19
28
votes
2 answers

Avoid the iphone go into sleep mode

I have made an iphone fitness application. The issue i am unable to resolve here is that, while the application is running, the iphone goes in the sleep mode, and hence the accelerometer and sound turns off. Which i dont want to happen. Is there…
Zeeshan Rang
  • 17,525
  • 27
  • 65
  • 96
24
votes
4 answers

Force an android phone to sleep, in order to test?

I'm writing an android application that depends on network activity and the alarm manager sometimes waking the phone up from a sleeping state. My question is how can I reliably test this on device? Ideally, how can I force the phone into a full-on…
Chris Best
  • 241
  • 1
  • 2
  • 3
24
votes
6 answers

How can I know when Windows is going into/out of sleep or Hibernate mode?

Is it possible to subscribe to a Windows event that fires when Windows is going into or coming out of Sleep or Hibernate state? I need my application to be made aware when the computer is going to sleep to do some cleanup and avoid timing issues…
Chris Thompson
  • 14,633
  • 9
  • 40
  • 57
22
votes
3 answers

When does android device go to sleep mode?

I was searching SO and web but i couldn't find sufficient answer for my particular question. Ok here we go: Every user can modify screen timeout on android. (when screen turns off when its idle for __ seconds/minutes - users choice ). But user can…
rootpanthera
  • 2,462
  • 6
  • 27
  • 55
15
votes
2 answers

How to keep CPU from 'sleeping' when screen is turned off in Android?

I have an application in which I am sending network data over WiFI. Everything is fine until I turn the display off or the device goes to 'sleep'. I'm already locking the WiFi however, it seems to be the case that the CPU speed ramps down when in…
fatfreddyscat
  • 815
  • 3
  • 8
  • 26
14
votes
2 answers

Is there a away to detect the event when iOS device goes to sleep mode (when the screen gets blackened)?

I wanted to detect two events : Device gets locked/unlocked. Device goes to sleep and the screen blackens. First one I have been able to achieve here: Is there a way to check if the iOS device is locked/unlocked? Now I want to detect the second…
Rohit Kashyap
  • 906
  • 2
  • 8
  • 23
13
votes
2 answers

How to turn screen off or send device to sleep

I want to send device to sleep or turn the screen off. I have investigated and found this topic: Turn off screen on Android Basically, the are three ways to do it, but I have found problems for the three: a) Choice 1: PowerManager manager =…
Tibor
  • 579
  • 2
  • 7
  • 18
13
votes
2 answers

Java Thread.sleep() on Windows 10 stops in S3 sleep status

There's a desktop application that uses Thread.sleep() to achieve long (minutes or hours) delays. This same application has been working fine from Windows XP through (at least) Windows 7. The application calculates how far in the future it needs…
Dale
  • 4,421
  • 2
  • 37
  • 68
9
votes
3 answers

Android - How can I wake up the phone from a hard sleep to take a picture?

I want to take pictures from the Android device's camera periodically over a matter of hours, to create a time lapse video effect. I set an Alarm Manager with an AlarmManager.RTC_WAKEUP flag set to start up a service every few minutes. The service…
Paul Klemstine
  • 281
  • 1
  • 3
  • 9
9
votes
2 answers

Is it possible to put a single monitor to sleep using WinAPI/C#?

By using the Windows API it is possible to put the monitors into sleep mode: [DllImport("user32.dll")] static extern IntPtr SendMessage(IntPtr hWnd, uint Msg, IntPtr wParam, IntPtr lParam); and then SendMessage(this.Handle, WM_SYSCOMMAND,…
Erlend D.
  • 2,867
  • 6
  • 32
  • 53
9
votes
2 answers

Enable iPhone accelerometer while screen is locked

So apparently it is possible to keep the processor going processing stuff while the screen is locked, as indicated here: Running IPhone apps while in sleep mode However, after testing with the example code, UIAccelerometer will just stop giving…
kamziro
  • 7,112
  • 7
  • 51
  • 74
8
votes
5 answers

Prevent sleep mode python (Wakelock on python)

How I can prevent sleep-mode on python without using extra apps on different OS(Ubuntu, Windows...) but in most cases I need Linux solution I am making app that works big amount of time. It uses like 80% of CPU, so a user just start this app and go…
Max Dev
  • 89
  • 1
  • 1
  • 9
8
votes
3 answers

Android AlarmManager not working while phone asleep

I've got a problem with AlarmManager. In short, I plan an alarmManager : Intent intent = new Intent(context, MyActivity.class); PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, intent, 0); AlarmManager alarmManager =…
mcourpot
  • 285
  • 1
  • 4
  • 13
7
votes
3 answers

prevent mobile from going into sleep mode when app is running

I want to prevent Android Mobile from going into sleep mode when my threads are sending HTTP request. as what happened while threads are doing HTTP calls mobiles goes to sleep mode and when user wakes up the phone threads never complete. User has to…
AZ_
  • 35,659
  • 28
  • 152
  • 199
1
2 3
12 13