private void startLocation() { LocationParams params = new LocationParams.Builder() .setAccuracy(LocationAccuracy.HIGH) // .setInterval(30000) .setDistance(100) .build(); SmartLocation.with(context).location().config(params).start(this); Toast.makeText(context, "Location Start", Toast.LENGTH_LONG).show(); }
private void stopLocation() { mPositionMarker = null; SmartLocation.with(context).location().stop(); Toast.makeText(context, "Location Stop", Toast.LENGTH_LONG).show(); }