/** * Performs a removeLocation request with callback * * @param loc {@link Location} to be removed * @param callback {@link RemoteEntityHomeCallback} * @return <code>true</code> if request can be performed, <code>false</code> if the {@link * Location} has no remote id */ public static boolean removeLocation(Location loc, RemoteEntityHomeCallback callback) { if (loc.getRemoteId() == null || loc.getRemoteId() < 0) { Log.i(TAG, "location can't be removed because no remote id is present"); return false; } RemoteEntityHome.performRequest(RequestType.removeLocation, loc, callback); return true; }
/** * Performs an getLocation request with callback to estimate the current location * * @param measurement {@link Measurement} * @param callback {@link RemoteEntityHomeCallback} */ public static void getLocation(Measurement measurement, RemoteEntityHomeCallback callback) { RemoteEntityHome.performRequest(RequestType.getLocation, measurement, callback); }
/** * Performs an getLocation request without callback to estimate the current location * * @param measurement {@link Measurement} */ public static void getLocation(Measurement measurement) { RemoteEntityHome.performRequest(RequestType.getLocation, measurement); }
/** * Performs an getLocationList request with callback * * @param callback {@link RemoteEntityHomeCallback} */ public static void getLocationList(RemoteEntityHomeCallback callback) { RemoteEntityHome.performRequest(RequestType.getLocationList, callback); }
/** Performs an getLocationList request without callback */ public static void getLocationList() { RemoteEntityHome.performRequest(RequestType.getLocationList); }