singleton - same GooglePlus client object in different activities android -


I want to create a library for GooglePlus. For this, I have created many sections like login, posting, fetching user profile etc.

Do I have to connect, but disconnected, have to implement on the connection connection? Do I have to call plusClient.connect () in every category?

Currently if I connect () in the first (login) category and then tries to post from the various activities on the usage account, then it is giving a problem. I have to add it again, even if I did this in past activity.

Is there a solution for it that I can use the same plus client object in many activities?

In advance thanks

plus client class being lightweight Designed to be so that there is no need to share the PlusClient example in the examples of the activity:

He said, something like that Not that which prevents you from doing this until you make sure that PlusClient.connect () and if you have a PlusClient as part of a service or application object Probe Plsclent when Dit. Disconnect () is called at the appropriate time.

Also, keep in mind that the plus client has been removed in favor of GoogleApiClient though for this discussion, they are equivalent.


Comments