|
Post by fnllc on Apr 15, 2018 1:22:15 GMT
There is a new behavior in Android 8 preventing Rhodes from getting GPS updates when the app is in background or screen off. This is affects any app running on Android 8 regardless of target sdk. developer.android.com/about/versions/oreo/background-location-limits.htmlI’m investigating on how to add a foreground service to my app. My app lets users record a track. Now the recording stops when the screens turns off. Anyone has found a solution?
|
|
|
Post by Alex Epifanov on Apr 16, 2018 15:52:14 GMT
It is not supported out-of-the box currently. The possible solution may be a native extension running a foreground service.
|
|
|
Post by fnllc on Mar 18, 2020 19:31:36 GMT
Android Docs have a nice example of how to implement a foreground service to receive location updates when the app is not in the foreground (screen off for example. codelabs.developers.google.com/codelabs/while-in-use-location/index.html#0Does anyone have any tips on how to get started implementing this into Rhomobile? My Android skills are nearly inexistent and I don't know where to even begin to modify Rhomobile to get this to work.
|
|
|
Post by Dmitry Soldatenkov on Mar 18, 2020 20:39:04 GMT
Hi, Currently we do not planned support it by self. but we can make it for you for the price.. I make brief research in Internet and I think may be if you add this line into android manifest, then may be background updated will receive. But it should be tested. Line: <uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION"/> P.S. you can generate new native extension in your project by this command: rhogen extension MyExtension So rhodes will generate full compilable and workable code with short example (ruby controller etc.) You can see that code and modify it. Follow this documentation: docs.tau-technologies.com/en/7.1/guide/native_extensions
|
|