Skip to content
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

Oreo background limitations #179

Open
carbonaro opened this issue Dec 27, 2017 · 9 comments
Open

Oreo background limitations #179

carbonaro opened this issue Dec 27, 2017 · 9 comments

Comments

@carbonaro
Copy link

As per https://developer.android.com/about/versions/oreo/background-location-limits.html the FusedLocationProvider's behaviour has been significantly affected on Oreo :

Fused Location Provider (FLP)

If your app is running in the background, the location system service computes a new location for your app only a few times each hour. This is the case even when your app is requesting more frequent location updates.

By using the batched version of FLP, however, you have access to more time-frequent location history after your app receives a batch update, which also occurs only a few times each hour.

If your app is running in the foreground, there is no change in location sampling rates compared to Android 7.1.1 (API level 25).

My app needs to receive more frequent update than that ; the documentation page suggests the following :

Start a foreground service in your app by calling startForegroundService(). When such a foreground service is active, it appears as an ongoing notification in the notification area.

Is it possible to implement that with Android-ReactiveLocation ?

@lollipierre
Copy link

I was about to raise a similar issue. Oreo limitations when doing location in the background are quite annoying, and I really hope we can continue using this lib :(

@cyrixmorten
Copy link
Contributor

cyrixmorten commented Dec 27, 2017 via email

@carbonaro
Copy link
Author

Fair enough - how would you go about this? I must admit I am a still a little bit confused about Oreo's changes right now.

@cyrixmorten
Copy link
Contributor

cyrixmorten commented Dec 27, 2017 via email

@Lir10
Copy link

Lir10 commented Dec 28, 2017

@cyrixmorten @carbonaro Have been tested Activity Recognition with Foreground service and it's working fine on Oreo.
i'm guessing it's the same with fusedlocation.

Foreground service is the same logic as regular services you just need to add the notification builder and when you start the service startForegroundService()

@carbonaro
Copy link
Author

@cyrixmorten, @Lir10 thanks for the feedback.
I'll work on a Foreground service implementation for Activity Recognition.

@Shu1111
Copy link

Shu1111 commented Feb 19, 2018

Have any idea how to keep getting Wi-Fi samples every few minutes in Oreo (without the background service and without the foreground service)?

@cyrixmorten
Copy link
Contributor

cyrixmorten commented Feb 19, 2018 via email

@muradmohdzain
Copy link

creating a Foreground service would be annoying to some users as they will see the notification in the status bar. I also experienced that oreo displayed a wierd behaviour when i turn on the gps compared to nouget. I monitored this in my app widget. In oreo you have to wait a few minutes in order to see the location updates but in nouget the location will updated immediately after you turn on gps. To get the location updates immediately in oreo i have to open the application (what an annoying to do). So how to solve this problem in oreo without opening the application ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants