Hello Suresh, I'm kinda confused.. but what do you mean by offline access? meaning no internet connection required?
Thanks, Reggie On Mon, Nov 23, 2009 at 11:00 PM, Suresh Thakur <ers...@hotmail.com> wrote: > Hi Guys, > > With the help of Eric (Google), I am now able to connect Google Health > to get offline Access on data. Here are the steps I used to do that, > > Step1:- Create AuthSubRequest URL Like - > > http://www.google.com/h9/authsub?next=http%3A%2F%2Flocalhost%2FGoogleHealthSample%2FDefault.aspx&scope=https%3A%2F%2Fwww.google.com%2Fh9%2Ffeeds%2F&secure=0&session=1&permission=1 > > Using AuthSubUtil.getRequestUrl() method > > AuthSubUtil.getRequestUrl("http", "www.google.com", "/h9/authsub", > Request.Url.ToString(), "https://www.google.com/h9/feeds/", > false,true); > authSubLink += "&permission=1"; > Step2: Get and store the token value received from google health and > create a session based token using AuthSubUtil.exchangeForSessionToken > () Method > > String token = Request.QueryString["token"]; > string offlineTokenToGetPersonProfile = > AuthSubUtil.exchangeForSessionToken(token, null).ToString(); > > Store offlineTokenToGetPersonProfile value in database and use it to > connect to google health without user credentials > > Step3: To connect to google health for offline Access as MS > healthVault do use GAuthSubRequestFactory() class as we use this class > to connect online access as well, developer are not required now to > create AuthSubRequest URL as we done in STEP1. > > GAuthSubRequestFactory authFactory = new GAuthSubRequestFactory > ("weaver", "exampleCo-exampleApp-1"); > authFactory.Token = offlineTokenToGetPersonProfile ; > HealthService service = new HealthService > (authFactory.ApplicationName); > service.RequestFactory = authFactory; > > Take a look at Authentication also: > > http://code.google.com/apis/health/docs/2.0/developers_guide_protocol.html#Authenticating > > Thanks to Eric!!! > > > > > > On Nov 16, 6:57 pm, Suresh Thakur <ers...@hotmail.com> wrote: > > Hi, > > > > I am developing a application where one provider can have multiple > > patients and each patient can be linked to multiple providers. > > > > I want to create application where provider canaccesspatients data > > without entering patient's login information, instead should get some > > kind of patientid and record id as MS healthvault provides to get > > patient data once authorized by patient. > > > > Thanks > > > > Suresh Thakur > > -- > > You received this message because you are subscribed to the Google Groups > "Google Health Developers" group. > To post to this group, send email to > googlehealthdevelop...@googlegroups.com. > To unsubscribe from this group, send email to > googlehealthdevelopers+unsubscr...@googlegroups.com<googlehealthdevelopers%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/googlehealthdevelopers?hl=en. > > > -- You received this message because you are subscribed to the Google Groups "Google Health Developers" group. To post to this group, send email to googlehealthdevelop...@googlegroups.com. To unsubscribe from this group, send email to googlehealthdevelopers+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/googlehealthdevelopers?hl=en.