Lines Matching refs:geofence
42 location, you add a radius. The latitude, longitude, and radius define a geofence, creating a
46 You can have multiple active geofences, with a limit of 100 per device user. For each geofence,
48 duration within the geofence area to wait, or <em>dwell</em>, before triggering an event. You
49 can limit the duration of any geofence by specifying an expiration duration in milliseconds.
50 After the geofence expires, Location Services automatically removes it.
53 <img src="{@docRoot}images/training/geofence@2x.png"
54 srcset="{@docRoot}images/training/geofence.png 1x, {@docRoot}images/training/geofence@2x.png 2x" al…
57 This lesson shows you how to add and remove geofences, and then listen for geofence transitions
72 The first step in requesting geofence monitoring is to request the necessary permission.
84 If you want to use an {@link android.app.IntentService} to listen for geofence transitions,
107 intents sent from Location Services when geofence transitions occur, you can define a
113 <h3>Create geofence objects</h3>
117 Geofence.Builder</a></code> to create a geofence, setting the desired radius, duration, and
118 transition types for the geofence. For example, to populate a list object named
124 // Set the request ID of the geofence. This is a string to identify this
125 // geofence.
149 specify the geofences to monitor and to set how related geofence events are triggered:
161 This example shows the use of two geofence triggers. The <code>
164 transition triggers when a device enters a geofence, and the <code>
167 transition triggers when a device exits a geofence. Specifying
174 should be triggered if the the device is already inside the geofence.</p>
180 which triggers events only when the user stops for a defined duration within a geofence.
187 <h3>Define an Intent for geofence transitions</h3>
240 When Location Services detects that the user has entered or exited a geofence, it
250 notification when a geofence transition occurs. When the user clicks the notification, the
295 this {@link android.app.IntentService} gets the geofence transition type and tests whether
305 <p>Stopping geofence monitoring when it is no longer needed or desired can help save battery
306 power and CPU cycles on the device. You can stop geofence monitoring
307 in the main activity used to add and remove geofences; removing a geofence stops it
342 increasing the latency of geofence alerts. For example, if you set a responsiveness value of five
347 <li><p>Use a larger geofence radius for locations where a user spends a significant amount of time,
353 <h3>Choose the optimal radius for your geofence</h3>
354 <p>For best results, the minimium radius of the geofence should be set between 100 - 150 meters.
357 location is available inside the geofence, assume that Wi-Fi location accuracy is about
366 <p>If you receive a large number of alerts when driving briefly past a geofence, the best way to
372 inside a geofence for a given period of time. You can choose the duration by setting a
403 <p>If geofences are not being triggered when the device enters a geofence
411 <li><strong>Accurate location is not available inside your geofence or your geofence is too
412 small.</strong> On most devices, the geofence service uses only network location for geofence
415 Starting with Google Play services 3.2, the geofence service calculates the overlapping ratio of
416 the location circle and the geofence circle and only generates the entrance alert when the ratio
417 is at least 85% for a bigger geofence or 75% for a smaller geofence. For an exit alert, the ratio
418 threshold used is 15% or 25%. Any ratio between these thresholds makes the geofence service mark
419 the geofence state as <code>INSIDE_LOW_CONFIDENCE</code> or <code>OUTSIDE_LOW_CONFIDENCE</code> and
422 the location accuracy, so if Wi-Fi is turned off, your application might never get geofence alerts
423 depending on several settings including the radius of the geofence, the device model, or the
430 <li><strong>There is no reliable network connectivity inside your geofence.</strong> If there is
431 no reliable data connection, alerts might not be generated. This is because the geofence service
433 <li><strong>Alerts can be late.</strong> The geofence service does not continuously query for