Hi everyone,
I've tried to use the mock-locationprovider-lib and successfully simulated a location with it (after setting the target API down to 16 because of a deprecated library function which doesn't set a specific value that's required on newer API's, but anyways), but I'm struggling to set a specific Lat/Lon value to it.
If I take the example that is:
it simulated a location somewhere in Germany, which is totally fine.
Now I've tried to put Lat/Lon values there -16.3000000 and -48.9300000 but the library doesn't like that and spits an error out that
I'm trying for literal days now and have no clue on how to convert Lat/Lon to this format (it's not even normal decimal degress, it's something else).
Any help is welcome
I've tried to use the mock-locationprovider-lib and successfully simulated a location with it (after setting the target API down to 16 because of a deprecated library function which doesn't set a specific value that's required on newer API's, but anyways), but I'm struggling to set a specific Lat/Lon value to it.
If I take the example that is:
B4X:
latitude="5234.1421" 'lat. as decimal_degrees
ns="N" 'north-south = NORTH
longitude="01311.7996" 'long. as decimal_degrees
we = "E" 'west-east = EAST
altitude="84.0" 'alt. as meter
speed="0.0" 'speed as km/h
bearing="75.0" 'cuorse as degrees
accuracy="2.0" 'accuracy of horizontal position fix in relation to used sattelites position as meter
Now I've tried to put Lat/Lon values there -16.3000000 and -48.9300000 but the library doesn't like that and spits an error out that
I've tried to omit the negative sign and use ns="s" and we="w" but it still compained. Etc etc.java.lang.NumberFormatException: Invalid float: "0.6.000000"
at java.lang.StringToReal.invalidReal(StringToReal.java:63)
at java.lang.StringToReal.initialParse(StringToReal.java:160)
at java.lang.StringToReal.parseFloat(StringToReal.java:323)
at java.lang.Float.parseFloat(Float.java:306)
at esolutions4you.B4A.moclocationprovider.moclocationprovider.publishMockLocation(moclocationprovider.java:95)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
I'm trying for literal days now and have no clue on how to convert Lat/Lon to this format (it's not even normal decimal degress, it's something else).
Any help is welcome