-
-
Notifications
You must be signed in to change notification settings - Fork 268
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ShakeDetion should work in background #52
Comments
This can not be done anymore, from Android 9 onwards. Read more: https://developer.android.com/about/versions/pie/android-9.0-changes-all#bg-sensor-access |
There is also written like:
|
True, but that is not an implementation I see being bundled in the library. Activity/Services are not supposed to be bundled. They are a client side implementation. The goal of Sensey has always been to be able to simplify detection of Gestures, how and where it is needs to be detected is an app developer decision. Why is that the case? Because these things change and putting it inside the library means that the library will be outdated when Android decided to make that change. For instance Sensor data was readable earlier in background but not anymore. If I had implemented that change of bundling a Service to handle this, I would have to handle changes across API versions. This is what I would not like to do. The idea is to abstract the hard part. Putting the listener inside a Service in foreground or in a job for WorkManager is normal Android development, figuring out the algorithm to detect a particular gesture is not. This is why Sensey has always focused on that part, making sure the gesture detection is simplified. |
Yeah, you are right. This is really great library. Thank you @nisrulz for your time. |
Do you want to request a feature or report a bug?
Feature
What is the current behavior?
ShakeDetection is working when app is open. I want it even though app is killed.
If the current behavior is a bug, please provide the steps to reproduce.
Any logs, error output, bugreport etc?
What is the expected behavior?
Any other comments?
Please help to work with Shake Sensor in Background too.
What versions of software are you using?
Device Information:
Samsund Galext J8
Android Version:
Android 9.0
The text was updated successfully, but these errors were encountered: