Android Location Wifi doesnt work after rebooting -


i using code location provider , location.

        mlocationmanager = (locationmanager) getsystemservice(location_service);         criteria criteria = new criteria();         mbestprovider = mlocationmanager.getbestprovider(criteria, false);         mlocation = mlocationmanager.getlastknownlocation(mbestprovider); 

if turn off gps, location network, if reboot phone(so loss last position known) , 3g data connections off. using wifi, cant provider therefore location. google places app can locate me. think might getting lastknownlocation.but in case others applications should able location. idea whats happening?

the way calling return providers enabled or not because passing false intention have checked return string?

mbestprovider = mlocationmanager.getbestprovider(criteria, false); 

you might getting gps provider, or might getting network provider, have learned not trust criteria mechanism because seems work differently per carrier , device (i have had weird bugs reported because of this)

so ask gps , network providers , check last known both, use algo determine best 1 use.

the network provider can use cell or wifi hotspot/routers determine location (google keeps database of wifi information) it's possible fix wifi, not saying whats happening be.

if bears no fruit it's possible caching last location update in preferences, applications that. test thesis, failing of above leave phone in state , move different location same properties if possible, should take 2000 meters or so. if app still reports null , places reports old location have answer.

if places did report newer location wifi, , app cannot (assuming verify getting network provider) there chance using private api via google location server (gls) / masf server via partial cell / wifi info that's @ extreme end of tin foil curve.


Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -