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

Does it work if the app is closed ? #57

Open
mhassanist opened this issue Feb 18, 2020 · 5 comments
Open

Does it work if the app is closed ? #57

mhassanist opened this issue Feb 18, 2020 · 5 comments

Comments

@mhassanist
Copy link

"Flutter plugin for location / geolocation / GPS. Supports iOS and Android. Multiple settings for speed, precision, battery optimization, continuous updates in background "

In background here means we can keep updates even the app is not in foreground (closed may be by the system or when click back).

@angel-r
Copy link

angel-r commented Feb 19, 2020

+1

@GadepalliAditya1998
Copy link

I guess it wont work, because its not requesting for background location permission and its not even using any background service codes specific to platform. it works in background according to flutter, but will stop updates as soon as the app is closed.

@radvansky-tomas
Copy link

Tried on iphone 11, latest iOS, no background updates!

@RomanJos
Copy link

It doesn't work with

<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />

@ghost
Copy link

ghost commented Jun 16, 2020

For background processing on IOS, it works when adding:
locationManager.allowsBackgroundLocationUpdates = true

in:
geolocation/ios/Classes/Location/LocationClient.swift

class LocationClient : NSObject, CLLocationManagerDelegate {
.......
.......
override init() {
    super.init()
    locationManager.delegate = self
    locationManager.allowsBackgroundLocationUpdates = true   // <---
  }

and adding in:
ios/Runner/Info.plist

<key>UIBackgroundModes</key>
	<array>
		<string>location</string>
	</array>

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

5 participants