microg / GmsCore

Free implementation of Play Services
https://microg.org
Apache License 2.0
8.6k stars 1.72k forks source link

Place Picker doesn't work #287

Open drmrbrewer opened 7 years ago

drmrbrewer commented 7 years ago

My app is compiled with the latest versions of the Play services libraries, and makes use of the Place Picker and Place Autocomplete.

I have a user who reports that the Place Picker doesn't work as expected with microg. It's difficult to provide much detail, as I don't have microg myself, but is this a known issue? If I revert to an earlier version of Play services in my app then Place Picker apparently works fine (9.6.1 I think is OK).

ale5000-git commented 7 years ago

@drmrbrewer: I think it would help if you provide your app or another app that have the same problem.

drmrbrewer commented 7 years ago

@ale5000-git it's this one. Place a widget on the home screen, and in the widget settings page, click on the Location heading to open up the location settings, then click on the Text button for a Place Autocomplete or on the Map button for a Place Picker. Apparently neither work. It seems that the Place Picker map dialog appears, but the user cannot actually get any coordinates other than the default location to be returned. See attached screenshot from them.

screenshot_20170128-172109

mar-v-in commented 7 years ago

@drmrbrewer can't you move the map to choose a different location and then touch the "select this location" button (it doesn't look like a button because of the theming...)?

drmrbrewer commented 7 years ago

@mar-v-in the Place Picker interface works fine on my own test devices, because I'm not running microg. So I'm relating a user's problem second-hand here. From their screenshot, it seems from the "Can't load nearby places" that the Place Picker (provided entirely by Google of course) isn't working as it should. And they can't seem to get any coordinates to be returned (to the location page of my app) other than for the default location.

Does it work for you? Presumably you're running microg, right?

mar-v-in commented 7 years ago

You can not select POI from nearby places in microG so far, only by directly pointing on them using the map.

drmrbrewer commented 7 years ago

So "Select this location" (see screenshot) should work?

mar-v-in commented 7 years ago

Yes.

drmrbrewer commented 7 years ago

OK I'll inform the user and check whether it does work or not.

What about the text-based autocomplete lookup (from the Text button in my app)... does that work OK for you?

mar-v-in commented 7 years ago

No, text based autocomplete won't work, Places functionality is missing, other than the location picking (= not place picking)

drmrbrewer commented 7 years ago

Ah OK. Any plans in place to make autocomplete work? I'm pretty sure this user was reporting that it was working fine when I was using play services 9.6.1. And what do you mean by location picking vs place picking?

mar-v-in commented 7 years ago

There are no difference with this in older versions I am aware of.

Location picking means that the returned "place" object is not populated with informative fields (proper name or address), which would be the case when using original play services. For a weather app this should not make a huge difference if you use the location values (latitude+longitude).

drmrbrewer commented 7 years ago

Ah I see. Yes latitude and longitude is all that is really needed to get basic functionality in my app (better to have place name etc but not essential).

So with the map-based location picker, what information is returned into the place name etc fields of my location section? If I can detect that valid info isn't present on return from the place picker, I should be able to do a geolocation lookup based on lat long. Maybe.

ale5000-git commented 7 years ago

@mar-v-in: Maybe I have misunderstood something but isn't the task of Nominatim Geocoder Backend to return the "proper name or address"?

xnisyaj commented 7 years ago

Hi, i'm having the same issue. I cant pick places in any app since i installed MicroG. Any app that require Place Picker just don't let me long-press for selecting a location. Long-press just don't do anything. I can find any error on Logcat.

mar-v-in commented 7 years ago

@xnisyaj you need to move the map under the pinpoint so that the pinpoint points to the location you want to share. Then touch "select this location" to use it.

xnisyaj commented 7 years ago

@mar-v-in the pinpoint in that apps is not shown until you long-press. And since i can't long press, the pinpoint is never shown. I tried it on a lot of apps (fake gps apps, gps alarm apps, etc) and it's not working in any of it. The only working app is "com.lexa.fakegps" that have, like you said, a fixed pinpoint on the center. And i can press "select this location".

mar-v-in commented 7 years ago

ah, ok you're talking about a completely different problem: This is about the place picker, a component provided by microG directly.

The apps you mentioned use the maps api to build their own place picker. Can you please open a new issue about maps api not supporting long press listeners, stating at least one app that does not work (with full package name). Thanks.

OhSoGood commented 7 years ago

Hi, I hope I do not hijack the thread. A free app I'd like to use, ChargeMap, throws an exception with this logcat message when I click on its search button: No Activity found to handle Intent { act=com.google.android.gms.location.places.ui.AUTOCOMPLETE pkg=com.google.android.gms Is that the same issue as stated above? Any change to solve it?

woj-tek commented 5 years ago

I just got that with DarkSky weather app: 12-05 12:13:26.964 3445-15940/? I/ActivityManager: START u0 {act=com.google.android.gms.location.places.ui.AUTOCOMPLETE pkg=com.google.android.gms (has extras)} from uid 10127 on display 0 12-05 12:13:26.971 26660-26660/? W/EventBus: Subscriber to unregister was not registered before: class net.darksky.darksky.ui.f Subscriber to unregister was not registered before: class net.darksky.darksky.ui.f Subscriber to unregister was not registered before: class net.darksky.darksky.c.f

It's most likely related to #577 and #358. Are there any plans to add support for it?