wrk-fmd / CoCeMoCl

Coordination Center Mobile Client
MIT License
1 stars 0 forks source link

Location not shown #26

Closed heinrichmartin closed 5 years ago

heinrichmartin commented 5 years ago

App 1.1.0 Android 6.0.1 Permissions Camera, Location, not Storage (never asked)

The app asked for Location permissions. The location icon appears when the app is started. However, the location seems not to be available to the app. Neither restarting the app nor the mobile fixes this. Other apps (google maps, Stadt Wien live) show the correct location.

Request for status indication (see #2). Review consistency with other apps.

fs1 commented 5 years ago

can't reproduce this - Android 6.0.1 with GeoClient 1.1.0 shows the position in the "über/Einstellungen"-view once it knows it.

fs1 commented 5 years ago

Okay, one thing is coming up right now: Maybe your phone (e.g. google maps) knows your location because of wifi- and cell data, your gps receiver has no current position though. I don't know how GeoClient would handle this situation. @robo-w do you know?

heinrichmartin commented 5 years ago

As discussed offline, it works fine outdoors and on buses. It does not work on the train (RJ from Meidling to HBf, track on the surface) and not in the building (not even when the mobile is next to the window).

Besides, the current method to retrieve location data operates worse than the one in the browser (geoclient), i.e. when moving, the browser shows markers in this order along the path with some spacing (even at walking speed): own position, own unit (through the server), app unit.

Geoclient uses highAccuracy, default timeout of 10s, but it uses watch instead of get (geolocation-api). Maybe that makes the difference (i.e. let the location service determine the interval of location events)? If so, do not forget to poll the scope from the server, even if no new location is provided.

robo-w commented 5 years ago

The app uses the best matching location provider by the criteria (currently "high accuracy"). Then we subscribe for location changes on this subscriber:

private void StartLocationUpdates()
{
    var locationProvider = GetLocationProvider();
    _locationManager.RequestLocationUpdates(locationProvider, MinimumElapsedTimeInMilliseconds, 0, this);
    Log.Debug(LoggerTag, "Service is registered for location updates.");
}

It might be the problem, that we do not switch to a different provider, if this one does not provide any data. According to the logs fetched from different devices, we usually stick to "gps" only.

Fetching the scope is done completely separate, it is not combined with the location sending. It is only fetched on appearing of the page (everytime you navigate to the list view) and on manual refresh. We might add a timer while the page is open in one of the next releases, if it is necessary.

heinrichmartin commented 5 years ago

We might add a timer while the page is open in one of the next releases, if it is necessary.

I mixed up things (from a draft version of the geobroker API). The timer becomes necessary, when alarm notification is implemented.

robo-w commented 5 years ago

@heinrichmartin: Can you please check if this is resolved with version 1.1.2 on your phone?