ckurtm

Published

February 7, 2016

ckurtm in 365 Body Workout, code labs, Google Sign-In | February 7, 2016

Google Sign-In for Android (Code-lab)

Here is a simple Sign-in codelab I wrote on how to add this feature to your app including a sample project.

google_signin

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.

Share this:

  • Click to share on Twitter (Opens in new window)
  • Click to share on Facebook (Opens in new window)
  • Click to share on Google+ (Opens in new window)
  • Click to share on Reddit (Opens in new window)

Related

ckurtm

Published

February 7, 2016

  • Related Content by Tag
  • Android
  • Google Sign-In

Follow Me

  • View ckurtm’s profile on Twitter
  • View ckurtm’s profile on LinkedIn
  • View ckurtm’s profile on GitHub
  • View ckurtm’s profile on YouTube
  • View KurtMbanje’s profile on Google+

Recent Posts

  • Writing Android Tests with Espresso Test Recorder
  • Live Templates: Logging with Android Studio
  • Did you know: Reusing native element attributes in Custom Views
  • Did you know: ContextCompat
  • Simple SQL Provider (Easy way to write custom sql based Content Providers for Android)
Independent Publisher empowered by WordPress