GetlastknownLocation returns null on LGE615 but it works well on Galaxy Pocket although both run the same version of android
public void setLocation() {
LM = (LocationManager) getApplicationContext().getSystemService(
LOCATION_SERVICE);
Criteria criteria = new Criteria();
provider = LM.getBestProvider(criteria, false);
try {
LM.requestLocationUpdates(provider, 1000, 1, this);
if (LM != null) {
Loc = LM.getLastKnownLocation(provider);
if (Loc != null) {
//Handle location
}}
} catch (Exception e) {
e.printStackTrace();
}
}
See this question for details. getLastKnownLocation may return null if last location is not known by the device. Probably it just take more time to initialize GPS on LGE615, than on Galaxy Pocket.