Skip to content

Commit

Permalink
Merge pull request #243 from shankari/ignore-ble-beacon-found-non-fleet
Browse files Browse the repository at this point in the history
👔 Do not start a trip if we see a beacon in non-fleet mode
  • Loading branch information
shankari authored Dec 20, 2024
2 parents 06a90be + c3df0d8 commit cd9f80a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cordova-plugin-em-datacollection",
"version": "1.9.2",
"version": "1.9.5",
"description": "The main tracking for the e-mission platform",
"license": "BSD-3-clause",
"cordova": {
Expand Down
2 changes: 1 addition & 1 deletion plugin.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<plugin xmlns="http://www.phonegap.com/ns/plugins/1.0"
id="cordova-plugin-em-datacollection"
version="1.9.4">
version="1.9.5">

<name>DataCollection</name>
<description>Background data collection FTW! This is the part that I really
Expand Down
8 changes: 4 additions & 4 deletions src/ios/Location/TripDiaryStateMachine.m
Original file line number Diff line number Diff line change
Expand Up @@ -259,15 +259,15 @@ -(void) handleStart:(NSString*) transition withUserInfo:(NSDictionary*) userInfo
[TripDiaryStateMachine getStateName:self.currState]]];
[TripDiaryActions startTracking:transition withLocationMgr:self.locMgr];
[TripDiaryActions deleteGeofence:self.locMgr];
[[NSNotificationCenter defaultCenter] postNotificationName:CFCTransitionNotificationName
object:CFCTransitionTripStarted];
} else {
[LocalNotificationManager addNotification:[NSString stringWithFormat:
@"ERROR: Got transition %@ in state %@ without fleet mode",
transition,
[TripDiaryStateMachine getStateName:self.currState]]];

}
[[NSNotificationCenter defaultCenter] postNotificationName:CFCTransitionNotificationName
object:CFCTransitionTripStarted];
} else if ([transition isEqualToString:CFCTransitionInitComplete]) {
// Geofence has been successfully created and we are inside it so we are about to move to
// the WAITING_FOR_TRIP_START state.
Expand Down Expand Up @@ -357,15 +357,15 @@ - (void) handleWaitingForTripStart:(NSString*) transition withUserInfo:(NSDicti
[TripDiaryStateMachine getStateName:self.currState]]];
[TripDiaryActions startTracking:transition withLocationMgr:self.locMgr];
[TripDiaryActions deleteGeofence:self.locMgr];
[[NSNotificationCenter defaultCenter] postNotificationName:CFCTransitionNotificationName
object:CFCTransitionTripStarted];
} else {
[LocalNotificationManager addNotification:[NSString stringWithFormat:
@"ERROR: Got transition %@ in state %@ without fleet mode",
transition,
[TripDiaryStateMachine getStateName:self.currState]]];

}
[[NSNotificationCenter defaultCenter] postNotificationName:CFCTransitionNotificationName
object:CFCTransitionTripStarted];

} else if ([transition isEqualToString:CFCTransitionVisitEnded]) {
if ([ConfigManager instance].ios_use_visit_notifications_for_detection) {
Expand Down

0 comments on commit cd9f80a

Please sign in to comment.