in my app i use the TYPE_STEP_DETECTOR. I want to detect steps when screen is off. But the sensor TYPE_STEP_DETECTOR does not work when the screen is off. So I use PowerManager/WakeLock to make the CPU not hibernate. But it STILL not work.
sensor TYPE_STEP_DETECTOR is not working when screen is off
126 Views Asked by miral At
1
There are 1 best solutions below
Related Questions in ANDROID
- Creating global Class holder
- Flutter + Dart: Editing name of a tab shows up a black screen
- android-pdf-viewer Received status code 401 from server: Unauthorized
- Sdk 34 WRITE_EXTERNAL_STORAGE not working
- ussd reader in Recket Native module
- Incorrect display of LinearGradientBrush in IOS
- The Binary Version Of its metadata is 1.8.0, expected Version is 1.6.0 build error
- I can't make TextInput to auto expand properly in Android
- Creating multiple instances of a class with different initializing values in Flutter
- How to create a lottie animation
- making android analyze with coverity sast tool
- Flutter plugin development android src not opening after opening example
- I initialize my ViewModel in the Activity with several fragments as tabs, but the fragments(tabs) return null for the updated livedata
- Node.js Server + Socket.IO + Android Mobile Applicatoin XHR Polling Error...?
- How I can use the shared preferences class?
Related Questions in SENSORS
- How to make this sensor keep taking readings once its when_in_range function has been activated?
- (ros melodic) Lidar odometry is not working well
- access fan and it's speed, in linux mint on acer predator helios 300
- The BH1750 fails to be configured
- msp430f5438a reading multiple sensor tmp117
- Moving Average of a variable frequency signal
- can't configurate VL53l0x api
- CO2 Telaire T6713 Sensor and Raspberry Pi 3B+
- Multiple tcs34725 color sensors on arduino uno
- How to combine Pulse Sensor to send Telegram message with Arduino?
- How to understand the Sensor Setting Property ID in the SIG Mesh model
- Raspberry pi 4, ina219 Bi-Directional DC Current Power Supply Sensor
- Controlling data step in a list in python
- Arduino Serial Software Communication: 2 Ultrasonics
- Decompose time-series signal into different components
Related Questions in ANDROID-SENSORS
- The BH1750 fails to be configured
- Assigning sensor information to image coordinates
- Device pose android emulator rotation values to App
- proximity sensor permission in android app
- I cannot programatically access files on my rooted Galaxy s10+
- Workaround for TYPE_STEP_COUNTER onSensorChanged not triggered in background
- LibGDX camera rotation does not work on Android
- How do I use coroutines in my Kotlin code to read in phone sensor data one by one?
- There is a way to know if other application is using a sensor [Android]
- How to add fixed delay in sensors readings in kotlin?
- Samsung Galaxy Note 9: sensors: wrote an app that reads all sensors, asks for BODY_SENSORS permissions, displays heartrate, how to display SpO2?
- Custom Rotation observer which works like ActivityInfo.SCREEN_ORIENTATION_SENSOR (android:screenOrientation="sensor") in Activities
- How to measure radiation(Non Ionizing) [Android SDK] for a Radiation measuring application
- can someone help me with accessing RGB values on my smart-phone light sensor via Android studio?
- Android Auto Car Sensors: unavailable when testing on a real car
Related Questions in ANDROID-WAKE-LOCK
- When to acquire wakelock for an intent service?
- Monitor WiFi sleep mode events
- is impact of acquiring cpu wake lock increases by no of applications holding it in android?
- How to use getSystemService in widget on android?
- Off screen when the application works
- PowerManager.PARTIAL_WAKE_LOCK android
- Running an android application on top of the lock screen
- Starting android default music player in background
- android.app.job.JobScheduler instead of WakefulBroadcastReceiver usage
- Android Service stop working when android device is sleep
- Android - Wake lock not acquiring properly, app needs to keep running in standby
- Android - How can I wake up the phone from a hard sleep to take a picture?
- Android Power Manager Wake Lock
- WakeLock doesn't always release
- Code gets stuck at acquiring wake lock while registering with GCM
Related Questions in SENSORMANAGER
- The method onPause( ), onResume( ) is undefined for the type
- Get device angle by using getOrientation() function
- How to know Android OS mobile is landscape or portrait when orientation fixed to portrait in manifest file
- Remapping coordinate system in Android app
- Turn Over - Orientation Sensor in Android
- Cannot resolve method 'registerListener(com.xxx.xxx.MainActivity, android.hardware.SensorManager, int)'
- Andengine SensorManager Error
- sensorManager method - Unable to resume activity
- Android - Getting MotionSensor fails (NullPointer)
- My Android App is crashed when I register SensorManager.registerListener
- Android on Sensor Changed , Notification Created , but can't control notification
- Get android sensor data only if another app asks for it
- Android onSensorChanged(SensorEvent event) - Pedometer sensor (Nexus 5)
- How to detect my screen orientation in portrait locked screen in android?
- How to measure radiation(Non Ionizing) [Android SDK] for a Radiation measuring application
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
You did't show how is your code show, but I have small code worked on my devices so I will share for you. These case worked perfect with my phone: oppo a55 a12, redmi note 7 a11, poco x3 pro a13:
at Manifest:
Ask permission first
Then use my class for listen code from sensor service
How to use code above:
Finally, shake you phone multiple time and see log . Hope this help.