Arpit Prajapati
Arpit Prajapati

Reputation: 365

How to show current location of user while open my app

I want to make an app, when user open my app user will get their current location in my app and while user change their location it will also update after some specific time. I got solution of changed location while user change their location but i need to show current location of user while user open my app.

Upvotes: 1

Views: 3135

Answers (1)

Liya
Liya

Reputation: 638

googleMap.setMyLocationEnabled(true);
Location myLocation = googleMap.getMyLocation();

These are the the key lines to get current location.

for more info ,refer these tutorials: android show current location on map using google maps api

and how to get current location in google map android

Upvotes: 4

Related Questions