Return to Video

Creating the geofenced pending intent

  • 0:01 - 0:04
    So here's my method,
    get GeoFence pending intent.
  • 0:04 - 0:09
    To this I create a new intent and
    I pass it that this is the context.
  • 0:09 - 0:13
    And if you remember earlier we created
    a GeoFence transitions intent service.
  • 0:13 - 0:15
    So we just specify the class of that.
  • 0:15 - 0:18
    So our new intent is going to
    be a GeoFence transitions intent
  • 0:18 - 0:20
    service type.
  • 0:20 - 0:23
    And then we return pending intent or
    get service.
  • 0:23 - 0:27
    This, zero, intent,
    which is the intent we've just created.
  • 0:27 - 0:30
    And then this
    PendingIntent.FLAG_UPDATE_CURRENT.
  • 0:30 - 0:33
    We use FLAG_UPDATE_CURRENT so
  • 0:33 - 0:38
    that we get the same PendingIntent
    back when we call addGeofences.
  • 0:38 - 0:40
    We want to keep the PendingIntent
    consistent across them all.
Tytuł:
Creating the geofenced pending intent
Opis:

more » « less
Video Language:
English
Team:
Udacity
Projekt:
UD876-1 - Google Play Services - Location & Contex
Duration:
0:41

English subtitles

Revisions Compare revisions