Skip to main content

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.

2 votes
1 answer
91 views

WakeLock API not working in Safari (iOS) but working in Windows/android platform with same code

I want to enable wake lock API. It is working fine with Windows platform and android devices but not in Safari or iOS devices. Console has error NotAllowed, Permission was denied in Safari Browser. I ...
Shriyank Mendpara's user avatar
0 votes
0 answers
23 views

Android: DatagramPacket does not receive packets in the background using Service and WakeLock

I am making an application for android 5.1, the essence of which is to transfer voice packets over the UDP protocol between devices, however, when I block the screen of the device itself, socket....
IsMoDex's user avatar
1 vote
1 answer
276 views

Another Android Gradle plugin supports only Kotlin Gradle plugin version 1.5.20 and higher

I found many discussions regarding this error, but I am not able to fix it. I have a flutter project, building to Android and iOS. I just upgraded from 3.7.10 to 3.19.0 and are upgrading the pubspec ...
Emaborsa's user avatar
  • 2,696
2 votes
1 answer
170 views

How to turn on android screen when received FCM push notification?

Is there a way to turn on android screen when received push notification from FCM or somewhere else? I want it will turn on even if the app is in background, and even if the app is killed. In addition,...
Itamar Stern's user avatar
0 votes
2 answers
76 views

Is there any mechanism to sleep exact 1 min precision?

I am developing a library that should work every minute. Sometimes this library doesn't wake at given time. It wakes after a delay. Example timestamps are like this: 12:00:00:250 12:01:00:250 12:02:00:...
qwerty's user avatar
  • 1
0 votes
0 answers
63 views

Android receive onKeyDown event even if screen is off

I am writing a simple program in Java that is supposed to detect volume key presses even if the phone screen turns off. When the volume up key is pressed it prints the number of times it has been ...
user avatar
0 votes
1 answer
40 views

Keep the screen on in Trusted Web Activity

I want to keep screen on while show trusted tabs. I was override the WebViewFallbackActivity class and inject this code but it's not working: PowerManager powerManager = (PowerManager) ...
Alireza's user avatar
  • 209
0 votes
1 answer
88 views

Display alert dialog after specific time

I want to start a timer (i think in this case CountDownTimer) as soon as I get a specific wakelock. Once the countdown timer finishes, i want to display an alert dialog. When the wakelock is released, ...
user2333839's user avatar
2 votes
1 answer
2k views

A problem occurred configuring project ':wakelock' in Flutter

So I have been trying to run my flutter app but I keep getting errors upon errors. When I ran flutter run, this is what I got Launching lib\main.dart on M2102J20SG in debug mode... FAILURE: Build ...
Stephen Murya's user avatar
0 votes
1 answer
636 views

How to use wakelock / make an app run when the device is locked

So I am trying to make an app that needs to use some networking stuff while running in the background. (From a thread cause you can't otherwise and cause it's in the background) But when I lock the ...
user14007089's user avatar
0 votes
0 answers
251 views

Using Wakelock with Audio Service in flutter

I have a requirement to give the user the option to keep specific screen in the app awake so the screen will not be switched off automatically in order to give the user the time to read the content. ...
Ammar Al Zayer's user avatar
1 vote
1 answer
816 views

With SCREEN_BRIGHT_WAKE_LOCK deprecated, how can I keep the screen on in Wear OS?

For my Wear OS watch face project, I was using the flag SCREEN_BRIGHT_WAKE_LOCK to acquire a wakelock that keeps the screen fully on for one minute (triggered by the user as needed). This flag has ...
go3d's user avatar
  • 463
1 vote
1 answer
130 views

How to keep Android screen on after an action

I could have sworn there's a simple line of code for this, but I can't find it right now. In my app I am using a piece of custom hardware for input. I receive events (on BLE) but not as keypresses or ...
Kibi's user avatar
  • 1,918
1 vote
2 answers
1k views

setExactAndAllowWhileIdle with Wakelock in Doze mode

It seems there are a few questions related to the subject topic but I haven't found a clear yes/no answer to this. I have a foreground service that calls setExactAndAllowWhileIdle to start a ...
Xeno Xetric's user avatar
0 votes
0 answers
63 views

Wakeup lock is not working in android mobile app

My wakeup lock is not working in android. I have used below code:- PowerManager powerManager = (PowerManager) this.getSystemService(POWER_SERVICE); PowerManager.WakeLock wakeLock = powerManager....
Archana's user avatar
  • 11

15 30 50 per page
1
2 3 4 5
36