Geofences Login check (unregister/register geozones on logout/logout)

merge-requests/236/head
Zohaib Kambrani 4 years ago
parent 6f6ab8d987
commit 78928335ef

@ -1 +1 @@
067d482a9455eae7d109c3ac5a36de46
3f3d14a0ae775b56806906c2cb14a1f0

@ -40,8 +40,11 @@ class HMGPlatformBridge{
}else if methodCall.method == "isHMGNetworkAvailable"{
self.isHMGNetworkAvailable(methodCall:methodCall, result: result)
}else if methodCall.method == "unRegisterHmgGeofences"{
}else if methodCall.method == "registerHmgGeofences"{
self.registerHmgGeofences(result: result)
}else if methodCall.method == "unRegisterHmgGeofences"{
self.unRegisterHmgGeofences(result: result)
}
print("")

@ -73,7 +73,7 @@ class HMG_Geofence:NSObject{
func unRegisterAll(){
for region in locationManager.monitoredRegions {
locationManager.stopMonitoring(for: circularRegion)
locationManager.stopMonitoring(for: region)
}
}

@ -56,10 +56,10 @@ class GeofencingServices extends BaseService {
}
addTestingGeoZones(List zones) {
zones.add({"GEOF_ID": 12, "Description": "ZiK Home", "Latitude": "24.691136", "Longitude": "46.650116", "Radius": 100, "Type": 1});
zones.add({"GEOF_ID": 13, "Description": "CS Office", "Latitude": "24.7087913", "Longitude": "46.6656461", "Radius": 100, "Type": 1});
zones.add({"GEOF_ID": 14, "Description": "Mahmoud Shrouf Home", "Latitude": "24.777577", "Longitude": "46.652675", "Radius": 100, "Type": 1});
zones.add({"GEOF_ID": 14, "Description": "Panorama Mall", "Latitude": "24.692453", "Longitude": "46.669168", "Radius": 450, "Type": 1});
zones.add({"GEOF_ID": 16, "Description": "Saudi Architects Crossing", "Latitude": "24.698375", "Longitude": "46.668567", "Radius": 140, "Type": 1});
// zones.add({"GEOF_ID": 12, "Description": "ZiK Home", "Latitude": "24.691136", "Longitude": "46.650116", "Radius": 100, "Type": 1});
// zones.add({"GEOF_ID": 13, "Description": "CS Office", "Latitude": "24.7087913", "Longitude": "46.6656461", "Radius": 100, "Type": 1});
// zones.add({"GEOF_ID": 14, "Description": "Mahmoud Shrouf Home", "Latitude": "24.777577", "Longitude": "46.652675", "Radius": 100, "Type": 1});
// zones.add({"GEOF_ID": 14, "Description": "Panorama Mall", "Latitude": "24.692453", "Longitude": "46.669168", "Radius": 450, "Type": 1});
// zones.add({"GEOF_ID": 16, "Description": "Saudi Architects Crossing", "Latitude": "24.698375", "Longitude": "46.668567", "Radius": 140, "Type": 1});
}
}

@ -135,7 +135,7 @@ class PlatformBridge {
void showLoading(String message, bool show) async {
print("Invoking platform method: $show_loading_method");
try {
final int result = await platform.invokeMethod(show_loading_method, [message, show]);
var result = await platform.invokeMethod(show_loading_method, [message, show]);
} on PlatformException catch (e) {
print(e);
}
@ -143,10 +143,10 @@ class PlatformBridge {
// GEO Fences
void registerHmgGeofences() async {
final int result = await platform.invokeMethod(register_Hmg_Geofences);
var result = await platform.invokeMethod(register_Hmg_Geofences);
}
void unRegisterHmgGeofences() async {
final int result = await platform.invokeMethod(un_register_Hmg_Geofences);
var result = await platform.invokeMethod(un_register_Hmg_Geofences);
}
}

Loading…
Cancel
Save