@woosmap/react-native-plugin-geofencing 0.13.0 → 0.13.1
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
CHANGED
|
@@ -85,7 +85,7 @@ public class AirshipPushHelper implements AbstractPushHelper {
|
|
|
85
85
|
con.setAccessible(true);
|
|
86
86
|
Object eventInstance = con.newInstance(builderInstance);
|
|
87
87
|
Method track = eventClass.getMethod("track");
|
|
88
|
-
|
|
88
|
+
track.invoke(eventInstance);
|
|
89
89
|
Log.d(TAG,"event tracked");
|
|
90
90
|
break;
|
|
91
91
|
}
|
|
@@ -121,9 +121,7 @@ public class AirshipPushHelper implements AbstractPushHelper {
|
|
|
121
121
|
POI poi = this.db.getPOIsDAO().getPOIbyStoreId(regionLog.idStore);
|
|
122
122
|
if (poi != null) {
|
|
123
123
|
HashMap<String, Object> poiData = setDataAirshipPOI(poi);
|
|
124
|
-
|
|
125
|
-
data.putAll(poiData);
|
|
126
|
-
}
|
|
124
|
+
data.putAll(poiData);
|
|
127
125
|
}
|
|
128
126
|
data.put("date", displayDateFormatAirship.format(regionLog.dateTime));
|
|
129
127
|
data.put("event", eventName);
|
|
@@ -151,7 +149,7 @@ public class AirshipPushHelper implements AbstractPushHelper {
|
|
|
151
149
|
if (!"null".equals(POIaround.countryCode)) {
|
|
152
150
|
data.put("country_code", POIaround.countryCode);
|
|
153
151
|
}
|
|
154
|
-
data.put("openNow", POIaround.openNow);
|
|
152
|
+
data.put("openNow", POIaround.openNow());
|
|
155
153
|
|
|
156
154
|
// User Properties
|
|
157
155
|
try {
|
|
@@ -163,7 +161,7 @@ public class AirshipPushHelper implements AbstractPushHelper {
|
|
|
163
161
|
}
|
|
164
162
|
}
|
|
165
163
|
} catch (JSONException e) {
|
|
166
|
-
e.
|
|
164
|
+
Log.e(TAG, e.toString());
|
|
167
165
|
}
|
|
168
166
|
|
|
169
167
|
return data;
|
|
@@ -255,7 +255,7 @@ public class PluginGeofencingModule extends ReactContextBaseJavaModule implement
|
|
|
255
255
|
promise.reject(WoosmapMessageAndKey.errorCode, WoosmapMessageAndKey.permissionValueNotProvided);
|
|
256
256
|
}
|
|
257
257
|
boolean isBackground = data.getBoolean(0);
|
|
258
|
-
PermissionAwareActivity activity = (PermissionAwareActivity) getCurrentActivity();
|
|
258
|
+
PermissionAwareActivity activity = (PermissionAwareActivity) getReactApplicationContext().getCurrentActivity();
|
|
259
259
|
mPermissionsRequestPromise = promise;
|
|
260
260
|
if (activity != null) {
|
|
261
261
|
if (Build.VERSION.SDK_INT >= 23) {
|
|
@@ -281,7 +281,7 @@ public class PluginGeofencingModule extends ReactContextBaseJavaModule implement
|
|
|
281
281
|
if (promise == null) {
|
|
282
282
|
return;
|
|
283
283
|
}
|
|
284
|
-
PermissionAwareActivity activity = (PermissionAwareActivity) getCurrentActivity();
|
|
284
|
+
PermissionAwareActivity activity = (PermissionAwareActivity) getReactApplicationContext().getCurrentActivity();
|
|
285
285
|
if (activity == null) {
|
|
286
286
|
promise.resolve(WoosmapMessageAndKey.unknownMessage);
|
|
287
287
|
return;
|
|
@@ -323,7 +323,7 @@ public class PluginGeofencingModule extends ReactContextBaseJavaModule implement
|
|
|
323
323
|
if (promise == null) {
|
|
324
324
|
return;
|
|
325
325
|
}
|
|
326
|
-
Activity activity = getCurrentActivity();
|
|
326
|
+
Activity activity = getReactApplicationContext().getCurrentActivity();
|
|
327
327
|
if (activity == null) {
|
|
328
328
|
promise.resolve(WoosmapMessageAndKey.unknownMessage);
|
|
329
329
|
return;
|
|
@@ -361,7 +361,7 @@ public class PluginGeofencingModule extends ReactContextBaseJavaModule implement
|
|
|
361
361
|
if (promise == null) {
|
|
362
362
|
return;
|
|
363
363
|
}
|
|
364
|
-
Activity activity = getCurrentActivity();
|
|
364
|
+
Activity activity = getReactApplicationContext().getCurrentActivity();
|
|
365
365
|
if (activity == null) {
|
|
366
366
|
promise.resolve(WoosmapMessageAndKey.unknownMessage);
|
|
367
367
|
return;
|
|
@@ -419,7 +419,7 @@ public class PluginGeofencingModule extends ReactContextBaseJavaModule implement
|
|
|
419
419
|
*/
|
|
420
420
|
private boolean hasPermission(boolean isBackground) {
|
|
421
421
|
try {
|
|
422
|
-
Activity activity = getCurrentActivity();
|
|
422
|
+
Activity activity = getReactApplicationContext().getCurrentActivity();
|
|
423
423
|
if (activity == null) {
|
|
424
424
|
return false;
|
|
425
425
|
}
|
|
@@ -1116,7 +1116,7 @@ public class PluginGeofencingModule extends ReactContextBaseJavaModule implement
|
|
|
1116
1116
|
private void provideNotificationPermissionStatus(final Promise promise) {
|
|
1117
1117
|
if (promise == null) return;
|
|
1118
1118
|
|
|
1119
|
-
Activity activity = getCurrentActivity();
|
|
1119
|
+
Activity activity = getReactApplicationContext().getCurrentActivity();
|
|
1120
1120
|
if (activity == null) {
|
|
1121
1121
|
promise.resolve(WoosmapMessageAndKey.unknownMessage);
|
|
1122
1122
|
return;
|
|
@@ -1163,7 +1163,7 @@ public class PluginGeofencingModule extends ReactContextBaseJavaModule implement
|
|
|
1163
1163
|
@ReactMethod
|
|
1164
1164
|
public void requestNotificationPermissions(final Promise promise) {
|
|
1165
1165
|
try {
|
|
1166
|
-
Activity activity = getCurrentActivity();
|
|
1166
|
+
Activity activity = getReactApplicationContext().getCurrentActivity();
|
|
1167
1167
|
if (activity == null) {
|
|
1168
1168
|
promise.resolve(WoosmapMessageAndKey.unknownMessage);
|
|
1169
1169
|
return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@woosmap/react-native-plugin-geofencing",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.1",
|
|
4
4
|
"description": "This react-native plugin extends the functionality offered by the Woosmap Geofencing Mobile SDKs. Find more about the Woosmap Geofencing SDK",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|