martin-braun-net / google_maps_place_picker_mb

Place picker on Google Maps for Flutter
https://pub.dev/packages/google_maps_place_picker_mb
MIT License
33 stars 97 forks source link

current location not working #52

Closed sajjatdev closed 1 year ago

sajjatdev commented 1 year ago

current location not working

Notice by @martin-braun:

If you experience similar problems, please install 3.0.0 until this problem is fixed.

martin-braun commented 1 year ago

Could be any issue on your end. I.e. missing APIs, not setting up a location in your Simulator, etc. Please follow the instructions and post your logcat and device if this won't help. Maybe you understand the root cause by reading the logcat by your own, it's often trivial.

rehamalraee24 commented 1 year ago

same here

Sparks1998 commented 1 year ago

You have removed the get location code from the place_provider.dart => updateCurrentLocation method

martin-braun commented 1 year ago

@Sparks1998 We replaced FlutterLocation with Geolocator in #51. Please share the output of flutter doctor -v and tell me what you are testing on (Android Emulator, Apple Simulator, Device?). Some logs (logcat, device logs) are also helpful.

@giorgio79 Location service is working fine for you on Android / iOS?

giorgio79 commented 1 year ago

Yes works just fine. Have it in production for thousands of users.

martin-braun commented 1 year ago

@giorgio I'm testing with the example app in the Android Emulator and Apple Simulator and the current location indeed can't be load on my end. Have you tested your changes in Simulator / Emulator by configuring a custom location in its settings?

Could you please take a look by running the https://github.com/martin-braun/google_maps_place_picker_mb/tree/dev/example project? I haven't touched my Google Cloud configuration and it still looks good to me. These APIs are still active and used on the demo project:

@sajjatdev @rehamalraee24 @Sparks1998 Downgrade to 3.0.0 in the meantime.

giorgio79 commented 1 year ago

Travelling at the moment for two weeks with limited internet. I tested with simulator, device and various locations. Havent played with the example app! Any specific error messages? If none, its probably a permission issue. PS Location package is dead, so downgrading will most likely cause plenty of other issues... https://github.com/Lyokone/flutterlocation/issues

martin-braun commented 1 year ago

@giorgio79 Np, and yes, downgrading is not an option. I just wanted to point out that's an option for everybody who uses this package and experiences the same problems. I'm still very busy on a project, but maybe I can tackle this before you are back. Enjoy your trip. :)

giorgio79 commented 1 year ago

Thx Martin! :) I am pretty sure this is a permission request issue. In my app I request that separately from this package on the first screens like Tinder... Using the copy paste geolocator code here https://pub.dev/packages/geolocator Probably that is why it worked for me just fine. Might be a good idea to offload that task from this app 😊 It's probably courteous to the user to warn them you are about to grab their location.

martin-braun commented 1 year ago

@giorgio79 You nailed it, thanks for the input. Yes, the map picker asked for permission, previously. This needs to be brought back to the module itself. It was solved in a way that it would only ask for permission, when it didn't get permission already.

martin-braun commented 1 year ago

Should work now.

OVOgenez commented 11 months ago

When the location service is disabled, permission is not requested to enable it (it is only checked, and if it is missing, it returns an error).