smart-location-lib icon indicating copy to clipboard operation
smart-location-lib copied to clipboard

Geofincing doesn't work

Open GrishinSergey opened this issue 7 years ago • 4 comments

Hello, guys. I know that about geofencing was many issues but i really don't know, what to do. They are not working. I write as in example:

        // point
        GeofenceModel gfm = new GeofenceModel.Builder("dwellGarage")
                .setTransition(Geofence.GEOFENCE_TRANSITION_ENTER)
                .setLatitude(49.4584119)
                .setLongitude(32.0338578)
                .setRadius(500)
                .build();

        // try to catch onGeofenceTransition but I do not get here
        mSmartLocation.geofencing().add(gfm).start(new OnGeofencingTransitionListener() {
           @Override
           public void onGeofenceTransition(TransitionGeofence transitionGeofence) {
               Log.wtf("GEOFENCE", "we are here");
           }
        });

Maybe this part of the library work in the old version and can I use it?

GrishinSergey avatar Sep 04 '17 20:09 GrishinSergey

I am having the same issue.

GeofenceModel homeFence = new GeofenceModel.Builder(SettingsActivity.FENCE_HOMELOCATION)
         .setTransition(Geofence.GEOFENCE_TRANSITION_ENTER | Geofence.GEOFENCE_TRANSITION_EXIT |Geofence.GEOFENCE_TRANSITION_DWELL)
         .setLatitude(48.341786)
         .setLongitude(10.905211)
         .setRadius(100)
         .build();              
  
SmartLocation.with(this).geofencing()
         .add(homeFence)
         .start(new OnGeofencingTransitionListener() {

             @Override
             public void onGeofenceTransition(TransitionGeofence transitionGeofence)
             {
                     MyLogger.d(TAG, "Geofence Transition:" + transitionGeofence.getTransitionType());
             }
          });

I'm not getting any Log output when moving around.

MrWeezle avatar Sep 19 '17 14:09 MrWeezle

Any Update ?

AbdullahAlAsad avatar Nov 23 '17 07:11 AbdullahAlAsad

@mrmans0n I have the same issue. Any suggestions on this issue? It seems GeofencingService not triggered

andro-jedi avatar Dec 04 '17 14:12 andro-jedi

AndroidManifest.xml

araiyusuke avatar Apr 06 '18 08:04 araiyusuke