Beispiel #1
0
 private void registerPlace(Place place) {
   Geofence geofence = place.getGeofence();
   if (geofence != null) {
     Intent intent = new Intent(INTENT_ACTION_GEOTRIGGER_STATIONARY_PROXIMITY_ALERT);
     intent.addCategory(INTENT_CATEGORY_GEOTRIGGER);
     PendingIntent stationaryRegionPI = getPendingIntentByPlace(context, place, intent, true);
     locationManager.addProximityAlert(
         geofence.getLatitude(),
         geofence.getLongitude(),
         geofence.getRadius(),
         (long) -1,
         stationaryRegionPI);
   }
 }