none
Any updates to HealthVault Library for Windows 8? RRS feed

  • Question

  • I've been looking at the HealthVault Library for Windows 8 and recently ported it to Windows Phone 8. I was wondering if there are any updates. The latest version on the site hasn't been updated since June of last year and is still listed as "beta".

    Thanks

    Tuesday, February 18, 2014 7:01 PM

Answers

  • Ben,

    The version on CodePlex is the most recent version to use in your app development. We're looking to do an update with added support for additional HealthVault data types in the next few weeks.

    Ali

    Thursday, February 20, 2014 9:18 AM

All replies

  • Ben,

    The version on CodePlex is the most recent version to use in your app development. We're looking to do an update with added support for additional HealthVault data types in the next few weeks.

    Ali

    Thursday, February 20, 2014 9:18 AM
  • As a follow on. Will there be any documentation on some of the concepts in the Windows 8 SDK such as how the local object caching and synchronized views are intended to be used. I have been experimenting, but am still not sure I understand what fully going on.

    Update: Some more specific questions:

    If I create a view, is it automatically synchronized or do I have to do that manually by calling SynchronizeAsync()? How can I determine when/if pending items have been downloaded?

    Can I create my own instances of SynchronizedTypes, or are they intented to be used behind the scenes?

    There is an extensive amount of code managing synchronization between a local store and the remote HealthVault store, but most GetXxx methods bypass the store completely.  Furthermore, if the device is offline when the app starts there is no access to the local store at all as StartAsync throws an exception and leaves HealthVault app uninitialized.  Is this by design?

    The SDK seems to be very thorough and robust, I am just not sure how it is intended to be used in an environment where there is the  potential to be offline as often as online.

    Thanks,

    Ben




    Wednesday, February 26, 2014 8:16 PM
  • Ben,

    We won't be able to get detailed documentation on the Windows 8 SDK soon with the current resourcing, but we'll love to help you out as much as we can.  The sample application shows usages of most of these things, and you can use that to click around and explore. To answer your questions:

    If I create a view, is it automatically synchronized or do I have to do that manually by calling SynchronizeAsync()? How can I determine when/if pending items have been downloaded?
    When using a SynchronizedView, the SynchronizeAsync needs to be called manually.  There is an ItemsAvailable event on the SynchronizedView that you can use to be notified as soon as items are available.  The SynchronizeAsync is also an async method, so you can await for it to complete as well.  It should be noted though that SynchronizeAsync only gets the ItemKey, not the full items.  The full items will be retrieved on demand when you use one of the get methods such as EnsureItemAvailableAndGetAsync. 

    Can I create my own instances of SynchronizedTypes, or are they intented to be used behind the scenes?
    SynchronizedTypes can be used in your code, but they are intended to be created and managed by the SynchroizedTypeManager which is accessed via LocalRecordStore.Types.

    There is an extensive amount of code managing synchronization between a local store and the remote HealthVault store, but most GetXxx methods bypass the store completely.  
    The sdk is flexible and provides apis for various scenarios.  I believe you are talking about the GetXxx methods part of IRecord.  If you want to take advantage of synchronization with a local store, the GetXxx methods of SynchronizedType or SynchronizedView should be used.   In general, SynchronizedView is a one way sync from HealthVault to local storage.  SynchronizedType provides a two-way sync which allows creating new items while offline, and pushing them to HealthVault later. 

    Furthermore, if the device is offline when the app starts there is no access to the local store at all as StartAsync throws an exception and leaves HealthVault app uninitialized.  Is this by design?
    In the current sdk, StartAsync must be called while the device is online.  During the course of that procedure, when a valid HealthVault record has been provisioned by the application, the UserInfo will be saved to local storage.  At this point if the app restarts when the device is offline, it can call LoadUserInfoAsync instead of StartAsync.  This will load the UserInfo from local storage and the app can access stored data as usual.

    I hope this helps.

    Victor

    Friday, March 7, 2014 7:51 PM
  • Thank you very much for taking the time to respond to my questions. You answers are very helpful.

    One note, you mention:

      ...if the app restarts when the device is offline, it can call LoadUserInfoAsync instead of StartAsync.  This will load the UserInfo from local storage and the app can access stored data as usual.

    I actually discovered this on my own by tracing the code carefully. the only problem is that in the current code, LoadUserInfoAsync is a private method. I have fixed this for my local version, but it should probably be updated...I can open an issue on CodePlex if that helps.

    When I have more questions in the future, is this the best place to ask my questions?

    Thanks again

    Ben

    Tuesday, March 11, 2014 1:24 PM