diff --git a/app/src/main/java/com/tinmegali/mylocation/MainActivity.java b/app/src/main/java/com/tinmegali/mylocation/MainActivity.java index 4a61895..63d9bf2 100644 --- a/app/src/main/java/com/tinmegali/mylocation/MainActivity.java +++ b/app/src/main/java/com/tinmegali/mylocation/MainActivity.java @@ -364,8 +364,9 @@ private PendingIntent createGeofencePendingIntent() { return geoFencePendingIntent; Intent intent = new Intent( this, GeofenceTrasitionService.class); - return PendingIntent.getService( + geoFencePendingIntent = PendingIntent.getService( this, GEOFENCE_REQ_CODE, intent, PendingIntent.FLAG_UPDATE_CURRENT ); + return geoFencePendingIntent; } // Add the created GeofenceRequest to the device's monitoring list