Announcement

Collapse
No announcement yet.

DataField onTap()

Collapse
X
  • Time
  • Show
Clear All
new posts

  • DataField onTap()

    Did any of you try to configure an InputDelegate with Data Field ?
    I am able to make it work using the simulator, but it does not work if I copy the .prg on my vivoactive3 music.

    To troubleshoot, I have added simple System.println() statement. I can see onTap() is never called on the watch, but is called using the Simulator...

  • #2
    I am using CIQ 3.0.3 with Eclipse 4.8.0.

    Comment


    • #3
      I'm almost certain that this is not something that is supposed to work with wearables, even the ones that support touch like the vva3/m. I see that an issue has been filed, so maybe that will change.
      Last edited by Travis.ConnectIQ; 10-12-2018, 11:30 PM.

      Comment


      • #4
        Travis.ConnectIQ on a related note, are there any plans to ever support any kind of user interaction for data fields? I understand that there really aren't enough buttons on watches to have direct interaction, but it would be great if datafields could hook into the context-sensitive menu and provide settings and/or alternate views. (I realize this opens up a whole cans of worms, especially with memory usage).

        It would allow devs to create data field apps which can do things that aren't possible today, like scrolling through all laps in an activity or dynamically changing app settings. Currently if you want any kind of custom interaction within an activity, you have go and implement a full device app.

        Comment


        • #5
          I know. This was a topic that I discussed with a few people at the Developer's Conference back in April, and I think it is a great idea.

          I don't know how difficult it would be from the device side, but it would be really nice if a data field could have a delegate that implemented onMenu(). If the user pressed/held the menu button while in activity mode, the system menu would appear, and then at the bottom we could show a menu item for ConnectIQ data fields that provided a delegate. When the menu item for a data field was selected, we'd just call onMenu() for the delegate for that app and load up the menu.

          Comment


          • #6
            Travis.ConnectIQ thanks for sharing! It's good to hear that the topic is under discussion.

            Comment


            • #7
              BTW, based on the following link, onTap() should work.
              https://developer.garmin.com/connect...ser-interface/
              Data Field

              On Devices with touch screen support, an input delegate can be used to accept input. Only the onTap() behavior is supported and will be triggered when the user touches a point inside the data field when it is active on the screen. The behavior delegate should be the second element of the array that is returned from getInitialView as with other app types.

              // This data field accepts touch input class DataFieldApp extends App.AppBase { // Data field view with associated behavior delegate function getInitialView() { return [ new DataFieldView(), new DataFieldDelegate() ]; } } class DataFieldDelegate extends Ui.InputDelegate { // Handle touch events function onTap(evt) { // Process the touch event } }

              Comment


              • #8
                Like I said.. *almost* certain.

                Comment


                • #9
                  Okay. We determined that this is both a bug in our documentation and in our simulator. This should not work in datafields on wearable devices. Sorry about the confusion. We have plans to update the docs and the simulator to reflect the device behavior. Thank you for the report!

                  -Coleman

                  Comment


                  • #10
                    Thanks Coleman. It would have been a nice feature. Hopefully, this is something you can add in future releases...

                    Comment


                    • #11
                      Hello FlowState. I found usefull your app builder as my Fenix5 didnt count my laps at my small 10 meters pool. I have switched automat lap counter, switched off gps and using openwater swim app. Im using lap button each 20meters and swimming 20 times. After that I had to go to my activity on the phone and change distance from 0 to 400 meters.
                      I found usefull today to see at least how many laps I did by your appbuilder. Is there possibility with every lap to write into distance +20 meters and final activity will record my 20x20=400meter distance and not zero as now?
                      I appreciate your help and answer.

                      Comment


                      • #12
                        MirGar I think you may have posted this in the wrong thread, but to answer your question, AppBuilder cannot write to native fields like distance or speed, and even if it could, Garmin does currently ignores native fields that are written by CIQ apps.

                        - If you really want to see/record your distance with every lap, you could use a second AppBuilder instance with a formula such as:

                        LapCount * 20
                        or
                        LapCount *.020

                        But I'm not sure how helpful that is.

                        Comment


                        • #13
                          Thank you FlowState for your answer. Regarding wrong thread -you are right. It was my first post and Im still quite disorientated how all works here
                          LapCount * 20
                          or
                          LapCount *.020 will work to knowdistance in the water but it will not record this in the activity distance and I still have to replace zero distance on the phone in the activity.
                          Can be written new app which will record distance in the manner I need? With each lap button will write 20 into distance. If yes I will try to look closer in this. Maybe you can help me with some link where to find some information? Thank you for your help.

                          Comment

                          Working...
                          X