0

I am suffering from a bit of confusion around the google fit and google + api. When my app is first opened the user is asked to sign in with google + etc and then, if they are logged in, are transfered via intent to my home class. This class sets up some fragments for the user profile area.

The bit I am confused about is how to recall this client from a fragment later on? As far as I am aware you cannot transfer the client instace in a bundle? Is it a case that I would have to run my who login bit again to retrieve the client, obviously as they have already approved my app it should just happen automatically or am I missing something?

dave
  • 1,410
  • 1
  • 16
  • 42

2 Answers2

0

I solved this by using a Subclass application, thanks to this post : Pass connection object to other activity - Google Tasks API

Community
  • 1
  • 1
dave
  • 1,410
  • 1
  • 16
  • 42
0

If i understood the question correctly, I would make a "public static" object of googleAPIClient variable, you should be able to login in one activity and then use same instance in any other activity/fragment/etc as well...

hariszhr
  • 409
  • 2
  • 14