Ejemplo n.º 1
0
 private GeofencingRequest GetGeofencingRequest()
 {
     GeofencingRequest.Builder builder = new GeofencingRequest.Builder();
     builder.SetInitialTrigger(GeofencingRequest.InitialTriggerEnter);
     builder.AddGeofences(mGeofenceList);
     return(builder.Build());
 }
Ejemplo n.º 2
0
        private GeofencingRequest CreateGeofencingRequest(IGeofence geofence)
        {
            var builder = new GeofencingRequest.Builder();

            builder.SetInitialTrigger(GeofencingRequest.InitialTriggerEnter);
            builder.AddGeofence(geofence);
            return(builder.Build());
        }
Ejemplo n.º 3
0
 /// <summary>
 /// GeofencingRequestを生成して返します。
 /// </summary>
 /// <returns>The geofencing request.</returns>
 private GeofencingRequest GetGeofencingRequest()
 {
     GeofencingRequest.Builder builder = new GeofencingRequest.Builder();
     //builder.SetInitialTrigger(NO_INITIAL_TRIGGER);
     builder.SetInitialTrigger(GeofencingRequest.InitialTriggerEnter);
     builder.AddGeofences(Geofences);
     return(builder.Build());
 }
 private GeofencingRequest GetGeofencingRequest(IList <Android.Gms.Location.IGeofence> geofenceList)
 {
     GeofencingRequest.Builder builder = new GeofencingRequest.Builder();
     builder.SetInitialTrigger(GeofencingRequest.InitialTriggerEnter);
     builder.AddGeofences(geofenceList);
     System.Diagnostics.Debug.WriteLine("Request");
     return(builder.Build());
 }
Ejemplo n.º 5
0
        GeofencingRequest GetGeofencingRequest()
        {
            var builder = new GeofencingRequest.Builder();

            builder.SetInitialTrigger(GeofencingRequest.InitialTriggerEnter);
            builder.AddGeofences(_geoList);

            return(builder.Build());
        }
Ejemplo n.º 6
0
        public GeofencingRequest GetAddGeofencingRequest(IGeofence geofence)
        {
            List <IGeofence> geofencesToAdd = new List <IGeofence>();

            geofencesToAdd.Add(geofence);
            GeofencingRequest.Builder builder = new GeofencingRequest.Builder();
            builder.SetInitialTrigger(GeofencingRequest.InitialTriggerEnter);
            builder.AddGeofences(geofencesToAdd);
            return(builder.Build());
        }
Ejemplo n.º 7
0
        void AddRegionsToApi( )
        {
            // setup our Geofencing API.
            GeofencingRequest.Builder builder = new GeofencingRequest.Builder();
            builder.SetInitialTrigger(GeofencingRequest.InitialTriggerEnter);

            // add each geofence to the Geofence API
            List <IGeofence> geoFences = new List <IGeofence>();

            foreach (TrackedRegion region in Regions)
            {
                geoFences.Add(region.Region);
            }
            builder.AddGeofences(geoFences);
            GeofencingRequest geofenceRequest = builder.Build( );


            // create the intent that should be launched when a geofence is triggered
            Intent        intent        = new Intent(this, typeof(LocationManagerService));
            PendingIntent pendingIntent = PendingIntent.GetService(this, 0, intent, PendingIntentFlags.UpdateCurrent);

            Android.Gms.Common.Apis.IPendingResult iAddPendingResult = LocationServices.GeofencingApi.AddGeofences(ILocationServiceApi, geofenceRequest, pendingIntent);
            iAddPendingResult.SetResultCallback(this);
        }
Ejemplo n.º 8
0
		GeofencingRequest GetGeofencingRequest() {
			var builder = new GeofencingRequest.Builder();

			builder.SetInitialTrigger(GeofencingRequest.InitialTriggerEnter);

			builder.AddGeofences(mGeofenceList);

			return builder.Build();
		}
 private GeofencingRequest getGeofencingRequest()
 {
     GeofencingRequest.Builder builder = new GeofencingRequest.Builder ();
     builder.SetInitialTrigger (GeofencingRequest.InitialTriggerEnter);
     builder.AddGeofences (geofenceList);
     return builder.Build ();
 }