Example code for INPUT and set&getdata?

Hi together
i´m getting crazy while trying to get YEAR, MONTH & DAY as User-Input on a WIDGET.
(PRESS MENU to CONFIGURE)

--> Hotkey & textinput (Ui.TextPicker) works fine.

in the simulator everythings works fine.
running the prog on my fenix3 i can input the data, but as soon as i want to save the data with set/get app.getProperty(YEAR_KEY); it crashes.
The Garmin API-docu is a piece of *** and as good are the example programs. Why is there no Keyboard example anymore in 1.1.3?

Does anyone has a sample source for :
1. Input Day,Month,Year. Save it to widget-setting.
2. Read the stored settings.
3. Display Day, Month Year

[FONT=arial black]@Garmin[/FONT]
If you wanna have professional developers --> implement a system for selling apps via your app store!
If you can't manage that, provide examples and docus for non-professional developers.
It might be a good idea to upgrade your examples instead of publishing tons of basic crappy watch-faces.

Just as hint...you can use "//" for additional information not just for//!
//! Copyright 2015 by Garmin Ltd. or its subsidiaries.
//! Subject to Garmin SDK License Agreement and Wearables
//! Application Developer Agreement.
//!
  • Please don't be rude on the forums.

    Anyways ....

    The Simulator does not emulate the entire workings of the Watch currently, (I've been told it's a simulator and NOT an emulator)
    So, you still need to go side load the app into your watch and debug it from there as well (a couple of well placed Sys.Println codes)

    If the app crashes, I would suspect that most likely you are not handling some condition for the data. (like today, I learned that I TOT i was handling nulls, but kept getting unexpected type errors - only on the watch - but in the simulator it works fine. Also found out that if I were to put it in DataScreen 1 it would crash but works OK in DataScreen4

    Ended up - It was me who was not catering for the types _during_ app start up, that explains why once the activity is on-going, data screen4 would be fine. (by the time i switch to data screen4, there is already values and thus the nulls are handled.

    NUMBER_PICKER_DISTANCE
    NUMBER_PICKER_TIME
    NUMBER_PICKER_TIME_MIN_SEC
    NUMBER_PICKER_TIME_OF_DAY,
    NUMBER_PICKER_WEIGHT
    NUMBER_PICKER_HEIGHT
    NUMBER_PICKER_CALORIES
    NUMBER_PICKER_BIRTH_YEAR


    have you considered using the NUmberpicker instead?
  • Be careful if you plan on supporting other devices, for example, the vivoactive does not handle textPicker at all.
  • Hi

    sorry for the rude threat....
    i just can't understand why garmin is developing dozens of similar watchfaces and spending no time for explaining/improving their example codes.
    Neither i could find a working example for an app/watchface supporting multi-language nor different devices.

    A simple "Hello World", "Hallo Welt", "Bonjour le Monde" with input of 2 Parameters and an device specific output for fenix3, epix, FR920Xt including one button action (like telling the width,height of the screen and the actually used device) would be nice.
    Its quite annoying searching old SDK for an example for complexdatafield, keyboard ,...

    how can i use numberpicker for picking "Year, Month, Day, and a number between 1-3" ?

    NUMBER_PICKER_DISTANCE
    NUMBER_PICKER_TIME
    NUMBER_PICKER_TIME_MIN_SEC
    NUMBER_PICKER_TIME_OF_DAY,
    NUMBER_PICKER_WEIGHT
    NUMBER_PICKER_HEIGHT
    NUMBER_PICKER_CALORIES
    NUMBER_PICKER_BIRTH_YEAR

    Birth_Year was working fine, but i need to tell the user "please input month" the int popup (BIRTH_YEAR) is asking for "Please Enter year of birth" - how can i modify this text?

    the API docu just tells me:

    • mode — An enum value of type NUMBER_PICKER_*

    • initialValue — The initial value for the Number Picker, type depends on mode


  • Dezent

    There is some example code for a Roll-Your-Own number picker in this thread. Not exactly what you're looking for, but maybe a starting point. I don't think the native number pickers that exist now will work well for what you're looking for.

    https://forums.garmin.com/showthread.php?221786-Dynamic-Menus-for-apps-widgets&p=539899