Bonsoir
voila j'ai un soucis avec mon application , je veux avoir ma dernière localisation (Long et Lat) mais elle me renvoie la valeur 0
Long =0 et lat =0
une solution svp ?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13 private void getCurrentLocation() { //Creating a location object Location location = LocationServices.FusedLocationApi.getLastLocation(googleApiClient); if (location != null) { //Getting longitude and latitude longitude = location.getLongitude(); latitude = location.getLatitude(); //moving the map to location moveMap(); } }
Partager