android / location-samples

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

Does Geofencing really works? #204

Open leocavalcante opened 5 years ago

leocavalcante commented 5 years ago

I followed the steps at https://developer.android.com/training/location/geofencing, but nothing happens (no logs from the BrodcastReceiver). Just download and installed the Geofencing example here and no logs either. Some ideas of what I could be doing wrong? Location permissions are granted.

proft commented 5 years ago

The same issue. I've setuped simple geofence environment with broadcast and enable High accuracy but in background mode my broadcast doesn't invoked by system

proft commented 5 years ago

I've being struggling for 2 days on geofence and mean documentation ... I found that it works on real device and doesn't work on emulator

leocavalcante commented 5 years ago

I'm already testing on a real device, but it doesn't work for me.

fahime-ghasemi commented 5 years ago

In my opinion, Google geofence API has unreliable behaviors. The same code works sometimes and doesn't work sometimes.

saetia commented 5 years ago

developing for android is the worst experience of my life.

Pantkowsky commented 4 years ago

@leocavalcante what device are you running it on ? I have been battling geofencing for longer than I would like to admit now, but I did have a little breakthrough today:

Consider however taking a walk around with your device, rather than testing it on emulator. I have never got it to run on my emulator, regardless of it's setup, but the moment I went out with my device, things worked just fine.

I will come back with an edit when I figure out why nothing works on my Huawei. I've yet to confirm it on the oneplus device.

farmazon3000 commented 4 years ago

Google's Geofencing sometimes works, sometimes it does not. It depends on your hardware, location, speed and 1000s of other factors. This is why commercial sdk arises, let me link to just one of them. They may work better or worse, it's hard to say as long as their code is close-sourced.