Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

My Location #158

Open
Bestfastfire opened this issue Apr 25, 2018 · 11 comments
Open

My Location #158

Bestfastfire opened this issue Apr 25, 2018 · 11 comments
Assignees
Labels
help wanted pending Pending to solve

Comments

@Bestfastfire
Copy link

How i can take my location? Or is this not possible using this?

@ferranpons
Copy link
Member

Hi @Bestfastfire!

Of course you could take your location using this library! When setting it up and accepting the location permissions it automatically retrieves your location or you could use the "show my location button" that comes with the main activity.
For more info, please read the documentation that is on the readme.md file.

Thanks!

@ferranpons ferranpons self-assigned this Apr 25, 2018
@Bestfastfire
Copy link
Author

Sorry kkkk, I thought lib was just for scoring locations, I ended up asking a dumb question, but thanks for responding anyway. Also, excellent lib

@ferranpons
Copy link
Member

Don't worry! There are no dumb questions. Glad we can help and glad that you like it. 😉

@Bestfastfire
Copy link
Author

Man, Im right, this dont take my location all times, i tried but only work sometimes, others it shows that my location is in another state

@Bestfastfire Bestfastfire reopened this May 9, 2018
@Bestfastfire
Copy link
Author

Bestfastfire commented May 9, 2018

I try to get my location with the picker but this does not always work. I activate GPS, sometimes it works other than GPS. If I open Google Maps and it finds my location, when I get back in the app with the lib it finds it too, otherwise it will not. Sometimes I turn on the GPS and he can find it, but few times it happens, I almost always have to go to google maps first.

When testing on other phones the same occurs, in some works and in others not. I tested the version on the lib page, I also implemented it in my app, in both cases the problem occurs.

@ferranpons
Copy link
Member

@Bestfastfire it's a bit weird but please could you give more info?

  • Which devices and OS versions
  • If those devices have versions of API over 23, is geo-location permissions granted on all devices?

Thanks!

@Bestfastfire
Copy link
Author

Yes, I gave the permissions and it did not work, I tested on one with API 21 and another with API 19, also did not work. I'm going to record and send the gif so you have a better idea of ​​the problem

@Bestfastfire
Copy link
Author

whatsapp-video-2018-05-09-at-9 54 57-am

Take a look, you're going to say "Ah but you did not wait long enough for him to find his location", in fact I did not wait too long for the video to be over, doing a test here I left 5 minutes and did not find, place there, only after opening google maps that he finds, that when he comes back in the app he finds it too

@ferranpons ferranpons added the pending Pending to solve label Mar 1, 2019
@jabber484
Copy link

jabber484 commented Apr 30, 2019

I was also having the same problem.

I believe it is due to Leku did not initialize LocationManager probably. In fact both me and @Bestfastfire's screencap do not show that the app is using location service at all.
It is highly possible that Leku was keep getting the last known position.

After I created a request for Location Update before calling the Intent, as below,

LocationManager mLocationManager = (LocationManager) getSystemService(LOCATION_SERVICE);
mLocationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 1000, 1, mLocationListener);

The activity works as expected.

@dikhawk
Copy link

dikhawk commented Dec 17, 2019

hi @ferranpons i have some problem like @Bestfastfire, please add initialization LocationManager in LocationPickerActivity, this will fix the problem

@roiacult
Copy link

roiacult commented Jun 4, 2020

@Bestfastfire @jabber484
i was having the same problem and i also noticed thats when i open google maps befor opning my app it always get the right location so clearly the library is getting the last known position and not requesting updates
so what i did is force the user to activate gps befor opning leku activity and after user activate gps i called requestLocationUpdates function and then opened leku activate
i can provide some code if any one wants help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted pending Pending to solve
Projects
None yet
Development

No branches or pull requests

5 participants