Here is a simple Sign-in codelab I wrote on how to add this feature to your app including a sample project.
So recently – well for a while now – I’ve had people request for the ability to sync the workout app data across devices. Performing a workout session on your phone now syncs automatically with any other device you have the app on.
The thing about syncing a users device is you need to be able to uniquely identify a user. The simplest method I found was to use the users email address, you could however use a unique identifier e.g. profile id . I finally finished this feature over the weekend and figured I’d write about one of the cool features I got to use from Google play services, Google Sign-In.
I remember way back when I had to work on something similar to identify a user on Android I had to request the Accounts Permission , with Google Sign-in this is not required anymore as play services handle this for you after a user signs in.
Here is a simple Sign-in codelab I wrote on how to add this to your app including a sample project.