Good afternoon, I get coordinates on the GPS client in the String type using for this
String.format( "%1$.4f", location.getLongitude());
On the server you need to put them in a table with double fields. I tried without converting I get an error
Data truncated for column 'latitude' at row 1
I tried to send values without using String.format, but then incriminatingly huge hexadecimal values come. Tried to use
longitude=Double.parseDouble(din.readUTF())
server does not accept values. You can try parsing regular files, but this will add code.
Maybe there is a less costly option to convert?
Type of field in the table
Data type DOUBLE Length / Value 1.0
double
. Judging byDouble.parseDouble()
. - αλεχολυτ