Code example for Location

Methods: getTime

0
                    locListener.onLocationChanged(lastKnownLocation);
                } 
            } 
            if (useCoarse) {
                lastKnownLocation = locMgr.getLastKnownLocation(LocationManager.GPS_PROVIDER);
                if (lastKnownLocation != null && System.currentTimeMillis() - lastKnownLocation.getTime() <= useOldToInit) {
                    locListener.onLocationChanged(lastKnownLocation);
                } 
            } 
        } 
    } 
 
    /** 
     * stops all activity 
     * after this call the object is useless 
     */ 
    public void stop() { 
        locMgr.removeUpdates(locListener);
    } 
 
Experience pair programming with AI  Get Codota for Java