Questions tagged [wakelock]

Refers to PowerManager.WakeLock, a class from the Android SDK belonging to package android.os. Its responsibility is requesting CPU resources in the context of power management. If no wake locks are taken, Android will shut down the CPU.

The Android Operating System uses its own power management scheme, built on top of the standard Linux one. Since it's mobile-oriented, one of its main goals is to avoid wasting CPU cycles (i.e. power) if no application is running.

That's why every application must request CPU resources, using wake locks. If no wake lock is taken, Android will shut down the CPU in order to save power.

Resources:

534 questions
-1
votes
1 answer

Show notification Alarm Manager / Wake Lock / Sleep (local notification in Android)

I want to display a notification / alarm with the terminal in "sleep mode / standby". As does WhatsApp, Handcensms ... Or the simple alarm clock. For example, in IOS is called "local notification" and looks…
ephramd
  • 561
  • 2
  • 15
  • 41
-1
votes
1 answer

A large number unused wakelocks and performance

There is an application that every day creates about 100-200 new wakelocks for android. each wakelock is used once and after using it is no longer needed, but remains in the system. Thus there are a lot of unused wakelocks in the system. How do you…
Filin
  • 1
  • 1
-1
votes
2 answers

Android : Screen is not waking up

I am working on calling feature and i want an activity to be opened and the screen to wake up whenever there is an incoming call. I am able to start the activity but am not able to wake up the screen. I have tried as many solutions available here on…
Kunal
  • 412
  • 5
  • 21
-1
votes
1 answer

Android timer that fires every second and works when screen is off

I'm trying to implement a service that does some work every second, even when the screen is off. I have tried using handlers and timertask together with partial wake lock with no luck. And as far as i know it is not possible to use alarm manager at…
p900
  • 1
  • 2
-1
votes
1 answer

Java Android service keep device awake to receive serial port commands

I am creating a car computer with a tablet (Asus MemoPad ME572C). I have an arduino connected with the tablet through an usb to serial adapter. Now i need to be able to turn the screen on from standby. What i tried is putting this in the oncreate…
jokro
  • 1
-1
votes
1 answer

How to prevent app from closing when android device goes to sleep

How do i prevent my app from closing when the device goes to sleep mode, i obsevered that anytime my device goes to sleep mode my app closes but i want it still open when my devices comes out of sleep mode.
user1662302
-1
votes
1 answer

Code in service onDestroy not doing anything

I have a service that uses wakelocks to keep the screen on. Everything works wonderfully while the service is running: I am able to acquire and release the wakelock depending on different functions. However, when the user turns off the service, I…
Flyview
  • 1,899
  • 1
  • 28
  • 46
-2
votes
2 answers

iOS: detecting inactivity or periodically launch an app

Is it possible to detect inactivty on iOS outside an application scope? If not, is it possible to launch an app periodically even if in foreground? My objective is to play some videos in loop after some time where user is not interacting with the…
Rui
  • 5,900
  • 10
  • 38
  • 56
1 2 3
35
36