As usual there is a lot of code in my LoginActivity
and I really would prefer to separate the Activity
responsibilities from the Google Play sign in concerns.
After rewriting this LoginActivity
code several times, in many different apps, the easy (and not so elegant) solution was create the Google API client as a Application
class object. But, since the connection state affect the UX flow, I never was happy about with this approach.
Is there an elegant way of place the GoogleApiClient
outside the Activity
?
Aucun commentaire:
Enregistrer un commentaire