Questions tagged [screen-off]

58 questions
3
votes
1 answer

How to continue monitoring iBeacon when screen is off in iOS?

I am developing an iOS app to monitor iBeacons. It works well in both foreground and background. I also need it to keep monitoring even when the screen is off. Now my problem is, when I turn off the screen with the shoulder button, NSLog shows that…
kuang
  • 309
  • 1
  • 11
2
votes
0 answers

Screen ON/OFF receivers on a service and battery life

I'm new to Android and Java programming, so I would like to clear up couple of questions I have. I've written a background service that verifies something every 10 seconds, and, based on some conditions, it may execute something (or may not). This…
Alex
  • 2,213
  • 4
  • 32
  • 44
2
votes
2 answers

How to detect iBeacon in iOS app when screen is off?

Still fighting with iBeacon monitoring for screen-off mode in my iOS app. In my experiment, when the screen is turned off, the delegate method "locationManager:didRangeBeacons:inRegion:" is still triggered continuously, but, as soon as the screen is…
kuang
  • 309
  • 1
  • 11
2
votes
0 answers

Android - Unwanted delay with screen off

I'm developing an android program in which I am using a service to capture data from the accelerometer. I used the wakelock to continue capturing data even with the screen off. Also a TimerTask to ensure that the data will be read every 50…
1
vote
0 answers

Is it possible to collect accelerometer data on android while the screen is off?

My project requires that an android application be able to collect accelerometer and gyroscope data and perform some calculations. It works while the screen is on, but as soon as the screen turns off, all data stops printing in my logcat. I've read…
Mob
  • 11
  • 2
1
vote
0 answers

I am not able to change Battery Optimisation settings after enabling App as device admin

I have an alarm app which requires to changes battery optimisation settings. Steps to change battery optimisation settings: When App opens it redirects user to Battery optimisation page Selects all apps, search for my Alarm App Click App and select…
Pradip Tilala
  • 1,715
  • 16
  • 24
1
vote
3 answers

Is it possible ?, the application gets location data latitude and longitude, android system can not kill it, and it works when the screen is off?

my device to test is huawei Is it possible for the android application to work even while the screen is off? In my application does not work: - wakefullbroadcastservice + alarmmanager, - service + alarmmanager, - gps settings old method and new…
1
vote
1 answer

Properly stop a service when the binding activity is killed by recent apps

I have a bound service playing sounds with Soundpool. It works normally if the app exits normally (using back button). However, when the app is killed by the recent app, in the next run, the service (sound) behaves abnormally, especially, when the…
1
vote
1 answer

SCREEN_OFF BroadcastReceiver is not working

This is my code. public class MyActivity extends Activity { ... @Override protected void onStart() { super.onStart(); IntentFilter intentFilter = new IntentFilter(); intentFilter.addAction("com.my.ACTION"); …
Hyeonil Jeong
  • 228
  • 3
  • 13
1
vote
1 answer

Windows C++ screensaver not turning screen back on

I am trying to create windows screensaver that turns monitor on and off depending on face detection. Here is the esential code (c++ and winapi): #define TIMER 1010 unsigned int FREQUENCY_OF_CHECK = 5000; LRESULT WINAPI ScreenSaverProc( HWND…
luda
  • 11
  • 3
1
vote
0 answers

iPhone Screen turns on again after using proximity sensor

I am currently working on a new Alert App. The user will act like that: Set an alarm -> Press start -> Place the iPhone on the screen In my app I am using [[UIDevice currentDevice] setProximityMonitoringEnabled:YES]; to use the proximity sensor.…
Sn0wfreeze
  • 1,959
  • 3
  • 18
  • 32
1
vote
1 answer

Save current battery level when locking screen not working

I'm trying to save the current battery level when the user presses the power button (--> screen off). At first I'm having a broadcast receiver which starts whenever the phone boots. It's task is to start a service, which creates another broadcast…
Toni Kanoni
  • 2,265
  • 4
  • 23
  • 29
0
votes
0 answers

Keep app running when Screen turn off with UWP app and Kiosk mode

We have a UWP app that runs on Windows Kiosk Assigned Access Mode. We want to turn off the screen during the night when no one is using the device. We are encountering some difficulties. When we turn off the screen with command. The app is stopped,…
0
votes
0 answers

UI stops when alertdiolog pops up from screen off in Android

I am continuously receiving data with tcp socket. This is the code to reconnect if the socket is disconnected. In the service class, check if the socket state is disconnected. If the socket is disconnected, an alertdiolog pops up on the UI and…
kyesia
  • 25
  • 3
0
votes
0 answers

Android Compose on button click go to sleep (turn screen off)

Like title said how to on click button to go system sleep, to turn off screen? got this kotlin code: @Composable fun ButtonOnClickGoToSystemSleep() { // Fetching the Local Context val localContext = LocalContext.current Button(onClick =…