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

Running in background does not work #61

Open
leonardoayres opened this issue May 28, 2020 · 8 comments
Open

Running in background does not work #61

leonardoayres opened this issue May 28, 2020 · 8 comments

Comments

@leonardoayres
Copy link

Hello,

I've tried your package expecting to run it in background, but unfortunately it does not work. The example app runs fine while active (printing the logs), and when the Track option is activated and the app lost focus, the log stops to print.

p.s.: i've changed the parameter inBackground from false to true to suposely activate the background service, but no luck with it.

@freddy-nawfal
Copy link

Same here, it works on Android but not on iOS apparently

@imhafeez
Copy link

any update on this? Can someone suggest a plugin which track location updates in the background on iOS?

@leonardoayres
Copy link
Author

@imhafeez you can try the background locator (https://pub.dev/packages/background_locator).

@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>

@leonardoayres
Copy link
Author

@jeanantoine any success with Android or your environment is only iOS?

@ghost
Copy link

ghost commented Jun 17, 2020

I want to use both Android and IOS, but I have no time for the moment on Android.

@NemanjaLugi
Copy link

Same issue

@ghost
Copy link

ghost commented Jun 25, 2020

@NemanjaLugi

Same issue
On IOS ?

It works on IOS with:
xcode: Version 11.5 (11E608c)
IOS: 13.5 on emulator or iPhone 7 plus
Android studio: 4.0
flutter: flutter_macos_1.17.3-stable

with the modifications in my first post in this thread.

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

4 participants