android / location-samples

Multiple samples showing the best practices in location APIs on Android.
Apache License 2.0
2.7k stars 2.78k forks source link

'ADD Geofence' and 'Remove Geofence' #166

Open jfvb opened 6 years ago

jfvb commented 6 years ago

I'm running this code on Android 5.0 and when the gradle build finishes successfully App is triggered with 'ADD Geofence' and 'Remove Geofence' buttons.

When I click any of these buttons, nothing is changing on the screen and I'm not seeing the maps at all.

tntkhang commented 6 years ago

Why do you expect that the map will be shown? When click on Add it will register the location on the Constant.java onto GeoFence so that when you enter the Fence it will push a Notification, the example doesn't show the Map on UI. That is the flow of example but I'm also can't make it work like expectation, notification can't push, I'm also trying to make it work.

faheemriaz-eng commented 4 years ago

On add geofence click it will register all the dummy locations exits in Constants file with name BAY_AREA_LANDMARKS to test this sample and notification you need to add ur current location Lat Lng into constants e.g BAY_AREA_LANDMARKS.put("Allama Iqbal open university", new LatLng(31.505585, 74.286793));

put ur current loc lat lng here and it will work like charm