every_door icon indicating copy to clipboard operation
every_door copied to clipboard

Location is not updated with Google services disabled

Open Atrate opened this issue 2 years ago • 8 comments

Device info: OS: DivestOS 19, Android 12 Location services: GPS only, no GNSS/Wifi App version: 0.3.0 from Google Play

Problem description:

After I upgraded my phone from A11 to A12, ED can't seem to get a location lock. Wiping application data makes ED get one lock, but no more than that, no matter how many times the app is restarted.

Everything worked without a problem on Android 11.

Other GPS-using apps work well, such as OSMAnd.

I can provide a logcat capture if that's useful.

Atrate avatar May 16 '22 05:05 Atrate

Possibly related to #106.

Zverik avatar May 16 '22 06:05 Zverik

Does not seem to be fixed in 0.4, from my testing.

Atrate avatar May 23 '22 07:05 Atrate

Thanks Atrate. I guess I'll replace the geolocation library for 0.5.

Zverik avatar May 23 '22 08:05 Zverik

A workaround is to force another application to use GNSS in the background, for example, record a track in Osmand.

freeExec avatar Jul 27 '22 16:07 freeExec

Must be fixed in 0.9, please check.

Zverik avatar Aug 06 '22 19:08 Zverik

Looks like this all is an upstream issue:

  • https://github.com/Baseflow/flutter-geolocator/issues/1114
  • https://github.com/Baseflow/flutter-geolocator/issues/1027
  • https://github.com/Baseflow/flutter-geolocator/issues/667
  • https://github.com/Baseflow/flutter-geolocator/issues/507

I might have to change the library.

(see also https://github.com/Open-Source-Agriculture/soil_logr/pull/46)

Zverik avatar Aug 09 '22 09:08 Zverik

Must be fixed in 0.9, please check.

Not fixed, unfortunately

Atrate avatar Aug 14 '22 09:08 Atrate

Hi from Ecuador, We're facing the same issue. We are waiting for a fix on this, thanks in advance.

blubearec avatar Aug 18 '22 16:08 blubearec

Progress report: last weekend I:

  1. Confirmed that GPS does not work in the geolocator_android library (that I'm using) versions 3.0.4, 3.1.8, 4.0.2. I could not build 2.1.0, but it's too old anyway.
  2. Rewrote geolocation to the location library version 4.4.0. Raw GPS still does not work, and it seems that version was built around Google services. But with Google services, location updates are more frequent than before. Will try 5.0.0-dev.8.
  3. Tried to find a third geolocation library, failed.

I have a suspicion that there's something wrong with my location flow or library dependencies. Will also try building a minimal app to test these two libraries from the scratch.

Zverik avatar Oct 03 '22 11:10 Zverik

Tried to find a third geolocation library, failed.

@Zverik what about using a library that StreetComplete or Vespucci or OSMand use? They work fine without Google.

Atrate avatar Oct 09 '22 17:10 Atrate

I would love to use their solutions, but all of these are native Android apps, while Every Door was written in Dart / Flutter. But maybe I could use something in the android part of the geolocation library.

Zverik avatar Oct 11 '22 08:10 Zverik

Okay, I give up for now. This requires a lot of in-depth knowledge of Android geolocation programming. I welcome any help with this source code.

For a bypass, I'm doing #281 and #453.

Zverik avatar Oct 16 '22 19:10 Zverik

That's pity, I really like the app after trying it for the first time today, but have to kill it all the time to get new location. LOS 19.1 without any gapps.

mahdi1234 avatar Oct 23 '22 12:10 mahdi1234

If anybody finds a Flutter-based app with geolocation that works without Google services, I could use that as well. To me it seems like every location library is broken. On the positive side, it concerns only Android 12+.

Zverik avatar Oct 23 '22 13:10 Zverik

Hi Ilya I have briefly discussed this in small matrix community and they had some ideas about code, if you'd like to join you're all welcomed at https://matrix.to/#/#flutter-devs:matrix.org

disclaimer: I myself am not a dev, just user.

mahdi1234 avatar Oct 24 '22 10:10 mahdi1234

I think installing https://github.com/microg/FakeStore fixed the issue for some reason? I do not have microg installed, though, so it's quite weird, maybe an Android update fixed it instead?

Atrate avatar Jul 22 '23 10:07 Atrate

Looks like it was fixed! (see 4.0 beta)

Zverik avatar Oct 02 '23 15:10 Zverik