on-internet
← Community

get the current location fast and once in android

Stack Overflow ·

I have an android application that need device current location (latitude and longitude). I've tried some tutorial on the net and specially some solutions from stack overflow, but they doesn't work well for me. My requirement is so simple: First I need it to be fast and need the location once when I the fragment starts. Second I need it to be as precise as possible, I mean it should use GPS first if GPS is not available then use Network provider. For example, I've tried this solution but it return null after 30 second, but I know there is some all the things is ok because google map and other

Comments

Sign in or sign up to comment and upvote.

No comments yet.