Migrating apps to SensorCore SDK 1.1

Migrating an application from an older version of the SensorCore SDK to version 1.1 unfortunately may require some refactoring because non-location and location based sensor information are separated from each other.

  • SenseHelper.GetApiStateAsync has been removed from the SDK. If your application is using this API, you will need to refactor it to use SenseHelper.GetSenseSettingsAsync instead.

  • SenseHelper.GetSupportedCapabilitiesAsync has been deprecated. It is still available, but you should switch to using SenseHelper.GetSupportedApiSetAsync instead.

GetSupportedApiSetAsync method return APIs level 1, 2, 3 or 4, and features available in each API level are listed below. A higher API level includes previous level API functionality.

  • Level 1:

    • This is the baseline. It covers everything else that is not listed under the other API set levels.
  • Level 2:

    • PlaceMonitor PlaceKind new value: Frequent
    • TrackPoint new field: Id
    • Added triggers:

      • StepCounterUpdate
      • MotionDataCleared: This trigger will also be supported if the supported API set is 1, but the motion data version is 2.
      • SenseApiStateChanged: This trigger will also be supported if the supported API set is 1, but the motion data version is 2.
  • Level 3:

    • New activity classes:

      • Biking
      • MovingInVehicle
    • DataCollectionQuality can have value Detailed if set in new motion data 2.x settings

  • Level 4:

    • PlaceMonitor Place has new properties:

      • Timestamp
      • LengthOfStay
      • TotalLengthOfStay
      • TotalVisitCount
    • New methods available in PlaceMonitor:

      • GetPlaceHistoryAsync
      • GetPlaceAtAsync

In a device that has motion data 2.X, Step counter and Activity monitor are always available. Also, their history does not clear unless you perform a factory reset. Previously, their history was cleared when the user tapped the clear motion data button in motion data settings. You may want to consider this when reacting to the MotionDataCleared background trigger.

Please see the section How apps should deal with motion data settings for more information about how to use the new APIs and how to support both new and old motion data settings in your application.

Show: