Starting with Google I / O 2013, we can read in several places the Google Maps Android v2 API documentation , which
This method / interface is deprecated.
use com.google.android.gms.location.LocationClient instead. LocationClient provides improved location and energy usage and is used by the blue dot “My Location”. See MyLocationDemoActivity in the folder with sample applications, for example sample code, or the Site Developer's Guide .
While it’s great that a new API has appeared, I cannot come up with any good reason to put @Deprecated on these methods.
They are indeed a very convenient way to access the location indicated by the blue dot.
One line
Location location = map.getMyLocation();
in order to get my location and the size of the installation code that we need to write using the new Location API to achieve the same result, it says that they are not outdated.
From MyLocationDemoActivity (under ANDROID_SDK/extras/google/google_play_services/samples/maps/src/com/example/mapdemo/MyLocationDemoActivity.java ):
The comment states that these hard-coded values are the same as on the map, but this may not be changed in the future.
So, after all the pros and cons are here , what could be the reason for refusing to depreciate these APIs? .
android google-maps google-maps-android-api-2
MaciejGórski
source share