-1

I have been trying to get user location in a weather app I am building. Since I'm pretty new to android development this is quite tough and so I have tried finding sources on how to make this, though after trying many different things it always ends up being a way too outdated version that no longer works.

So my question is what is currently the best way the get a user's location.

Thanks in advance for anyone that can help me with this!

AzeaL87
  • 45
  • 1
  • 7

1 Answers1

1

It's enough to start reading from official doc: https://developer.android.com/training/location
or from here ready solution https://www.geeksforgeeks.org/how-to-get-current-location-in-android/

Yurii
  • 552
  • 3
  • 14
  • Do you also have a ready solution that's in Java? The Android docs doesn't show enough of the actual code that I need. – AzeaL87 Jan 06 '23 at 17:50
  • Depends in your google skills. – Yurii Jan 06 '23 at 18:37
  • 1
    Also, it is not so hard to find solution on SO https://stackoverflow.com/questions/17591147/how-to-get-current-location-in-android – Yurii Jan 06 '23 at 18:38
  • Also,in official google docs, there are kotlin/java examples, just read deeply. – Yurii Jan 06 '23 at 18:44
  • Im afraid that solution is outdated now, and I wish I knew how to google properly here but since I'm new to android development I have no idea what to look for – AzeaL87 Jan 06 '23 at 19:06
  • https://developer.android.com/training/location/retrieve-current tells you exactly how to get started with copiable java code. – codebod Jan 06 '23 at 19:34
  • @codebod nice, thats I was talking about, just need to read, understand and implement, no one will implement it instead of you – Yurii Jan 06 '23 at 21:31