Android CGM write strange values to properites

Former Member
Former Member
If I change value in GCM, GCM write this one propoertly. When I don't change this - i get in watchface strange value - why?

I have color number 0-12 in properity 'kolor', old value is '3'. I open GCM, chane other value, and write, and 'kolor' is differ and strange. Not between 0-12 (I use list)
  • I tested a bunch of my stuff that has user setting using GCM-Android today and I don't see the bug you mention. Could you tell us what you have in the store where you see this?

    Could you show us your "onSettingsChanged" code? And how you load the properties in general?
  • Former Member
    Former Member over 9 years ago
    For example Rugged watchface. Try change one from 6 properites and send to watch.

    I get variables in initialize():

    kolor = app.getProperty("kolor");
    if (kolor==null) {kolor=3; app.setProperty("kolor", kolor);}


    on onUpdate(dc) I change kolor to kolor_bg in if else stream:

    if (kolor==1) {kolor_bg=Gfx.COLOR_LT_GRAY;}
    else if (kolor==2) {kolor_bg=Gfx.COLOR_DK_GRAY;}
    else if (kolor==3) {kolor_bg=Gfx.COLOR_BLACK;}
    ...
    else if (kolor==12) {kolor_bg=Gfx.COLOR_PINK;}
    else {kolor_bg=Gfx.COLOR_WHITE;}


    "repair" colours if digit color is same to background etc.

    in onSettingsChanged() (identical like initialize):

    kolor = app.getProperty("kolor");
    if (kolor==null) {kolor=3; app.setProperty("kolor", kolor);}
    ....
    Ui.requestUpdate();


    If I 'reclick' every properites (change background white to white, change week color from red to red, and change one etc) and send - is ok. If I change only one - another properites change to strange values - I think over scope (laste else to white)
  • Former Member
    Former Member over 9 years ago
    In new version of Ruggad I set properites "numeric". Initialize it to 0, set default to 0.
    I write to watch from Mac to 1234 - it is good.
    I change on watch on android GCM - application get error onchange
    I read settings from Mac and I get on "numeric" empty but not null "string"?

    How can I safe get and check property?
    I expect digit, but get something strange.
    I have get and safe check (string,numeric,null,array,object etc) to safe numeric.
  • I had the same issues and had to add null and empty checks to make it stable for GCM Android.