how to Get Current Location On Google Map android

181 views Asked by At

I'm having some trouble when I want to get current location on Google Maps Android.

I have 2 class activity this LokasiActivity http://pastebin.com/ECr9G7Vq

and this maps activity http://pastebin.com/e3zruznk

The problem is, I want to change -6.8603727, 108.6564165 value automatically based on user's current position. Can I do that?

1

There are 1 answers

0
Richard Carls On

So, the actual problem looks like you never pass the user's last location from the first activity to the map activity. Put it in the bundle extras when starting it, then retrieve in map activity's oncreate().