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

Location in background does not work #30

Closed
heinrichmartin opened this issue Feb 21, 2019 · 2 comments
Closed

Location in background does not work #30

heinrichmartin opened this issue Feb 21, 2019 · 2 comments
Labels
bug Something isn't working
Milestone

Comments

@heinrichmartin
Copy link
Contributor

heinrichmartin commented Feb 21, 2019

Version 1.1.1.

Location updates work fine if the app is not in the foreground.
Location updates do not work when the app is closed.

Bug:
WHEN I close the app
THEN the GPS indicator icon on the mobile blinks (disappears and re-appears)
AND no location updates are available on the server

Additional requests were split to #31 and #32

@robo-w robo-w added the bug Something isn't working label Feb 21, 2019
@robo-w
Copy link
Contributor

robo-w commented Feb 24, 2019

In Android versions <8 closing the app results in killing the process. Afterwards the service is spawned again:

02-24 11:52:53.525  9820  9820 I mono-stdout: Unregistering a location listener.
02-24 11:52:53.538  9820  9820 I mono-stdout: Unregistering a location listener.
02-24 11:52:53.544  9820  9820 D MainActivity: Main activity is being destroyed.
02-24 11:52:53.564  2057  2358 I ActivityManager: Killing 9820:at.wrk.fmd.cocemocl/u0a122 (adj 1001): remove task

02-24 11:52:54.618  2057  2090 I ActivityManager: Start proc 16568:at.wrk.fmd.cocemocl/u0a122 for service at.wrk.fmd.cocemocl/md53a7486b6668aea23782ebe21fa502cec.AndroidLocationService
...
02-24 11:52:56.500 16568 16568 D AndroidLocationService: Android specific location service was created.
02-24 11:52:56.548 16568 16568 I LocationProviderFactory: Google Play Services is installed on this device. Will be used as location provider.
02-24 11:52:56.668 16568 16568 D AndroidLocationService: LocationService received start command
...
02-24 11:53:01.218 16568 16568 I mono-stdout: Got 0 location listener instances to inform about updated location.

Cause:
RestService singleton is registered as location listener in the startup of the App.cs. This needs to be changed to static initialization, which is also called on service-only startup.

@robo-w robo-w added this to the Version 1.1.3 milestone Feb 24, 2019
@robo-w
Copy link
Contributor

robo-w commented Feb 27, 2019

fixed with version 1.1.3

@robo-w robo-w closed this as completed Feb 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants