DataField access to activity type

I am working on a data field that behaves slightly differently between run and cycle modes. Unfortunately, I'm not seeing any way to access the current mode of the device without calling createSession(). Is this by design, or might I expect that this bit of data will be made available at some point?

It seems that an option may be to make a custom data field for each mode (i.e., CustomDataFieldBike and CustomDataFieldRun) and maintain them separately. If this is the right way to go, is there some way (manifest.xml maybe) to indicate that my custom data field is only to be used for specific activity types?

Travis
  • It's something we will consider. I think we had assumed they would be more targeted.

    -Alpha Monkey
  • I'm not sure I understand your response. It seems that you guys assumed applications would be more generic, not more targeted. I think it is fine if there are no plans to add functionality to determine the activity mode. I'm just not sure exactly how to proceed.

    For the sake of discussion, lets say I want my data field to render a bicycle, a runner, or a question mark depending on the the device profile in effect. What is the best way to achieve this?

    At this point I'm just guessing, but it seems that I could probably have a single application that reads an application property which indicates how the user configured the application. Given that I don't really have any understanding about how the property system will work and the fields are to be configured, I'm not sure that this is a reasonable option or not.
  • Former Member
    Former Member over 10 years ago
    We expected applications to be more targeted, and did not anticipate what you are describing where a data field would implement multiple behaviors across sports.

    We will take your input into consideration, and may be able to add the sport time into the Activity Info object, where it could be accessed by data fields. The Activity Info object is where data fields will need to get most of their data because many of the more complex APIs will not be available to them (e.g. FIT recording).

    There will be categorization options for ConnectIQ apps, which could be used to indicate intended use if you write two apps. There will also be a way to configure settings for any app type if you would rather allow the user to configure the behavior.
  • There will also be a way to configure settings for any app type if you would rather allow the user to configure the behavior.

    Will the user be able to configure options on a per-data field basis (i.e., multiple instances of the same data field app running at the same time, each with different settings)?
  • Former Member
    Former Member over 10 years ago
    The configuration would be on a per-app basis.

    Based on the description you have given of your project, I would recommend configuring your code so you can build two separate targets for now. If we are able to add access to the sport type to the Activity Info object, then you may be able to combine the implementations.