Teester / Whats-Nearby

Android App for collecting information about POIs for OpenStreetMap
GNU General Public License v3.0
13 stars 2 forks source link

App shows no result when walking in a city full of POI #3

Closed stephan75 closed 6 years ago

stephan75 commented 6 years ago

When having the latest version of the app on my phone, I walked through a city in north of Germany. Of course having mobile data on and GPS on, and logged in with OSM credentials ...

but there is absolutely no result of Whats-Nearby app about missing OSM tags.

So I fear that something goes wrong, but I cannot figure out the reason.

Can you include a debugging display inside the app (as long as it is in beta testing) that shows whether the app has GPS coordinates found, and that a query has been sent to overpass-api, and what is the result of it?

Ans maybe a feature to clear the loaded data from overpass-api, thus it is refreshed automatically or by user's choice?

zossebart commented 6 years ago

I can second this observation. Up to an earlier version (don't know exactly which), the app worked (except for some aborts) but now I don't get any questions anymore when visiting shops etc.

Teester commented 6 years ago

It's nice to see people interested in the app!

@stephan75 What version of Android are you using? It's possible there are issues with Nougat or Oreo since there were limits put in place regarding location updates in those versions. Unfortunately, I only have Lollipop and Marshmallow devices to test on, so I haven't seen the problem up to now.

@zossebart How long has it been since you got a notification? And have you been to new places, or only the same places as previously? The app will not notify you if it detects you at a location which you visited in the previous week. It's possible you've just run into this.

In general, some sort of debug display sounds like a good idea. I'll be working on it for the next version.

Teester commented 6 years ago

See issue #4 for debug display.

zossebart commented 6 years ago

I think I got the last notification ca. 2 weeks ago. And yes, I've been to different places since then. Looking forward to the debug display enhancement to sort this out!

zossebart commented 6 years ago

Ok I got questions again today. I think you were right...

Teester commented 6 years ago

@zossebart Great news.

Debug display is nearly ready, though it may need a couple of iterations to refine what information is useful.

stephan75 commented 6 years ago

With fresh release of 0.11 I am able to see debug screen ... Many thanks!

But it seems that the app gets no gps position, although other apps like gps toolbox show a correct position. Ovepass query is 50000000 minutes ago ...

Can you include debug display about gps position, maybe with information why it fails?

Teester commented 6 years ago

What device and android version are you using? I may be able to replicate the issue with an emulator.

Regarding the debug screen, I didn't want to include the precise location for privacy reasons, but it could be useful, so I'll add it in.

The debug data only updates from when 0.11 was installed. Earlier data is not available, so the info may change after a few hours of use. Items are red or green depending if the required criteria are met for performing an overpass query.

Can you attach a screenshot of the debug screen as well?

stephan75 commented 6 years ago

screenshot_2018-02-23-17-59-42 This is on a moto G peregrine with android 5 after fresh app reinstallation.

Teester commented 6 years ago

I wonder if the background service is running at all? Can you check settingsappsrunning appsWhat's Nearby? You should get a screen like this:

screenshot_2018-02-23-20-51-01

Can you check if com.teester.whatsnearby.lost is running? This is the service that monitors location in the background. This screen is from a Nexus 4 running Android 5.1, so hopefully it's the same on your Moto G.

stephan75 commented 6 years ago

Screen with running services has same content on my device ... So seems ok.

And I have now almost all values green in debug screen, except of distance since last query wich shows 1m in red.

Will try to move around today to trigger a new query

stephan75 commented 6 years ago

Have been moving around, but at least one value in debug screen stays red ... screenshot_2018-02-26-21-31-19

And i have the impression that the app has never done a query to overpass api at all

So still no succes in using the app ... What can I do?

Teester commented 6 years ago

It's strange that the location accuracy is so poor. Currently, it's saying that it can only guarantee your location within 2.6km of what it measures. The app only performs a query if the accuracy is within 100m. This is to try and ensure that the queries produce useful responses. A 2.6km accuracy could make the phone think you were is a different suburb of a city than you are, when we need street level accuracy.

It's possible that the fact the app is requesting locations in the background, rather than the foreground, is affecting the accuracy. What are the location settings on your phone? Go to settingslocationmode. For the app to work well, High Accuracy should be selected. Other options may not give enough accuracy to trigger a query. I need to investigate this further.

Version 0.12 is now available, which will show your latitude and longitude as well as accuracy. Accessing the debug screen is now done through an overflow (3 dots) menu.

stephan75 commented 6 years ago

I updated the app to 0.12 ... and for location mode setting, high accuracy was choosen all the time.

Coordinates are displayed well, they fit to my actual position.

But in this moment i am writing these words, I turned data connection via LTE off, and turned on WLAN, and accuracy gets to 20m in green!!! yeah!

And I see that the app has finally queried the overpassAPI ... the very first time!

Result seems to be empty, because no POI is around here where I am at this moment.

Now I turned off WLAN, and accuracy raises to raises to 1400m or 1700m ... quite strange!

So why not have a setting in the app about location request in background OR alternatively in foreground?

stephan75 commented 6 years ago

I had success in getting my first notification from Whats-Nearby!!!!

But ONLY with GPS sensors on AND WLAN on ... (but without logging in to any of the WLAN accesss points around)!

This means to me: What's-Nearby is only usable for me / my device when having WLAN turned on, next to GPS sensors ... hhmmm.

Any other users with same experience??

Teester commented 6 years ago

This is interesting.

At the moment, What's Nearby uses the PRIORITY_BALANCED_POWER_ACCURACY profile from the location provider to determine location. It should be possible to determine whether wifi is on, and if it is not, use the PRIORITY_HIGH_ACCURACY profile instead. This might give a more accurate result, but it may also have implications on battery usage. However, it is possible that it will make no difference!

I should have an implementation in the next version.

zossebart commented 6 years ago

It happened to me again, too! According to the debug info, there was no overpass query for nearly 8 days now. Also, location accuracy shows 1500m everytime I check the debug screen. I was using navigation software quite often in the last days, so I don't think AGPS data is outdated or something like this. OS is android 5.1.1 on Sony Z1 Compact.

Teester commented 6 years ago

I've pushed version 0.13 to the beta channel, so it should be available in the next hour or two. The location provider has been completely rewritten to use JobSchedulerrather than a service. Hopefully, this should give better performance for Android Nougat & Oreo.

Additionally, I've implemented the location provider profiles as described above. Hopefully it should help and not cause too much battery drain. Let me know if it makes any difference.

Teester commented 6 years ago

Unfortunately, the location provider profiles as implemented has led to battery issues, so I've disabled it in release 0.14. Hopefully I can re-implement it in a less battery draining way.

Teester commented 6 years ago

Version 0.17 is now available on Google Play. I've removed accuracy as a query constraint completely, which, I hope, will allow the app to query more frequently.

There might be an issue with crashing on startup. This is due to using new permissions from OSM. Clearing app data and cache and logging in again should fix the problem.

stephan75 commented 6 years ago

I have tried the 0.17 version, and indeed I was able to see a recent query without having WLAN Wifi in use. Thus I think I can close this issue. Thank for your efforts, Mark!

Teester commented 6 years ago

That's great to hear.

zossebart commented 6 years ago

With 0.17, I also (finally) got notifications after over one month of getting none! However, now they oftentimes seem to be for objects relatively far away. Presumably because low-accuracy location is excepted now?

Teester commented 6 years ago

That's probably correct. I've opened #31 for this problem.