Mendix geofencing application

0
Hi guys! I want to make a geofencing application in Mendix where a user gets a push notification when he enters a “danger zone”. And I was wondering what the best way would be to do this. I tough of making a “server API” where the client keeps pushing its geolocation and when it’s in between a specific zone it gets a certain push notification. Would this be the best way or does anyone have suggestions for doing this in Mendix. Thanks alot!
asked
3 answers
4

I would look at integrating a React Native module that implements geofencing into your app. There are quite a few options out there. This one in particular piqued my interest as it is quite simple and likely exactly what you need:

https://github.com/eddieowens/react-native-boundary

You’ll also want notifications

Steps to implement:

  • First, you won’t be able to use the Make it Native app to test this functionality, You’ll have to build your app, so read up on the Native Builder
  • Add the react-native-boundary module to your native app project
  • In Studio Pro, create JavaScript actions for the Boundary.add and Boundary.remove, as well as event handlers for the enter and exit boundary events. On those events, you could send notifications. See the NativeMobileActions.DisplayNotification javascript action for example code there.

 

answered
3

Does your client app only need to send it's location data when it's actually being used. and thus open on the screen Or also when it's running in the background?

With the latter there are also some third party solutions you can use. But from what i heard it's not always easy and drains the battery quickly.

Here's an earlier asked question with an answer where Traccar was used to monitor a user's location while the app was running in the background. https://forum.mendix.com/link/questions/91250

answered
2

With these widgets: https://appstore.home.mendix.com/link/app/109513/ you should be able to get what you want. 
Based on your (geo)location (used from your mobile device) you should be able to find out if the user is entering and predefined ‘danger zone’. Once you have determined that you can use common Mendix logic to sent out a push notification to you user.

Getting the Geolocation is default functionality of Mendix 8

 

 

answered