I've made an app that gets location from either GPS, Network, or Passive and picks the best provider based on the accuracy and time. The app works well on my phone, running Android 2.2, but on a friend's phone, running 4.2, he is not able to get a location indoors (from a passive provider). I'm a bit cynical and think that Google just wants me to sign up for Google Maps Geolocation API so I can pay for the passive provider after 1000k requests. Is there a way I can fix the app for 4.2 or do I need to sign up for the API?
Info: In the google maps app, he gets a virtually perfect location.
This function can give me a very good location on my phone, but no location on my friend's phone:
if (lastLocation_passive != null) {
time_passivefix = (System.currentTimeMillis() - lastLocation_passive
.getTime()) / (1000 * 3600);
accuracy_passivefix = lastLocation_passive.getAccuracy();
Log.i(TAG, "Time and accuracy from last passive fix is: "
+ time_passivefix + " " + accuracy_passivefix);
accuracy_passivefix = lastLocation_passive.getAccuracy();
Log.i(TAG,
"Passive fix got fix from: "
+ lastLocation_passive.getProvider());
if (time_passivefix < 1 && accuracy_passivefix <= 150)
return lastLocation_passive;
EDIT: Is that Google down-voting my question?