English feliratok

← onHandleIntent Transition - Solution

Beágyazókód kérése
4 Languages

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

  1. So here now we can see we
    can get the transition type
  2. using
  3. This is going to return
    an integer to us.
  4. Now, the geofence object contains these
    constants GeofenceTransitionEnter and
  5. GeofenceTransitionExit.
  6. So all we have to do then is if
    the geofence transition is this or
  7. the geofence transition is this,
    then we're going to run a block of code.
  8. We'll see what that block of
    code is in a few moments, but
  9. this is all you'll have to do to check
  10. the transition type if you're
    entering or if you're existing.
  11. Of course, it's up to you how
    you build your application.
  12. If you want to build it so
    that events only happen when you enter,
  13. then you don't need to check for the
    geofence transition exit and vice versa.