Tiesna
Tiesna

Reputation: 21

how to Get Current Location On Google Map android

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?

Upvotes: 1

Views: 163

Answers (1)

Richard Carls
Richard Carls

Reputation: 139

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().

Upvotes: 1

Related Questions