How to track Real time location of device when app is closed

We have the below Requirement:

1. The requirement is to have push notifications sent to the user’s mobile device based on his / her geo-location.
2. These notifications will be primarily on offers being presented within the geo-location range.


1. The co-ordinates and the offerings (descriptions) of the desired geo-locations will be stored in a table in the Application database.
2. Once a customer’s device is within the geo-location range, the Application backend will send push notification to the user’s mobile device which will then be received by the front-end app.

Kindly suggest the solution on how to track user`s real time location Even if application is closed .
Please use Appzillon's Real Time Location Tracking plugin. If not enabled, then you can enable it at Appzillon >> Preferences >> Features.

This API tracks the real time location of the device, if the app is running in foreground or background. Based on the distance or time interval location will be sent to Server.

Example to call the plugin :

Code: Select all

realTimeLocationTracking = function()
        var json = {}; = "REAL_TIME_TRACK_LOCATION";
	 json.isIntervalBased = "Y";
   	 json.interval = 30 * 1000; // 30 seconds
   	 json.displacement = 1 ;// 1 meter
   	 json.callBack = trackLocationCallback;

trackLocationCallback = function(json){