Skip to content

Commit

Permalink
Use fix locale to write floats in java
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasMizera committed Oct 27, 2023
1 parent 32a4a66 commit 762de4e
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.Locale;

import uk.co.lutraconsulting.PositionTrackingBroadcastMiddleware;

Expand Down Expand Up @@ -230,7 +231,7 @@ public int onStartCommand( Intent intent, int flags, int startId ) {
public void onLocationChanged( Location location ) {

long currentTimeSeconds = System.currentTimeMillis() / 1000; // UTC time
String positionUpdate = String.format("%f %f %f %d\n", location.getLongitude(), location.getLatitude(), location.getAltitude(), currentTimeSeconds);
String positionUpdate = String.format(Locale.US, "%f %f %f %d\n", location.getLongitude(), location.getLatitude(), location.getAltitude(), currentTimeSeconds);

try {
if ( positionUpdatesStream != null ) {
Expand Down

1 comment on commit 762de4e

@inputapp-bot
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

iOS - version 23.10.474811 just submitted!

Please sign in to comment.