diff --git a/CHANGELOG.md b/CHANGELOG.md index c06e361..6d5d9e9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -319,4 +319,4 @@ Added: ## 0.1.22 - Updated the Roam SDK to latest versions. -- Added additional data points to location listener \ No newline at end of file +- Added additional data points to location listener diff --git a/js/index.js b/js/index.js index b5b4a0b..2932e6b 100755 --- a/js/index.js +++ b/js/index.js @@ -408,16 +408,16 @@ const publishAndSave = (jsonMetadata) => { } const batchProcess = (enable, syncHour) => { - NativeModules.RNRoam.batchProcess(enable, syncHour); -}; + NativeModules.RNRoam.batchProcess(enable, syncHour) +} const stopPublishing = () => { NativeModules.RNRoam.stopPublishing() } const createGeofence = (geofence) => { - NativeModules.RNRoam.createGeofence(geofence); -}; + NativeModules.RNRoam.createGeofence(geofence) +} const startTracking = (trackingMode) => { NativeModules.RNRoam.startTracking(trackingMode) diff --git a/js/index.ts b/js/index.ts index ee93cbe..3c0229b 100755 --- a/js/index.ts +++ b/js/index.ts @@ -94,13 +94,13 @@ const Publish = { const createUser = ( description: any, successCallback: any, - errorCallback: any + errorCallback: any, ) => { NativeModules.RNRoam.createUser( description, null, successCallback, - errorCallback + errorCallback, ); }; @@ -122,7 +122,7 @@ const toggleEvents = ( location: any, movingGeofence: any, successCallback: any, - errorCallback: any + errorCallback: any, ) => { NativeModules.RNRoam.toggleEvents( geofence, @@ -130,7 +130,7 @@ const toggleEvents = ( location, movingGeofence, successCallback, - errorCallback + errorCallback, ); }; @@ -138,13 +138,13 @@ const toggleListener = ( location: any, event: any, successCallback: any, - errorCallback: any + errorCallback: any, ) => { NativeModules.RNRoam.toggleListener( location, event, successCallback, - errorCallback + errorCallback, ); }; @@ -221,7 +221,7 @@ class RoamTrip { stops: any, isLocal: any, tripId: any, - userId: any + userId: any, ) { this.metadata = metadata; this.description = description; @@ -248,7 +248,7 @@ class RoamTripStop { name: any, address: any, geometryRadius: any, - geometry: any + geometry: any, ) { this.id = id; this.metadata = metadata; @@ -281,7 +281,7 @@ class RoamCustomTrackingOptions { allowBackgroundLocationUpdates: any, pausesLocationUpdatesAutomatically: any, showsBackgroundLocationIndicator: any, - accuracyFilter: any + accuracyFilter: any, ) { this.desiredAccuracy = desiredAccuracy; this.updateInterval = updateInterval; @@ -360,12 +360,12 @@ function roamTripToMap(roamTrip: any) { const createTrip = ( roamTrip: any, successCallback: any, - errorCallback: any + errorCallback: any, ) => { NativeModules.RNRoam.createTrip( roamTripToMap(roamTrip), successCallback, - errorCallback + errorCallback, ); }; @@ -374,14 +374,14 @@ const startQuickTrip = ( trackingMode: any, customTrackingOption: any, successCallback: any, - errorCallback: any + errorCallback: any, ) => { NativeModules.RNRoam.startQuickTrip( roamTripToMap(roamTrip), trackingMode, roamCustomTrackingOptionsToMap(customTrackingOption), successCallback, - errorCallback + errorCallback, ); }; @@ -392,12 +392,12 @@ const startTrip = (tripId: any, successCallback: any, errorCallback: any) => { const updateTrip = ( roamTrip: any, successCallback: any, - errorCallback: any + errorCallback: any, ) => { NativeModules.RNRoam.updateTrip( roamTripToMap(roamTrip), successCallback, - errorCallback + errorCallback, ); }; @@ -405,13 +405,13 @@ const endTrip = ( tripId: any, forceStopTracking: any, successCallback: any, - errorCallback: any + errorCallback: any, ) => { NativeModules.RNRoam.endTrip( tripId, forceStopTracking, successCallback, - errorCallback + errorCallback, ); }; @@ -434,7 +434,7 @@ const getTrip = (tripId: any, successCallback: any, errorCallback: any) => { const getActiveTrips = ( isLocal: any, successCallback: any, - errorCallback: any + errorCallback: any, ) => { NativeModules.RNRoam.getActiveTrips(isLocal, successCallback, errorCallback); }; @@ -442,7 +442,7 @@ const getActiveTrips = ( const getTripSummary = ( tripId: any, successCallback: any, - errorCallback: any + errorCallback: any, ) => { NativeModules.RNRoam.getTripSummary(tripId, successCallback, errorCallback); }; @@ -480,30 +480,30 @@ type RNRoamType = { const { RNRoam } = NativeModules as { RNRoam?: RNRoamType }; const batchProcess = (enable: boolean, syncHour: number): void => { - console.log('batchProcess called with:', { enable, syncHour }); + console.log("batchProcess called with:", { enable, syncHour }); if (RNRoam?.batchProcess) { try { RNRoam.batchProcess(enable, syncHour); - console.log('batchProcess executed successfully.'); + console.log("batchProcess executed successfully."); } catch (error) { - console.error('Error executing batchProcess:', error); + console.error("Error executing batchProcess:", error); } } else { - console.warn('RNRoam module is not linked properly.'); + console.warn("RNRoam module is not linked properly."); } }; export const createGeofence = (geofence: { [key: string]: any }) => { if (NativeModules.RNRoam && NativeModules.RNRoam.createGeofence) { NativeModules.RNRoam.createGeofence(geofence) .then((response: any) => { - console.log('Geofence created:', response); + console.log("Geofence created:", response); }) .catch((error: any) => { - console.error('Error creating geofence:', error); + console.error("Error creating geofence:", error); }); } else { - console.error('createGeofence method is not available'); + console.error("createGeofence method is not available"); } }; @@ -519,7 +519,7 @@ const startTrackingCustom = ( showBackIndicator: any, distanceFilter: any, accuracyFilter: any, - updateInterval: any + updateInterval: any, ) => { NativeModules.RNRoam.startTrackingCustom( allowBackground, @@ -529,7 +529,7 @@ const startTrackingCustom = ( showBackIndicator, distanceFilter, accuracyFilter, - updateInterval + updateInterval, ); }; @@ -541,7 +541,7 @@ const startSelfTrackingCustom = ( showBackIndicator: any, distanceFilter: any, accuracyFilter: any, - updateInterval: any + updateInterval: any, ) => { NativeModules.RNRoam.startSelfTrackingCustom( allowBackground, @@ -551,7 +551,7 @@ const startSelfTrackingCustom = ( showBackIndicator, distanceFilter, accuracyFilter, - updateInterval + updateInterval, ); }; @@ -562,12 +562,12 @@ const startTrackingTimeInterval = (timeInterval: any, desiredAccuracy: any) => { const startTrackingDistanceInterval = ( distance: any, stationary: any, - desiredAccuracy: any + desiredAccuracy: any, ) => { NativeModules.RNRoam.startTrackingDistanceInterval( distance, stationary, - desiredAccuracy + desiredAccuracy, ); }; @@ -585,7 +585,7 @@ const setForegroundNotification = ( description: any, image: any, activity: any, - roamService: any + roamService: any, ) => { NativeModules.RNRoam.setForegroundNotification( enabled, @@ -593,7 +593,7 @@ const setForegroundNotification = ( description, image, activity, - roamService + roamService, ); }; @@ -609,13 +609,13 @@ const getCurrentLocation = ( desiredAccuracy: any, accuracy: any, successCallback: any, - errorCallback: any + errorCallback: any, ) => { NativeModules.RNRoam.getCurrentLocation( desiredAccuracy, accuracy, successCallback, - errorCallback + errorCallback, ); }; @@ -626,12 +626,12 @@ const updateCurrentLocation = (desiredAccuracy: any, accuracy: any) => { const getCurrentLocationIos = ( accuracy: any, successCallback: any, - errorCallback: any + errorCallback: any, ) => { NativeModules.RNRoam.getCurrentLocationIos( accuracy, successCallback, - errorCallback + errorCallback, ); }; @@ -661,23 +661,23 @@ const startSelfTracking = (trackingMode: any) => { const startSelfTrackingTimeInterval = ( timeInterval: any, - desiredAccuracy: any + desiredAccuracy: any, ) => { NativeModules.RNRoam.startSelfTrackingTimeInterval( timeInterval, - desiredAccuracy + desiredAccuracy, ); }; const startSelfTrackingDistanceInterval = ( distance: any, stationary: any, - desiredAccuracy: any + desiredAccuracy: any, ) => { NativeModules.RNRoam.startSelfTrackingDistanceInterval( distance, stationary, - desiredAccuracy + desiredAccuracy, ); }; @@ -713,14 +713,14 @@ const setBatchReceiverConfig = ( batchCount: any, batchWindow: any, successCallback: any, - errorCallback: any + errorCallback: any, ) => { NativeModules.RNRoam.setBatchReceiverConfig( networkState, batchCount, batchWindow, successCallback, - errorCallback + errorCallback, ); }; @@ -738,7 +738,7 @@ const setTrackingConfig = ( source: any, discardLocation: any, successCallback: any, - errorCallback: any + errorCallback: any, ) => { NativeModules.RNRoam.setTrackingConfig( accuracy, @@ -746,7 +746,7 @@ const setTrackingConfig = ( source, discardLocation, successCallback, - errorCallback + errorCallback, ); };