@woosmap/react-native-plugin-geofencing 0.1.22 → 0.1.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/android/build.gradle +5 -1
- package/android/src/main/java/com/reactnativeplugingeofencing/PluginGeofencingModule.java +1 -1
- package/android/src/main/java/com/reactnativeplugingeofencing/WoosRegionReadyListener.java +3 -3
- package/android/src/main/java/com/reactnativeplugingeofencing/WoosmapTask.java +4 -4
- package/android/src/main/java/com/reactnativeplugingeofencing/WoosmapUtil.java +4 -4
- package/ios/DataLocation.swift +1 -1
- package/ios/PluginGeofencing.swift +1 -0
- package/ios/WoosmapGeofenceService.swift +6 -5
- package/package.json +1 -145
- package/react-native-plugin-geofencing.podspec +1 -1
- package/src/internal/Region.tsx +7 -2
- package/lib/commonjs/index.js +0 -333
- package/lib/commonjs/index.js.map +0 -1
- package/lib/commonjs/internal/Airship.js +0 -28
- package/lib/commonjs/internal/Airship.js.map +0 -1
- package/lib/commonjs/internal/Location.js +0 -43
- package/lib/commonjs/internal/Location.js.map +0 -1
- package/lib/commonjs/internal/MarketingCloud.js +0 -28
- package/lib/commonjs/internal/MarketingCloud.js.map +0 -1
- package/lib/commonjs/internal/Poi.js +0 -80
- package/lib/commonjs/internal/Poi.js.map +0 -1
- package/lib/commonjs/internal/Region.js +0 -52
- package/lib/commonjs/internal/Region.js.map +0 -1
- package/lib/commonjs/internal/Visit.js +0 -39
- package/lib/commonjs/internal/Visit.js.map +0 -1
- package/lib/commonjs/internal/Zoi.js +0 -75
- package/lib/commonjs/internal/Zoi.js.map +0 -1
- package/lib/commonjs/internal/nativeInterface.js +0 -14
- package/lib/commonjs/internal/nativeInterface.js.map +0 -1
- package/lib/commonjs/internal/types.js +0 -2
- package/lib/commonjs/internal/types.js.map +0 -1
- package/lib/module/index.js +0 -325
- package/lib/module/index.js.map +0 -1
- package/lib/module/internal/Airship.js +0 -26
- package/lib/module/internal/Airship.js.map +0 -1
- package/lib/module/internal/Location.js +0 -36
- package/lib/module/internal/Location.js.map +0 -1
- package/lib/module/internal/MarketingCloud.js +0 -26
- package/lib/module/internal/MarketingCloud.js.map +0 -1
- package/lib/module/internal/Poi.js +0 -73
- package/lib/module/internal/Poi.js.map +0 -1
- package/lib/module/internal/Region.js +0 -45
- package/lib/module/internal/Region.js.map +0 -1
- package/lib/module/internal/Visit.js +0 -37
- package/lib/module/internal/Visit.js.map +0 -1
- package/lib/module/internal/Zoi.js +0 -73
- package/lib/module/internal/Zoi.js.map +0 -1
- package/lib/module/internal/nativeInterface.js +0 -7
- package/lib/module/internal/nativeInterface.js.map +0 -1
- package/lib/module/internal/types.js +0 -2
- package/lib/module/internal/types.js.map +0 -1
- package/lib/typescript/__tests__/index.test.d.ts +0 -0
- package/lib/typescript/index.d.ts +0 -156
- package/lib/typescript/internal/Airship.d.ts +0 -18
- package/lib/typescript/internal/Location.d.ts +0 -26
- package/lib/typescript/internal/MarketingCloud.d.ts +0 -18
- package/lib/typescript/internal/Poi.d.ts +0 -50
- package/lib/typescript/internal/Region.d.ts +0 -32
- package/lib/typescript/internal/Visit.d.ts +0 -25
- package/lib/typescript/internal/Zoi.d.ts +0 -49
- package/lib/typescript/internal/nativeInterface.d.ts +0 -2
- package/lib/typescript/internal/types.d.ts +0 -18
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
### Latest
|
|
2
|
+
* Added a new field named `eventName` in the region callback
|
|
3
|
+
|
|
4
|
+
### 0.1.9
|
|
5
|
+
* #56 region create event triggers other than region log event removed in android. by @dippatra in https://github.com/Woosmap/geofencing-react-native-plugin/pull/58
|
|
6
|
+
|
|
7
|
+
### 0.1.8
|
|
8
|
+
* #53 POI identifier (idStore) is not returned in the Region object issue by @dippatra in https://github.com/Woosmap/geofencing-react-native-plugin/pull/54
|
package/android/build.gradle
CHANGED
|
@@ -51,12 +51,16 @@ repositories {
|
|
|
51
51
|
google()
|
|
52
52
|
mavenCentral()
|
|
53
53
|
jcenter()
|
|
54
|
+
maven { url 'https://jitpack.io' }
|
|
54
55
|
}
|
|
55
56
|
|
|
56
57
|
dependencies {
|
|
57
58
|
//noinspection GradleDynamicVersion
|
|
58
59
|
implementation "com.facebook.react:react-native:+" // From node_modules
|
|
59
|
-
implementation
|
|
60
|
+
implementation 'com.google.android.gms:play-services-location:18.0.0'
|
|
61
|
+
implementation 'com.google.code.gson:gson:2.8.8'
|
|
62
|
+
implementation "com.github.woosmap:geofencing-core-android-sdk:core_geofence_2.1"
|
|
63
|
+
implementation("com.webgeoservices.woosmapgeofencing:woosmap-mobile-sdk:3.0.1")
|
|
60
64
|
implementation 'com.google.android.gms:play-services-maps:17.0.0'
|
|
61
65
|
implementation 'androidx.room:room-runtime:2.2.4'
|
|
62
66
|
annotationProcessor 'androidx.room:room-compiler:2.2.4'
|
|
@@ -25,7 +25,7 @@ import com.facebook.react.modules.core.PermissionAwareActivity;
|
|
|
25
25
|
import com.facebook.react.modules.core.PermissionListener;
|
|
26
26
|
import com.webgeoservices.woosmapgeofencing.Woosmap;
|
|
27
27
|
import com.webgeoservices.woosmapgeofencing.WoosmapSettings;
|
|
28
|
-
import com.webgeoservices.
|
|
28
|
+
import com.webgeoservices.woosmapgeofencingcore.database.Region;
|
|
29
29
|
|
|
30
30
|
import java.lang.reflect.Array;
|
|
31
31
|
import java.util.ArrayList;
|
|
@@ -8,8 +8,8 @@ import com.facebook.react.ReactNativeHost;
|
|
|
8
8
|
import com.facebook.react.bridge.ReactContext;
|
|
9
9
|
import com.facebook.react.modules.core.DeviceEventManagerModule;
|
|
10
10
|
import com.webgeoservices.woosmapgeofencing.Woosmap;
|
|
11
|
-
import com.webgeoservices.
|
|
12
|
-
import com.webgeoservices.
|
|
11
|
+
import com.webgeoservices.woosmapgeofencingcore.database.Region;
|
|
12
|
+
import com.webgeoservices.woosmapgeofencingcore.database.RegionLog;
|
|
13
13
|
|
|
14
14
|
/***
|
|
15
15
|
* Implements Woosmap Region callbacks
|
|
@@ -41,6 +41,6 @@ public class WoosRegionReadyListener implements Woosmap.RegionReadyListener,Woos
|
|
|
41
41
|
|
|
42
42
|
@Override
|
|
43
43
|
public void RegionReadyCallback(Region region) {
|
|
44
|
-
|
|
44
|
+
|
|
45
45
|
}
|
|
46
46
|
}
|
|
@@ -13,10 +13,10 @@ import com.facebook.react.bridge.WritableArray;
|
|
|
13
13
|
import com.facebook.react.bridge.WritableNativeArray;
|
|
14
14
|
import com.google.android.gms.maps.model.LatLng;
|
|
15
15
|
import com.webgeoservices.woosmapgeofencing.Woosmap;
|
|
16
|
-
import com.webgeoservices.
|
|
17
|
-
import com.webgeoservices.
|
|
18
|
-
import com.webgeoservices.
|
|
19
|
-
import com.webgeoservices.
|
|
16
|
+
import com.webgeoservices.woosmapgeofencingcore.database.MovingPosition;
|
|
17
|
+
import com.webgeoservices.woosmapgeofencingcore.database.POI;
|
|
18
|
+
import com.webgeoservices.woosmapgeofencingcore.database.Region;
|
|
19
|
+
import com.webgeoservices.woosmapgeofencingcore.database.WoosmapDb;
|
|
20
20
|
|
|
21
21
|
import org.json.JSONObject;
|
|
22
22
|
|
|
@@ -9,10 +9,10 @@ import com.facebook.react.bridge.WritableArray;
|
|
|
9
9
|
import com.facebook.react.bridge.WritableMap;
|
|
10
10
|
import com.facebook.react.bridge.WritableNativeArray;
|
|
11
11
|
import com.facebook.react.bridge.WritableNativeMap;
|
|
12
|
-
import com.webgeoservices.
|
|
13
|
-
import com.webgeoservices.
|
|
14
|
-
import com.webgeoservices.
|
|
15
|
-
import com.webgeoservices.
|
|
12
|
+
import com.webgeoservices.woosmapgeofencingcore.database.MovingPosition;
|
|
13
|
+
import com.webgeoservices.woosmapgeofencingcore.database.POI;
|
|
14
|
+
import com.webgeoservices.woosmapgeofencingcore.database.Region;
|
|
15
|
+
import com.webgeoservices.woosmapgeofencingcore.database.RegionLog;
|
|
16
16
|
|
|
17
17
|
import org.json.JSONArray;
|
|
18
18
|
import org.json.JSONException;
|
package/ios/DataLocation.swift
CHANGED
|
@@ -38,7 +38,7 @@ public class DataLocation: LocationServiceDelegate {
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
public func readLocations(id:String) -> Location? {
|
|
41
|
-
return Locations.
|
|
41
|
+
return Locations.getLocationFromId(id: id)
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
public func eraseLocations() {
|
|
@@ -963,6 +963,7 @@ class PluginGeofencing: RCTEventEmitter {
|
|
|
963
963
|
result["radius"] = woosdata.radius
|
|
964
964
|
result["frompositiondetection"] = woosdata.fromPositionDetection
|
|
965
965
|
result["eventname"] = woosdata.eventName
|
|
966
|
+
result["spenttime"] = woosdata.spentTime
|
|
966
967
|
return result
|
|
967
968
|
}
|
|
968
969
|
|
|
@@ -407,7 +407,7 @@ import AirshipCore
|
|
|
407
407
|
if let locationService = WoosmapGeofencing.shared.locationService{
|
|
408
408
|
if let customRegion = locationService.locationManager?.monitoredRegions{
|
|
409
409
|
customRegion.forEach { item in
|
|
410
|
-
if(locationService.getRegionType(identifier: item.identifier) ==
|
|
410
|
+
if(locationService.getRegionType(identifier: item.identifier) == RegionType.custom){
|
|
411
411
|
let customRegion = Region()
|
|
412
412
|
customRegion.identifier = item.identifier
|
|
413
413
|
if let circleRegion = item as? CLCircularRegion{
|
|
@@ -430,7 +430,8 @@ import AirshipCore
|
|
|
430
430
|
/// - Returns: Region
|
|
431
431
|
public func getRegions(id:String) -> Region? {
|
|
432
432
|
if let locationService = WoosmapGeofencing.shared.locationService{
|
|
433
|
-
|
|
433
|
+
let regiontype = locationService.getRegionType(identifier: id)
|
|
434
|
+
if( regiontype == RegionType.custom){
|
|
434
435
|
if let customRegions = locationService.locationManager?.monitoredRegions{
|
|
435
436
|
if let watchRegion = customRegions.first(where: { item in
|
|
436
437
|
return item.identifier == id
|
|
@@ -496,12 +497,12 @@ import AirshipCore
|
|
|
496
497
|
|
|
497
498
|
/// Delete all ZOI regions
|
|
498
499
|
public func deleteAllZoiRegion() {
|
|
499
|
-
WoosmapGeofencing.shared.locationService.removeRegions(type:
|
|
500
|
+
WoosmapGeofencing.shared.locationService.removeRegions(type: RegionType.custom)
|
|
500
501
|
}
|
|
501
502
|
|
|
502
503
|
/// Delete all POI regions
|
|
503
504
|
public func deleteAllPoiRegion() {
|
|
504
|
-
WoosmapGeofencing.shared.locationService.removeRegions(type:
|
|
505
|
+
WoosmapGeofencing.shared.locationService.removeRegions(type: RegionType.poi)
|
|
505
506
|
}
|
|
506
507
|
|
|
507
508
|
/// Delete regions by id
|
|
@@ -521,7 +522,7 @@ import AirshipCore
|
|
|
521
522
|
/// Delete all regions
|
|
522
523
|
public func deleteAllRegion() {
|
|
523
524
|
DataRegion().eraseRegions()
|
|
524
|
-
WoosmapGeofencing.shared.locationService.removeRegions(type:
|
|
525
|
+
WoosmapGeofencing.shared.locationService.removeRegions(type: RegionType.none)
|
|
525
526
|
}
|
|
526
527
|
|
|
527
528
|
@objc static public func mockdata() {
|
package/package.json
CHANGED
|
@@ -1,145 +1 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@woosmap/react-native-plugin-geofencing",
|
|
3
|
-
"version": "0.1.22",
|
|
4
|
-
"description": "This react-native plugin extends the functionality offered by the Woosmap Geofencing Mobile SDKs. Find more about the Woosmap Geofencing SDK",
|
|
5
|
-
"main": "lib/commonjs/index",
|
|
6
|
-
"module": "lib/module/index",
|
|
7
|
-
"types": "lib/typescript/index.d.ts",
|
|
8
|
-
"react-native": "src/index",
|
|
9
|
-
"source": "src/index",
|
|
10
|
-
"files": [
|
|
11
|
-
"src",
|
|
12
|
-
"lib",
|
|
13
|
-
"android",
|
|
14
|
-
"ios",
|
|
15
|
-
"cpp",
|
|
16
|
-
"react-native-plugin-geofencing.podspec"
|
|
17
|
-
],
|
|
18
|
-
"scripts": {
|
|
19
|
-
"test": "jest",
|
|
20
|
-
"typescript": "tsc --noEmit",
|
|
21
|
-
"lint": "eslint \"**/*.{js,ts,tsx}\"",
|
|
22
|
-
"prepare": "bob build",
|
|
23
|
-
"release": "release-it",
|
|
24
|
-
"example": "yarn --cwd example",
|
|
25
|
-
"pods": "cd example && pod-install --quiet",
|
|
26
|
-
"bootstrap": "yarn example && yarn && yarn pods"
|
|
27
|
-
},
|
|
28
|
-
"keywords": [
|
|
29
|
-
"react-native",
|
|
30
|
-
"ios",
|
|
31
|
-
"android",
|
|
32
|
-
"woosmap"
|
|
33
|
-
],
|
|
34
|
-
"repository": "https://github.com/Woosmap/woosmap-geofencing-react-native-plugin",
|
|
35
|
-
"author": "WGS Indoor <28100769+sameerdhulap@users.noreply.github.com> (https://github.com/sameerdhulap)",
|
|
36
|
-
"license": "MIT",
|
|
37
|
-
"bugs": {
|
|
38
|
-
"url": "https://github.com/Woosmap/woosmap-geofencing-react-native-plugin/issues"
|
|
39
|
-
},
|
|
40
|
-
"homepage": "https://github.com/Woosmap/woosmap-geofencing-react-native-plugin#readme",
|
|
41
|
-
"publishConfig": {
|
|
42
|
-
"registry": "https://registry.npmjs.org/"
|
|
43
|
-
},
|
|
44
|
-
"devDependencies": {
|
|
45
|
-
"@commitlint/config-conventional": "^11.0.0",
|
|
46
|
-
"@react-native-community/eslint-config": "^2.0.0",
|
|
47
|
-
"@release-it/conventional-changelog": "^2.0.0",
|
|
48
|
-
"@types/jest": "^26.0.0",
|
|
49
|
-
"@types/react": "^16.9.19",
|
|
50
|
-
"@types/react-native": "0.62.13",
|
|
51
|
-
"commitlint": "^11.0.0",
|
|
52
|
-
"eslint": "^7.2.0",
|
|
53
|
-
"eslint-config-prettier": "^7.0.0",
|
|
54
|
-
"eslint-plugin-prettier": "^3.1.3",
|
|
55
|
-
"husky": "^6.0.0",
|
|
56
|
-
"jest": "^26.0.1",
|
|
57
|
-
"pod-install": "^0.1.0",
|
|
58
|
-
"prettier": "^2.0.5",
|
|
59
|
-
"react": "16.13.1",
|
|
60
|
-
"react-native": "^0.68.1",
|
|
61
|
-
"react-native-builder-bob": "^0.18.0",
|
|
62
|
-
"release-it": "^14.2.2",
|
|
63
|
-
"typescript": "^4.1.3"
|
|
64
|
-
},
|
|
65
|
-
"peerDependencies": {
|
|
66
|
-
"react": "*",
|
|
67
|
-
"react-native": "*"
|
|
68
|
-
},
|
|
69
|
-
"jest": {
|
|
70
|
-
"preset": "react-native",
|
|
71
|
-
"modulePathIgnorePatterns": [
|
|
72
|
-
"<rootDir>/example/node_modules",
|
|
73
|
-
"<rootDir>/lib/"
|
|
74
|
-
]
|
|
75
|
-
},
|
|
76
|
-
"commitlint": {
|
|
77
|
-
"extends": [
|
|
78
|
-
"@commitlint/config-conventional"
|
|
79
|
-
]
|
|
80
|
-
},
|
|
81
|
-
"release-it": {
|
|
82
|
-
"git": {
|
|
83
|
-
"commitMessage": "chore: release ${version}",
|
|
84
|
-
"tagName": "v${version}"
|
|
85
|
-
},
|
|
86
|
-
"npm": {
|
|
87
|
-
"publish": true
|
|
88
|
-
},
|
|
89
|
-
"github": {
|
|
90
|
-
"release": true
|
|
91
|
-
},
|
|
92
|
-
"plugins": {
|
|
93
|
-
"@release-it/conventional-changelog": {
|
|
94
|
-
"preset": "angular"
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
},
|
|
98
|
-
"eslintConfig": {
|
|
99
|
-
"root": true,
|
|
100
|
-
"extends": [
|
|
101
|
-
"@react-native-community",
|
|
102
|
-
"prettier"
|
|
103
|
-
],
|
|
104
|
-
"rules": {
|
|
105
|
-
"prettier/prettier": [
|
|
106
|
-
"error",
|
|
107
|
-
{
|
|
108
|
-
"quoteProps": "consistent",
|
|
109
|
-
"singleQuote": true,
|
|
110
|
-
"tabWidth": 2,
|
|
111
|
-
"trailingComma": "es5",
|
|
112
|
-
"useTabs": false
|
|
113
|
-
}
|
|
114
|
-
]
|
|
115
|
-
}
|
|
116
|
-
},
|
|
117
|
-
"eslintIgnore": [
|
|
118
|
-
"node_modules/",
|
|
119
|
-
"lib/"
|
|
120
|
-
],
|
|
121
|
-
"prettier": {
|
|
122
|
-
"quoteProps": "consistent",
|
|
123
|
-
"singleQuote": true,
|
|
124
|
-
"tabWidth": 2,
|
|
125
|
-
"trailingComma": "es5",
|
|
126
|
-
"useTabs": false
|
|
127
|
-
},
|
|
128
|
-
"react-native-builder-bob": {
|
|
129
|
-
"source": "src",
|
|
130
|
-
"output": "lib",
|
|
131
|
-
"targets": [
|
|
132
|
-
"commonjs",
|
|
133
|
-
"module",
|
|
134
|
-
[
|
|
135
|
-
"typescript",
|
|
136
|
-
{
|
|
137
|
-
"project": "tsconfig.build.json"
|
|
138
|
-
}
|
|
139
|
-
]
|
|
140
|
-
]
|
|
141
|
-
},
|
|
142
|
-
"dependencies": {
|
|
143
|
-
"react-native-uuid": "^2.0.1"
|
|
144
|
-
}
|
|
145
|
-
}
|
|
1
|
+
{"name":"@woosmap/react-native-plugin-geofencing","version":"0.1.23","description":"This react-native plugin extends the functionality offered by the Woosmap Geofencing Mobile SDKs. Find more about the Woosmap Geofencing SDK","main":"lib/commonjs/index","module":"lib/module/index","types":"lib/typescript/index.d.ts","react-native":"src/index","source":"src/index","files":["src","lib","android","ios","cpp","react-native-plugin-geofencing.podspec"],"scripts":{"test":"jest","typescript":"tsc --noEmit","lint":"eslint \"**/*.{js,ts,tsx}\"","prepare":"bob build","release":"release-it","example":"yarn --cwd example","pods":"cd example && pod-install --quiet","bootstrap":"yarn example && yarn && yarn pods"},"keywords":["react-native","ios","android","woosmap"],"repository":"https://github.com/Woosmap/woosmap-geofencing-react-native-plugin","author":"WGS Indoor <28100769+sameerdhulap@users.noreply.github.com> (https://github.com/sameerdhulap)","license":"MIT","bugs":{"url":"https://github.com/Woosmap/woosmap-geofencing-react-native-plugin/issues"},"homepage":"https://github.com/Woosmap/woosmap-geofencing-react-native-plugin#readme","publishConfig":{"registry":"https://registry.npmjs.org/"},"devDependencies":{"@commitlint/config-conventional":"^11.0.0","@react-native-community/eslint-config":"^2.0.0","@release-it/conventional-changelog":"^2.0.0","@types/jest":"^26.0.0","@types/react":"^16.9.19","@types/react-native":"0.62.13","commitlint":"^11.0.0","eslint":"^7.2.0","eslint-config-prettier":"^7.0.0","eslint-plugin-prettier":"^3.1.3","husky":"^6.0.0","jest":"^26.0.1","pod-install":"^0.1.0","prettier":"^2.0.5","react":"16.13.1","react-native":"^0.68.1","react-native-builder-bob":"^0.18.0","release-it":"^14.2.2","typescript":"^4.1.3"},"peerDependencies":{"react":"*","react-native":"*"},"jest":{"preset":"react-native","modulePathIgnorePatterns":["<rootDir>/example/node_modules","<rootDir>/lib/"]},"commitlint":{"extends":["@commitlint/config-conventional"]},"release-it":{"git":{"commitMessage":"chore: release ${version}","tagName":"v${version}"},"npm":{"publish":true},"github":{"release":true},"plugins":{"@release-it/conventional-changelog":{"preset":"angular"}}},"eslintConfig":{"root":true,"extends":["@react-native-community","prettier"],"rules":{"prettier/prettier":["error",{"quoteProps":"consistent","singleQuote":true,"tabWidth":2,"trailingComma":"es5","useTabs":false}]}},"eslintIgnore":["node_modules/","lib/"],"prettier":{"quoteProps":"consistent","singleQuote":true,"tabWidth":2,"trailingComma":"es5","useTabs":false},"react-native-builder-bob":{"source":"src","output":"lib","targets":["commonjs","module",["typescript",{"project":"tsconfig.build.json"}]]},"dependencies":{"react-native-uuid":"^2.0.1"}}
|
package/src/internal/Region.tsx
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* @param {number} radius The radius of the region in meters.
|
|
11
11
|
* @param {boolean} frompositiondetection Determines whether the user's current position is inside the region.
|
|
12
12
|
* @param {string} eventName Describe cause of region event, Entry or Exit.
|
|
13
|
+
* @param {number} spenttime Number of seconds the user spent in region in case of event name Exit.
|
|
13
14
|
*/
|
|
14
15
|
class Region {
|
|
15
16
|
Date: number;
|
|
@@ -20,6 +21,7 @@ class Region {
|
|
|
20
21
|
Radius: number;
|
|
21
22
|
Frompositiondetection: boolean;
|
|
22
23
|
Eventname: string;
|
|
24
|
+
SpentTime: number;
|
|
23
25
|
constructor(
|
|
24
26
|
date: number,
|
|
25
27
|
didenter: boolean,
|
|
@@ -28,7 +30,8 @@ class Region {
|
|
|
28
30
|
longitude: number,
|
|
29
31
|
radius: number,
|
|
30
32
|
frompositiondetection: boolean,
|
|
31
|
-
eventname: string
|
|
33
|
+
eventname: string,
|
|
34
|
+
spenttime: number
|
|
32
35
|
) {
|
|
33
36
|
this.Date = date;
|
|
34
37
|
this.Didenter = didenter;
|
|
@@ -38,6 +41,7 @@ class Region {
|
|
|
38
41
|
this.Radius = radius;
|
|
39
42
|
this.Frompositiondetection = frompositiondetection;
|
|
40
43
|
this.Eventname = eventname;
|
|
44
|
+
this.SpentTime = spenttime;
|
|
41
45
|
}
|
|
42
46
|
/**
|
|
43
47
|
* Converts json object to an object of type Region.
|
|
@@ -54,7 +58,8 @@ class Region {
|
|
|
54
58
|
json.longitude,
|
|
55
59
|
json.radius,
|
|
56
60
|
json.frompositiondetection,
|
|
57
|
-
json.eventname
|
|
61
|
+
json.eventname,
|
|
62
|
+
json.spenttime
|
|
58
63
|
);
|
|
59
64
|
}
|
|
60
65
|
}
|