1

FragmentActivity and LocationListener

view story
linux-howto

http://stackoverflow.com – I try to get the current Location of the User using LocationListener in a FragmentActivity (in order to user SupportMapFragment) that implements LocationListener. This is my code : private void setLocationManager() { if (lm == null) lm = (LocationManager) this .getSystemService(Context.LOCATION_SERVICE); // exceptions will be thrown if provider is not permitted. try { gps_enabled = lm.isProviderEnabled(LocationManager.GPS_PROVIDER); } catch (Exception ex) { } try { network_enabled = lm (HowTos)