Skip to content

Commit

Permalink
Libre 2 : inform user that Libre 2 app should be disallowed bluetooth…
Browse files Browse the repository at this point in the history
… permission after scanning and connecting with xDrip4iOS
  • Loading branch information
JohanDegraeve committed Jan 16, 2021
1 parent c1de2f7 commit 375be0c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,9 @@ class CGMLibre2Transmitter:BluetoothTransmitter, CGMTransmitter {
// set to nil so we don't send it again to the delegate when there's a new connect
tempSensorSerialNumber = nil

// user should be informed not to scan with the Libre app
bluetoothTransmitterDelegate?.error(message: TextsLibreNFC.donotusethelibrelinkapp)

}

}
Expand Down
1 change: 1 addition & 0 deletions xdrip/Storyboards/LibreNFC.strings
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
"holdTopOfIphoneNearSensor" = "Hold the top of your iOS device near the sensor";
"deviceMustSupportNFC" = "Device must support NFC";
"deviceMustSupportIOS14" = "Device must support at least iOS 14.0";
"donotusethelibrelinkapp" = "Connected to Libre 2.\r\n\r\nIf you still want to scan the Libre sensor with the official Libre app, then disallow bluetooth permission for the Libre app. Otherwise, scanning the NFC with the Libre app and with bluetooth permission allowed will disallow xDrip4iOS to connect to the Libre 2";

4 changes: 4 additions & 0 deletions xdrip/Texts/TextsLibreNFC.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,8 @@ class TextsLibreNFC {
return NSLocalizedString("deviceMustSupportIOS14", tableName: filename, bundle: Bundle.main, value: "Device must support at least iOS 14.0", comment: "Device must support at least iOS 14.0")
}()

static let donotusethelibrelinkapp: String = {
return NSLocalizedString("donotusethelibrelinkapp", tableName: filename, bundle: Bundle.main, value: "Connected to Libre 2.\r\n\r\nIf you still want to scan the Libre sensor with the official Libre app, then disallow bluetooth permission for the Libre app. Otherwise, scanning the NFC with the Libre app and with bluetooth permission allowed will disallow xDrip4iOS to connect to the Libre 2", comment: "After Libre NFC scanning, and after successful bluetooth connection, this message will be shown to explain that he or she should not allow bluetooth permission on the Libre app")
}()

}

0 comments on commit 375be0c

Please sign in to comment.