@Test public void testContinousUpdateType() throws JSONException { assertEquals(event.getEventData().get(LocationEvent.UPDATE_TYPE_KEY).getString(), "CONTINUOUS"); }
@NonNull @Override @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) public final JsonMap getEventData() { return JsonMap.newBuilder() .put(LATITUDE_KEY, latitude) .put(LONGITUDE_KEY, longitude) .put(REQUESTED_ACCURACY_KEY, requestedAccuracy) .put(UPDATE_TYPE_KEY, updateType == UPDATE_TYPE_CONTINUOUS ? "CONTINUOUS" : "SINGLE") .put(PROVIDER_KEY, provider) .put(H_ACCURACY_KEY, accuracy) .put(V_ACCURACY_KEY, "NONE") .put(FOREGROUND_KEY, foreground) .put(UPDATE_DISTANCE_KEY, updateDistance) .build(); }
LocationEvent extends Event { @NonNull @Override @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) public final JsonMap getEventData() { return JsonMap.newBuilder() .put(LATITUDE_KEY, latitude) .put(LONGITUDE_KEY, longitude) .put(REQUESTED_ACCURACY_KEY, requestedAccuracy) .put(UPDATE_TYPE_KEY, updateType == UPDATE_TYPE_CONTINUOUS ? "CONTINUOUS" : "SINGLE") .put(PROVIDER_KEY, provider) .put(H_ACCURACY_KEY, accuracy) .put(V_ACCURACY_KEY, "NONE") .put(FOREGROUND_KEY, foreground) .put(UPDATE_DISTANCE_KEY, updateDistance) .build(); } }
LocationEvent extends Event { @NonNull @Override @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) public final JsonMap getEventData() { return JsonMap.newBuilder() .put(LATITUDE_KEY, latitude) .put(LONGITUDE_KEY, longitude) .put(REQUESTED_ACCURACY_KEY, requestedAccuracy) .put(UPDATE_TYPE_KEY, updateType == UPDATE_TYPE_CONTINUOUS ? "CONTINUOUS" : "SINGLE") .put(PROVIDER_KEY, provider) .put(H_ACCURACY_KEY, accuracy) .put(V_ACCURACY_KEY, "NONE") .put(FOREGROUND_KEY, foreground) .put(UPDATE_DISTANCE_KEY, updateDistance) .build(); } LocationEvent(@NonNull Location location, @UpdateType int type, int userRequestedAccuracy, int updateDist, boolean isForeground); }
LocationEvent extends Event { @NonNull @Override @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) public final JsonMap getEventData() { return JsonMap.newBuilder() .put(LATITUDE_KEY, latitude) .put(LONGITUDE_KEY, longitude) .put(REQUESTED_ACCURACY_KEY, requestedAccuracy) .put(UPDATE_TYPE_KEY, updateType == UPDATE_TYPE_CONTINUOUS ? "CONTINUOUS" : "SINGLE") .put(PROVIDER_KEY, provider) .put(H_ACCURACY_KEY, accuracy) .put(V_ACCURACY_KEY, "NONE") .put(FOREGROUND_KEY, foreground) .put(UPDATE_DISTANCE_KEY, updateDistance) .build(); } LocationEvent(@NonNull Location location, @UpdateType int type, int userRequestedAccuracy, int updateDist, boolean isForeground); @NonNull @Override String getType(); @NonNull @Override @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) final JsonMap getEventData(); @Override @Priority int getPriority(); }
LocationEvent extends Event { @NonNull @Override @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) public final JsonMap getEventData() { return JsonMap.newBuilder() .put(LATITUDE_KEY, latitude) .put(LONGITUDE_KEY, longitude) .put(REQUESTED_ACCURACY_KEY, requestedAccuracy) .put(UPDATE_TYPE_KEY, updateType == UPDATE_TYPE_CONTINUOUS ? "CONTINUOUS" : "SINGLE") .put(PROVIDER_KEY, provider) .put(H_ACCURACY_KEY, accuracy) .put(V_ACCURACY_KEY, "NONE") .put(FOREGROUND_KEY, foreground) .put(UPDATE_DISTANCE_KEY, updateDistance) .build(); } LocationEvent(@NonNull Location location, @UpdateType int type, int userRequestedAccuracy, int updateDist, boolean isForeground); @NonNull @Override String getType(); @NonNull @Override @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) final JsonMap getEventData(); @Override @Priority int getPriority(); final static int UPDATE_TYPE_CONTINUOUS; final static int UPDATE_TYPE_SINGLE; }