YouTube

Got a YouTube account?

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

English subtitles

← Turning Weather Notifications OnOff - Developing Android Apps

Get Embed Code
10 Languages

Showing Revision 12 created 05/25/2016 by Udacity Robot.

  1. Alright, you're done.
    Let's start by adding
  2. all of the strings we're going
    to need for our new preference.
  3. Key, label, and some things like
    true, false, and default.
  4. Then we'll additional preference
    into pref general xnl,
  5. a check box preference
    that uses those strings we just defined.
  6. Let's go over to our sync adaptor.
    In the notify function,
  7. we add the code to fetch the preference
  8. and make use of it.
    And there we have it.
  9. Now we won't display notifications
    if the user doesn't want us to,
  10. which is a great thing for an app to do.