This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

float in settings

I've got in settings such section:
<setting propertyKey="@Properties.GPS_LAT" title="@Strings.GPS_LAT">
        <settingConfig type="numeric" min="-90" max="90" required="true"/>
    </setting>

when I try to enter this data (for example 58,55) in POLISH version Garmin Connect Mobile Android I get error:
- I can't use comma although  I can see comma, I have to use dot
- I can't enter all number
the only solution is correct data, for example
- I see 50,4000
- I have to tap on the left of comma an correct 50 next tap o right on comma and correct 4000

Simulator should read language and emulate similar behaviour like real Connect App:

Now, independent on language decimal separator always is dot.



As I understand, the reading data in application, should be:
var lat = getProperty("GPS_LAT").toFloat();
and SDK convert  to float value from setting independent on decimal separator.

  • The first question is if you really need to use a settings for this.  If you're looking for a lat/lon for something like weather, you really don't need a setting, as you can get that on the watch itself, and it can adjust each time you use GPS.

  • That’s alright for weather, but a bit rubbish for tides where the nearest tide station might be a) hundreds of miles away and b) nowhere near the yacht you purchased from the petty change from your ConnectIQ earnings. 

    Believe me: there is a use case for float in settings and I agree with the OP that it should support localisation. 

  • It was just an example. I may need a float in the settings in many cases, e.g. in a BMI widget. The world is not an integer :) There is such an option and it should work fine.

    But, yes, I would like to use it for the weather, someone being in one place can enter another and observe the weather when approaching the target.
    Also, someone might want to know the weather always in the same place, regardless of activity.

  • That can be done without settings.  I have weather widgets where you can save the current location as "home" and also use GPS to get your current location.  Then switch to your "home" location from current if you want.

  • If you have a yacht, changes are you at at the yacht at times, and the app could just have a option to save the GPS location to use for tides.  What I'm saying is that there are ways around having a user manually enter a location,

    You can also user a picker in the app to enter a location is needed.

  • Of course, my WF  reading position from activity, this is additional functionality.

    But today I've found bigger error, Garmin Connect Mobile Android:

    - menu Connect IQ store

    - my device

    -my WF

    -my aplication

    -settings

    it's impossible to enter float: comma generate error message dot doesn't appear

  • hi mates,

    that is an issue I reported,

    see here: forums.garmin.com/.../garmin-connect-iq-decimal-issue

    the issue comes from the App for sure, when I first code it, no issue,

    the issue showed up after Garmin IQ/Connect updates.

    Jim, you trick is great but in my case, I use Lat/Lon settings for a "target" and unfortunately I can't always go before on the target to plot it.

    it is why for exemple I need a lat/lon settings,

    the main issue is (I think, I might be wrong) but Garmin App conversion since for the US "." is the ',' EU and for the US "," is the thousand separator right?

  • I've found error and I think it should correct.

    I can make many tricks (and made one) but each line of code consumes memory and we have to fight for every single bit and now, because of external error we have to waste this bits instead of simple using valid sdk.

  • I've found error and I think it should correct.

    And did you report it to Garmin? If not, then do not count on anyone from Garmin seeing it here, and fixing it. BTW, you posted to the wrong forum. I guess, it belongs to https://forums.garmin.com/developer/connect-iq/ - but even there I am not sure whether anyone from Garmin monitors closely all threads. It is definitely not the case here, on the Garmin Connect Mobile Android forum.

  • thx, I've voted Shent-Aurkhan (SHN) poste and put link to this thread.