Android Question Longitude Latitude declaration

jchal

Active Member
Licensed User
Longtime User
hi all
i have decaired the Longitude and Latitude as double in in the my sql datase i have them as double.
the code i have is the following
mylat=Location1.ConvertToMinutes(Location1.Latitude)
mylong=Location1.ConvertToMinutes(Location1.Longitude)
the error i get is
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
** Service (httputils2service) Create **
** Service (httputils2service) Start **
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
** Activity (login) Create, isFirst = true **
** Activity (login) Resume **
** Activity (login) Pause, UserClosed = true **
** Activity (member) Create, isFirst = true **
** Activity (member) Resume **
** Activity (member) Pause, UserClosed = false **
** Activity (gpstracking) Create, isFirst = true **
** Activity (gpstracking) Resume **
Error occurred on line: 66 (gpstracking)
java.lang.NumberFormatException: Invalid double: "38:2,93218"
at java.lang.StringToReal.invalidReal(StringToReal.java:63)
at java.lang.StringToReal.parseDouble(StringToReal.java:269)
at java.lang.Double.parseDouble(Double.java:295)
at anywheresoftware.b4a.debug.RDebugUtils.numberCast(RDebugUtils.java:50)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:702)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:336)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:246)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:134)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:153)
at anywheresoftware.b4a.gps.GPS$1.onLocationChanged(GPS.java:65)
at android.location.LocationManager$ListenerTransport._handleMessage(LocationManager.java:257)
at android.location.LocationManager$ListenerTransport.access$000(LocationManager.java:186)
at android.location.LocationManager$ListenerTransport$1.handleMessage(LocationManager.java:202)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:176)
at android.app.ActivityThread.main(ActivityThread.java:5319)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
at dalvik.system.NativeStart.main(Native Method)
what is my mistake?
 

jchal

Active Member
Licensed User
Longtime User
i have shorted this out
mylat=Location1.Latitude
mylong=Location1.Longitude
is the answer to this
 
Upvote 0
Top