Closed bajjajjrajjesh closed 2 years ago
It is certainly due to your specific device (which you’ve not provided).
I’m testing every day on a variety of devices and it works. I have geofences all around my neighbourhood and along my bike ride.
I have tried using mock location app and I have tested on few devices and it is still not the getting notification.
@christocracy Can you please advise what needs to be done? why am I not getting notification?
I suggest you try the /example app in this repo.
Also see Wiki Debugging and learn to observe the plugin logs.
Also see https://dontkillmyapp.com
I have even kept my phone on foreground and I am still getting notification, additionally I have kept phone in background and geo fence is reach in 30 seconds which means app won't get killed so soon. In either of condition app is not sending notification.
I guess your phone sucks. Use a different one.
I test on the following devices, all with the same geofences throughout my neighborhood and daily bike ride.
Also just for the info, I have used similar app in same phone and that is working fine, which clearly means its not a issue specific to device.
I am pressing and holding the point in map to create the geofence and I assume that shall send the notification
also I have used 4 different brands of phone and all has same issue @christocracy
You need to authorize Always. Not When in Use
Are you even looking at the logs. The /example app has a handy “email log” button.
I will make a log and send it to you.
You’re simulating location.
Geofences almost never fire with mocked locations.
go outside with a real device.
I did a real drive still I am not getting notification.
Logs…
I am using app from play store. Does it has option to generate log?
What did I say here? https://github.com/transistorsoft/flutter_background_geolocation/issues/757#issuecomment-1139270969
And don’t post a massive amount of log text. Attach the file
A typical day (today) of field-testing with 5 devices using the Sample App:
These rounds are geofence? I don’t see this circle.
Also based on your screenshot it does shows that you have got notification for this geofence.
These rounds are geofence?
They are rendered in the demo server at http://tracker.transistorsoft.com when the plugin posts an onGeofence
event.
ENTER
event.EXIT
event.DWELL
event.They are also rendered in the demo app
This is just not working for me at all. I am unsure if I am making any mistake. More ever neither of your screenshot shows that you are getting notification of geofence.
Please advise me what shall be my next step from here as I am completely lost in this process now.
neither of your screenshot shows that you are getting notification of geofence.
Yes they do. The last screenshot shows 9 geofence events.
I don’t know what else to tell you. It’s not that hard.
Clearly I am not getting notification so what other steps I shall follow. Btw same device works fine with react native plugin to track location all the time. Which means it can't be device specific issue.
I have no idea what you’re doing wrong. Nobody has as much issue with geofences as you. The plugin has been doing geofencing since 2015. I test them every day.
Go analyze your logs.
Is there a way to analyse the log when moving in real and device not connected to system.
No. Simply use .emailLog()
Hi @christocracy here is the log
Hi @christocracy can you check the log.
Your logs do not show any evidence that you have added any geofences to monitor. You should not expect geofence events if you are not monitoring geofences.
When you are monitoring geofences, you will see something like this in the logs:
05-31 12:47:35.958 28922 29434 D TSLocationManager: [c.t.l.g.TSGeofenceManager$f run]
05-31 12:47:35.958 28922 29434 D TSLocationManager: ╔═════════════════════════════════════════════
05-31 12:47:35.958 28922 29434 D TSLocationManager: ║ TSGeofenceManager monitoring 18/18
05-31 12:47:35.958 28922 29434 D TSLocationManager: ╠═════════════════════════════════════════════
05-31 12:47:35.958 28922 29434 D TSLocationManager: ╟─ 🎾 [Flutter] Home
05-31 12:47:35.958 28922 29434 D TSLocationManager: ╟─ 🎾 [Flutter] Parc Outremont
05-31 12:47:35.958 28922 29434 D TSLocationManager: ╟─ 🎾 [Flutter] 5 Saison
05-31 12:47:35.958 28922 29434 D TSLocationManager: ╟─ 🎾 [Flutter] Laj
05-31 12:47:35.958 28922 29434 D TSLocationManager: ╟─ 🎾 [Flutter] Park Beaubien
05-31 12:47:35.958 28922 29434 D TSLocationManager: ╟─ 🎾 [Flutter] Parc & Fairmount
05-31 12:47:35.958 28922 29434 D TSLocationManager: ╟─ 🎾 [Flutter] Parc Couches Tard
05-31 12:47:35.958 28922 29434 D TSLocationManager: ╟─ 🎾 [Flutter] Laurier & Côtes Saint Catherines
05-31 12:47:35.958 28922 29434 D TSLocationManager: ╟─ 🎾 [Flutter] Mountain 1
05-31 12:47:35.958 28922 29434 D TSLocationManager: ╟─ 🎾 [Flutter] Mountain 2
05-31 12:47:35.958 28922 29434 D TSLocationManager: ╟─ 🎾 [Flutter] Mountain 3
05-31 12:47:35.958 28922 29434 D TSLocationManager: ╟─ 🎾 [Flutter] Mountain 4
05-31 12:47:35.958 28922 29434 D TSLocationManager: ╟─ 🎾 [Flutter] Mountain 5
05-31 12:47:35.958 28922 29434 D TSLocationManager: ╟─ 🎾 [Flutter] Mountain Lake
05-31 12:47:35.958 28922 29434 D TSLocationManager: ╟─ 🎾 [Flutter] Park JFK
05-31 12:47:35.958 28922 29434 D TSLocationManager: ╟─ 🎾 [Flutter] Rope Park
05-31 12:47:35.958 28922 29434 D TSLocationManager: ╟─ 🎾 [Flutter] Cafe Union
05-31 12:47:35.958 28922 29434 D TSLocationManager: ╟─ 🎾 [Flutter] Park Laurier
05-31 12:47:35.958 28922 29434 D TSLocationManager: ╚═════════════════════════════════════════════
I pressed and hold on the map to make geofence. I am unsure if I making any mistake.
And you've decided to ignore that [Add]
button on the top toolbar?
So…? Is this issue closed?
Hi @christocracy I have managed to get the latest log. can you please check this. IT has not geofence but I am still not getting notification but I do hear the debug sound. background-geolocation.log (1).gz
You wasted all my time because you weren't hitting the [Add]
button on the Dialog. Your logs are full of geofence events (20 of them).
Your geofence events are firing. This issue is closed.
06-01 16:29:35.247 INFO [GeofencingService a]
╔═════════════════════════════════════════════
║ Geofencing Event: ENTER
╠═════════════════════════════════════════════
╟─ 1
╚═════════════════════════════════════════════
ℹ️ [onGeofence] Flutter received onGeofence event [GeofenceEvent identifier: 1, action: ENTER]
06-01 16:30:57.232 INFO [GeofencingService a]
╔═════════════════════════════════════════════
║ Geofencing Event: ENTER
╠═════════════════════════════════════════════
╟─ 2
╚═════════════════════════════════════════════
ℹ️ [onGeofence] Flutter received onGeofence event [GeofenceEvent identifier: 2, action: ENTER]
06-01 16:31:28.196 INFO [GeofencingService a]
╔═════════════════════════════════════════════
║ Geofencing Event: EXIT
╠═════════════════════════════════════════════
╟─ 2
╚═════════════════════════════════════════════
ℹ️ [onGeofence] Flutter received onGeofence event [GeofenceEvent identifier: 2, action: EXIT]
Issue was without giving name to a geofence it would allow me to click save button and won’t save. That was only missed in the log I sent you. Otherwise my colleague was following same process as I was doing in the last one.
You maybe able to see the log. But I am not getting notification as an push notification for this geo fence. What shall be done about about that.
I’m not interested in your push notifications.
the plug-in’s responsibility ends when you can print a log message from your onGeofence
event.
this is a geolocation plugin, not a local notification plugin (push notifications are sent from a server to a device; local notifications are emitted by the device).
what you do in your onGeofence
event is your business.
I suggest you consult with your particular notification plugin you’re using as to why they don’t fire.
this issue is solved and closed.
Hi @christocracy
I have used the demo android app for flutter and I am not getting notification on geo fence entry and exit. Please the app link: https://play.google.com/store/apps/details?id=com.transistorsoft.flutterbackgroundgeolocationexample