Hello Shraddha, The best way to retrieve tokens for accessing Google services on Android is to use the Android AccountManager. We have an example application that uses the AccountManager to retrieve a token that can be used to access Google Health at the following address.
http://code.google.com/p/googlehealthsamples/source/browse/#svn%2Ftrunk%2Fjava%2Fandroid In this example, the AccountManager returns a token that can be used to access the Health "ClientLogin" feeds. Implementing OAuth authorization directly between a mobile device and Health currently isn't possible since non-anonymous OAuth 1.0 isn't secure without an intermediary web app to hold domain credentials. Also, OAuth 2 is not yet supported by Health. The AccountManager will get you a valid token, however. Paul (Google) On Mon, Apr 11, 2011 at 2:21 AM, Shraddha Shravagi < [email protected]> wrote: > Hello, > We have an Google Healht Android App which retrieved clients health data > and displays different graphs to him and also allows him to add some > records. > Now we want to implement OAuth with it so that user does not need to login > every time. I am developer of this app. > I was searching about OAuth and came accross following issues. I hope I get > a valid and assured help > > 1. OAuth 2.0 Native Application seems to be suitable for me as > Our applciation does not have a web site i mean we have it on market but no > web application. Ours is an mobile application. Is my selection correct? > 2. But OAuth 2.0 is experimental and its mentioned in the help that it can > be removed as well so I am worried about using it so is it true that it > could be removed as well? Also what If I use it now, is there any probable > date when it would be stablized? > > 3. If not then I will have to use OAuth 1.0 a so would I be able to use > this as we dont have a web application. > > 4. Do you have any sample of using OAuth 2.0 For Native Application / Oauth > 1.0a whichever is suitable for me. > > I have tried using it and here's how i tried of implementing it although I > havent registered for my application right now i used an test application > for testing. I am gettign user accounts via it > > 5. But I am stuck at how to get feed of ggogle health from it? > 6. Also is Updation of records is possible via OAuth > Please link me to any of the simple examples in Java for OAuth. > Please forgive if this question is already been asked but I could not find > any relevant help over this. > > -- > Thanks & Regards, > Shraddha Shravagi. > > -- > You received this message because you are subscribed to the Google Groups > "Google Health Developers" group. > To post to this group, send email to > [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/googlehealthdevelopers?hl=en. > -- Developer Programs Engineer Google Health [email protected] -- You received this message because you are subscribed to the Google Groups "Google Health Developers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/googlehealthdevelopers?hl=en.
