4 ms·
I am taking over a legacy implementation of Google Sign-In and trying to switch it to the new 8.3 one (because asking for 'get contacts' just suck terribly).
by on_and_off 11y ago
I am taking over a legacy implementation of Google Sign-In and trying to switch it to the new 8.3 one (because asking for 'get contacts' just suck terribly).
I don't really need a lib such as easy google though, I would have preferred more documentation on how it is recommended to handle some basic use cases.
For example : login in a first loginActivity then logout in another. Am I supposed to keep the GoogleApiClient somewhere at Application scope or to recreate it in each screen where I want to interact with it ?
- habosa 11y agoTotally agree, you shouldn't (and don't) have to use a lib like easygoogle to get Google Sign In implemented correctly on Android! In the multi-activity situation you will want to re-instantiate your GoogleApiClient in each Activity. If you use the function enableAutoManage that keeps it pretty lightweight, you don't need to implement ConnectionCallbacks (since the new API does not have the notion of connection == signed in) and you can have a one-line implementation of OnConnectionFailedListener. If you have a question about any of this, raise an issue on this repo (https://github.com/googlesamples/google-services https://github.com/googlesamples/google-services) and I'll answer it.