react-native-background-geolocation 5.0.3 → 5.0.4

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/README.md CHANGED
@@ -261,7 +261,7 @@ export default HelloWorld;
261
261
 
262
262
  ## :large_blue_diamond: [Demo Application](example)
263
263
 
264
- Clone this repo and run the [/example](example) app.
264
+ Clone this repo and see apps in [/example](example) folder.
265
265
 
266
266
 
267
267
  # License
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
 
3
3
  "name": "react-native-background-geolocation",
4
- "version": "5.0.3",
4
+ "version": "5.0.4",
5
5
  "description": "The most sophisticated cross-platform background location-tracking & geofencing module with battery-conscious motion-detection intelligence",
6
6
  "scripts": {
7
7
  "build": "yarn run build:expo",
@@ -1,8 +1,6 @@
1
1
  'use strict';
2
2
 
3
- import { NativeModules } from "react-native"
4
-
5
- const { RNBackgroundGeolocation } = NativeModules;
3
+ import { RNBackgroundGeolocation } from "./NativeModule";
6
4
 
7
5
  const IGNORE_BATTERY_OPTIMIZATIONS = "IGNORE_BATTERY_OPTIMIZATIONS";
8
6
  const POWER_MANAGER = "POWER_MANAGER";
@@ -30,6 +28,6 @@ export default class DeviceSettings {
30
28
  }
31
29
 
32
30
  show(request) {
33
- return RNBackgroundGeolocation.showSettings(args);
31
+ return RNBackgroundGeolocation.showSettings(request);
34
32
  }
35
33
  }
@@ -35,11 +35,10 @@ function getNativeBGGeo() {
35
35
  );
36
36
  }
37
37
 
38
- const RNBackgroundGeolocation = getNativeBGGeo();
38
+ export const RNBackgroundGeolocation = getNativeBGGeo();
39
39
 
40
40
  const EventEmitter = new NativeEventEmitter(RNBackgroundGeolocation);
41
41
 
42
-
43
42
  import TransistorAuthorizationService from "./TransistorAuthorizationService";
44
43
 
45
44
  const TAG = "TSLocationManager";
@@ -1,7 +1,5 @@
1
1
  'use strict';
2
2
 
3
- import { NativeModules } from "react-native"
4
-
5
3
  const DEFAULT_URL = 'https://tracker.transistorsoft.com';
6
4
 
7
5
  const DUMMY_TOKEN = 'DUMMY_TOKEN';
@@ -14,7 +12,7 @@ const LOCATIONS_PATH = '/api/locations';
14
12
 
15
13
  const REFRESH_TOKEN_PATH = '/api/refresh_token';
16
14
 
17
- const { RNBackgroundGeolocation } = NativeModules;
15
+ import { RNBackgroundGeolocation } from "./NativeModule";
18
16
 
19
17
  export default class TransistorAuthorizationService {
20
18
  static findOrCreate(orgname, username, url=DEFAULT_URL) {
@@ -40,7 +38,7 @@ export default class TransistorAuthorizationService {
40
38
  });
41
39
  }
42
40
 
43
- static destroy(url=DEFAULT_URL) {
41
+ static destroy(url=DEFAULT_URL) {
44
42
  return RNBackgroundGeolocation.destroyTransistorToken(url);
45
43
  }
46
44