YouTube

Got a YouTube account?

New: enable viewer-created translations and captions on your YouTube channel!

English subtitles

← Sign Out

Get Embed Code
4 Languages

Showing Revision 3 created 05/19/2016 by Udacity Robot.

  1. So here you can see
    the onSignedOut function, and
  2. it's pretty straightforward.
  3. It just enables the sign in button,
    and disables the sign out and
  4. revoke buttons, and it just sets
    a status text to be signed out.
  5. That's it, you're done.
  6. This app had many steps, but now you've
    got something with a full sign in built.
  7. Let's run it and see how it looks.
  8. So here you can see
    the application running.
  9. I have my sign in button,
    I have my sign out button and
  10. I have my revoke access buttons,
    the results are this little status text.
  11. If I touch the sign in button,
  12. what's going to happen first of all is
    that the first error that came back,
  13. came back because I hadn't
    given the application consent.
  14. So it's asking for my consent,
    and then I'll say Ok.
  15. Now you can see, it's signed in, and
    it's signed in, and it actually got my
  16. real name, my full name here, instead of
    my email address, because all I provided
  17. the application when I was
    running it was my email address.
  18. I now have my sign out and
    my revoke access buttons enabled.
  19. So if I touch Sign Out,
    I'm actually signed out.
  20. And if I touch Sign In,
    I will sign in directly.
  21. You might have seen a quick flash
    as the intent was checking, but
  22. now I'm signed in directly as myself.
  23. If I revoke access now I've removed the
    permission from the application to be
  24. able to sign in.
  25. So, the user has to
    give permission again.
  26. So, if I touch Sign In the intent will
    come up, the arrow is triggered, and
  27. it's saying, hey this wants
    to look at my basic profile.
  28. I'll say okay to that, and
    then I'll continue, and get signed in.
  29. So, now you have the full
    sign in work flow going.
  30. If you get stuck with any
    of the code don't worry.
  31. It's okay.
    I've pasted
  32. the entire code in the speaker notes.
  33. You should be good to go.