• Location Leakage We can use Android API code to extract the user's last
location. The noticed codes are getBestProvider(Criteria criteria, boolean enabledOnly), getSystemService and getLastKnownLocation(String provider). First one returns the name of the provider that best meets the given criteria; the second returns the handle to a system-level service by
name. The class of the returned object varies by the requested name. In the final, another one returns a location indicating the data from the last known location fix obtained from the given provider. The example code is presented in Figure 4.