Note that there are some explanatory texts on larger screens.

plurals
  1. POgeolocation does not work in android
    text
    copied!<p>I have a problems, I would like to use the geolocalisation with googleMap. I didn't have problems's with google map, just,, the geolocalisation didn't run and the value for latitude and longitude are null</p> <pre><code>public void geolocalisation() { lmanager = (LocationManager) getSystemService(Context.LOCATION_SERVICE); lmanager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 1000l, 10l, new LocationListener(){ public void onLocationChanged(Location arg0) { latitude = arg0.getLatitude(); longitude = arg0.getLongitude(); } public void onProviderDisabled(String arg0) {} public void onProviderEnabled(String arg0) {} public void onStatusChanged(String arg0, int arg1, Bundle arg2) {} }); GeoPoint position = new GeoPoint(microdegrees(longitude),microdegrees(latitude)); MonOverlay marker = new MonOverlay(getResources().getDrawable(R.drawable.personne));//localisation point marker marker.addPoint(position); maMap.getOverlays().add(marker); monControler = this.maMap.getController(); } </code></pre> <p>and this are the permissions in the androidManifest</p> <pre><code>&lt;uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/&gt; &lt;uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/&gt; &lt;uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION"/&gt; &lt;uses-permission android:name="android.permission.ACCESS_GPS"/&gt; &lt;uses-permission android:name="android.permission.ACCESS_ASSISTED_GPS"/&gt; </code></pre> <p>I doon't know what is the problems?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload