├── .flexProperties ├── .project ├── .settings └── org.eclipse.core.resources.prefs ├── LICENSE ├── README.md ├── changelog.txt ├── libs └── as3crypto.swc ├── org.eclipse.core.resources.prefs └── src ├── Assets.car ├── Default-375w-667h@2x.png ├── Default-414w-736h@3x.png ├── Default-568h@2x.png ├── Default-812h@3x.png ├── Default.png ├── Default@2x.png ├── G4Model └── TransmitterStatus.as ├── G5Model ├── AuthChallengeRxMessage.as ├── AuthChallengeTxMessage.as ├── AuthRequestTxMessage.as ├── AuthStatusRxMessage.as ├── BatteryInfoRxMessage.as ├── BatteryInfoTxMessage.as ├── DisconnectTxMessage.as ├── KeepAliveTxMessage.as ├── SensorRxMessage.as ├── SensorTxMessage.as ├── TransmitterMessage.as └── TransmitterStatus.as ├── License-smiley.txt ├── Utilities ├── AlertPopUp.mxml ├── BgGraphBuilder.as ├── Crc.as ├── DateTimeUtilities.as ├── Export.as ├── FromtimeAndValue.as ├── FromtimeAndValueArrayCollection.as ├── Libre │ ├── GlucoseData.as │ └── LibreAlarmReceiver.as ├── Trace.as └── UniqueId.as ├── assets ├── 1-millisecond-of-silence.mp3 ├── Done_48x48.png ├── StyleableTextFieldTextStyles.as ├── Trash_48x48.png ├── add48x48.png ├── alto.mp3 ├── app-icon_1024x1024.png ├── app-icon_114x114.png ├── app-icon_120x120.png ├── app-icon_152x152.png ├── app-icon_180x180.png ├── app-icon_29x29.png ├── app-icon_36x36.png ├── app-icon_48x48.png ├── app-icon_512x512.png ├── app-icon_57x57.png ├── app-icon_72x72.png ├── app-icon_76x76.png ├── basso.mp3 ├── basso55.mp3 ├── bell48.png ├── betterwakeup.mp3 ├── bluetooth.png ├── bruteforce.mp3 ├── edit48x48.png ├── home-white.png ├── image_G5.png ├── image_calibrate_active.png ├── modern2.mp3 ├── modernalarm.mp3 ├── settings-white.png ├── shorthigh1.mp3 ├── shorthigh2.mp3 ├── shorthigh3.mp3 ├── shorthigh4.mp3 ├── shortlow1.mp3 ├── shortlow2.mp3 ├── shortlow3.mp3 ├── shortlow4.mp3 ├── silence-1sec.aif ├── spaceship.aif ├── spaceship.mp3 ├── style.css └── xdripalert.aif ├── databaseclasses ├── AlertType.as ├── BgReading.as ├── BlueToothDevice.as ├── Calibration.as ├── CommonSettings.as ├── Database.as ├── LocalSettings.as ├── NSBgReading.as ├── Sensor.as └── SuperDatabaseClass.as ├── distriqtkey └── DistriqtKey.as ├── events ├── BackGroundFetchServiceEvent.as ├── BlueToothServiceEvent.as ├── CalibrationServiceEvent.as ├── DatabaseEvent.as ├── DeepSleepServiceEvent.as ├── DialogServiceEvent.as ├── IosXdripReaderEvent.as ├── NightScoutServiceEvent.as ├── NotificationServiceEvent.as ├── SettingsServiceEvent.as └── TransmitterServiceEvent.as ├── iosxdripreader-app.xml ├── iosxdripreader.mxml ├── locale ├── en_US │ ├── alarmservice.properties │ ├── alerttypesview.properties │ ├── alerttypeview.properties │ ├── bluetoothservice.properties │ ├── calibrationservice.properties │ ├── dexcomshareservice.properties │ ├── dialogservice.properties │ ├── export.properties │ ├── fromtimeandvalueelementview.properties │ ├── fromtimeandvaluelistview.properties │ ├── general.properties │ ├── homeview.properties │ ├── nightscoutservice.properties │ ├── notificationservice.properties │ ├── pickerview.properties │ ├── settingsview.properties │ ├── texttospeech.properties │ └── transmitterservice.properties ├── es_ES │ ├── general.properties │ └── texttospeech.properties ├── es_MX │ ├── general.properties │ └── texttospeech.properties ├── fr_FR │ ├── general.properties │ └── texttospeech.properties ├── it_IT │ ├── alerttypeview.properties │ ├── general.properties │ └── texttospeech.properties ├── nl_BE │ ├── alarmservice.properties │ ├── alerttypesview.properties │ ├── alerttypeview.properties │ ├── bluetoothservice.properties │ ├── calibrationservice.properties │ ├── dexcomshareservice.properties │ ├── dialogservice.properties │ ├── export.properties │ ├── fromtimeandvalueelementview.properties │ ├── fromtimeandvaluelistview.properties │ ├── general.properties │ ├── homeview.properties │ ├── nightscoutservice.properties │ ├── notificationservice.properties │ ├── pickerview.properties │ ├── settingsview.properties │ ├── texttospeech.properties │ └── transmitterservice.properties ├── pl_PL │ ├── general.properties │ └── texttospeech.properties ├── pt_BR │ ├── general.properties │ └── texttospeech.properties ├── pt_PT │ ├── general.properties │ └── texttospeech.properties ├── ru_RU │ ├── general.properties │ └── texttospeech.properties ├── sl_SL │ ├── alarmservice.properties │ ├── alerttypesview.properties │ ├── alerttypeview.properties │ ├── bluetoothservice.properties │ ├── calibrationservice.properties │ ├── dexcomshareservice.properties │ ├── dialogservice.properties │ ├── export.properties │ ├── fromtimeandvalueelementview.properties │ ├── fromtimeandvaluelistview.properties │ ├── general.properties │ ├── homeview.properties │ ├── nightscoutservice.properties │ ├── notificationservice.properties │ ├── pickerview.properties │ ├── settingsview.properties │ ├── texttospeech.properties │ └── transmitterservice.properties └── zh_CN │ ├── alarmservice.properties │ ├── alerttypesview.properties │ ├── alerttypeview.properties │ ├── bluetoothservice.properties │ ├── calibrationservice.properties │ ├── dexcomshareservice.properties │ ├── dialogservice.properties │ ├── fromtimeandvalueelementview.properties │ ├── fromtimeandvaluelistview.properties │ ├── general.properties │ ├── homeview.properties │ ├── nightscoutservice.properties │ ├── notificationservice.properties │ ├── pickerview.properties │ ├── settingsview.properties │ ├── texttospeech.properties │ └── transmitterservice.properties ├── model ├── ModelLocator.as ├── Tomato.as ├── TransmitterData.as ├── TransmitterDataBluKonPacket.as ├── TransmitterDataBlueReaderBatteryPacket.as ├── TransmitterDataBlueReaderPacket.as ├── TransmitterDataG5Packet.as ├── TransmitterDataTransmiter_PLPacket.as ├── TransmitterDataXBridgeBeaconPacket.as ├── TransmitterDataXBridgeDataPacket.as └── TransmitterDataXdripDataPacket.as ├── renderers ├── AlertTypeItemRenderer.as ├── BGGraphItemRenderer.as ├── FromtimeAndValueItemRenderer.as ├── MenuElementItemRenderer.as └── WrapText.mxml ├── services ├── AlarmService.as ├── BackGroundFetchService.as ├── BluetoothService.as ├── CalibrationService.as ├── DeepSleepService.as ├── DexcomShareService.as ├── DialogService.as ├── HealthKitService.as ├── NightScoutService.as ├── NotificationService.as ├── TextToSpeech.as └── TransmitterService.as ├── skins ├── ButtonWithLabelOnTwoLinesSkin.mxml ├── ButtonWithoutBorderAndBackGroundSkin.mxml ├── FillForMyBorderContainer.as ├── MyBorderContainer.as ├── TabbedViewNavigatorTabBarSkin.as ├── TabbedViewNavigatorTabBarTabSkin.as └── TimeSpinner36Hours.as └── views ├── AlertTypeView.mxml ├── AlertTypesView.mxml ├── FromtimeAndValueElementView.mxml ├── FromtimeAndValueListView.mxml ├── HomeView.mxml ├── PickerView.mxml └── SettingsView.mxml /.flexProperties: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | iosxdripreader 4 | 5 | 6 | ANE-BackgroundFetch-Default 7 | ANE-BackgroundFetch-ios 8 | 9 | 10 | 11 | com.adobe.flexbuilder.project.flexbuilder 12 | 13 | 14 | 15 | 16 | com.adobe.flexbuilder.project.apollobuilder 17 | 18 | 19 | 20 | 21 | 22 | com.adobe.flexide.project.multiplatform.multiplatformnature 23 | com.adobe.flexbuilder.project.apollonature 24 | com.adobe.flexbuilder.project.flexnature 25 | com.adobe.flexbuilder.project.actionscriptnature 26 | 27 | 28 | -------------------------------------------------------------------------------- /.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | #Wed Feb 01 23:45:21 CET 2017 2 | eclipse.preferences.version=1 3 | encoding/=utf-8 4 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # there's a new APP now : go to https://github.com/JohanDegraeve/xdripswift 2 | 3 | connects to xDrip, G5, BluKon and BlueReader 4 | can also work as Follower 5 | 6 | 7 | * Alerts 8 | * Chart 9 | * Always on notification (not really always but almost always) that allows to see the current value by just lifting up the phone. 10 | * Upload to Nightscout 11 | * store values in HealthKit 12 | * upload to Dexcom Share 13 | * speak Bloodglucose readings, languages Dutch, English, French, Portugese, Spanish. If more languages needed send me an e-mail please (xdrip@proximus.be) 14 | * export readings to SiDiary format 15 | 16 | * Follower mode : using NightScout, the app can be used in follower mode. 17 | 18 | Alerts 19 | 20 | Alerts are configured in the Settings. 21 | Possible alerts are 22 | * High 23 | * Very High 24 | * Low 25 | * Very Low 26 | * Missed Reading 27 | * Phone Muted (warns you if your phone is muted) 28 | * Calibration Request 29 | * Battery Low 30 | 31 | Each Alert requires an Alert Type. 32 | 33 | __Per Alert Type define__ 34 | * enabled or disabled : Example between 8 in the morning and midnight I don't need a low alert. For me the Low alert has a disabled alert type between 8 and midnight. There's 35 | always an alert named "No Alert" created by the application which is disabled. You can use that one for all cases where you want a disabled alert type. 36 | * Name : name of the alert type 37 | * Vibration enabled yes or no : if yes the device will vibrate when the alert goes off 38 | * Snooze from notification yes or no : if yes, you can do a quick snooze of an alert from the home screen (why would I say 'no' ? because many times during the night when an alarm goes off, I just snooze it and continue sleeping without doing something about my values - if I have to unlock my device for snoozing then I'm sure I'll be awake) 39 | * Snooze period (in minutes) : value used when you snooze from the home screen 40 | * Repeat yes or no : it's an iOS thing, if yes the notification will repeat every minute until you open the notification or snooze it. In any case the alert will go off again 5 minutes later if you haven't snoozed it and if it's still applicable 41 | * Sound : the sound to use. 42 | The phone will not generate any sound if it's in silent mode. 43 | At the time of writing there are three options 44 | * "No Sound" : you will not hear anything 45 | * "Default iOS Sound" : the sound generated by iOS 46 | * "xDrip Sound" : it's a copy of the sound generated by the Android version 47 | 48 | __Next step : the Alerts__ 49 | 50 | For each alert (except 'Always on Notification' and 'Additional Calibration Request'), you can define for each moment of the type which Alert Type needs to be used. 51 | For example you could say 52 | * between 00:00 and 08:00, the Low Value alert needs to use an Alert Type with vibration, with the xDrip sound, without a snooze possibility on the home screen. 53 | * between 08:00 and 23:59, the Low Value alert only needs to vibrate, no sound, with a possibility to snooze on the Home Screen. 54 | In such case you would need two Alert Types, and assign each of them to the correct interval. 55 | You can create as many Alert Types and intervals as you want. 56 | Alert Types can be re-used for different types of alerts. 57 | -------------------------------------------------------------------------------- /changelog.txt: -------------------------------------------------------------------------------- 1 | 1.4.6 2 | 3 | - Improve mute check : Mute check done right before raising an alert, to make sure mute statis is correct. Closes #46 4 | - reduce maximum number of warnings about other app trying to connect to G5 transmitter. 5 | - fix in notification id for Transmitter PL, case where dead or expired sensor is detected 6 | - fix for double pop up, closes #45 7 | - fix for follower mode, added sgv. in nightscout url, as done in Spike https://github.com/SpikeApp/Spike/commit/0d95245af242e184cf5651408afae48ad60f67b6 8 | 9 | 1.4.5. 10 | 11 | - trace improvement for xbridge, correct logging of subscribed characteristic 12 | - transmitterservice , added tracing, removed also TransmitterServiceEvent.TRANSMITTER_SERVICE_INFORMATION_EVENT, that's not used anymore 13 | - If alarm notification, and if user opens app within 30 seconds, not via notification but by clicking app icon, then snoozedialog will pop up 14 | - If user changes an alert setting, then it will be checked if the alert is still valid at that moment or not, and if not any applicable repeats will be disabled. 15 | This is only for changing alerts, not alert types. -------------------------------------------------------------------------------- /libs/as3crypto.swc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JohanDegraeve/iosxdripreader/1e58e274d2305849ced3f9545f42467fbcbceb6d/libs/as3crypto.swc -------------------------------------------------------------------------------- /org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | #Sat Dec 10 12:39:24 CET 2016 2 | eclipse.preferences.version=1 3 | encoding/=utf-8 4 | -------------------------------------------------------------------------------- /src/Assets.car: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JohanDegraeve/iosxdripreader/1e58e274d2305849ced3f9545f42467fbcbceb6d/src/Assets.car -------------------------------------------------------------------------------- /src/Default-375w-667h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JohanDegraeve/iosxdripreader/1e58e274d2305849ced3f9545f42467fbcbceb6d/src/Default-375w-667h@2x.png -------------------------------------------------------------------------------- /src/Default-414w-736h@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JohanDegraeve/iosxdripreader/1e58e274d2305849ced3f9545f42467fbcbceb6d/src/Default-414w-736h@3x.png -------------------------------------------------------------------------------- /src/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JohanDegraeve/iosxdripreader/1e58e274d2305849ced3f9545f42467fbcbceb6d/src/Default-568h@2x.png -------------------------------------------------------------------------------- /src/Default-812h@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JohanDegraeve/iosxdripreader/1e58e274d2305849ced3f9545f42467fbcbceb6d/src/Default-812h@3x.png -------------------------------------------------------------------------------- /src/Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JohanDegraeve/iosxdripreader/1e58e274d2305849ced3f9545f42467fbcbceb6d/src/Default.png -------------------------------------------------------------------------------- /src/Default@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JohanDegraeve/iosxdripreader/1e58e274d2305849ced3f9545f42467fbcbceb6d/src/Default@2x.png -------------------------------------------------------------------------------- /src/G4Model/TransmitterStatus.as: -------------------------------------------------------------------------------- 1 | package G4Model 2 | { 3 | public class TransmitterStatus 4 | { 5 | public static const LOW:String = "LOW"; 6 | public static const OK:String = "OK"; 7 | public static const UNKNOWN:String = "UNKNOWN"; 8 | public static const EMPTY:String = "EMPTY"; 9 | public static const TRANSMITTER_BATTERY_LOW:int = 210; 10 | public static const TRANSMITTER_BATTERY_EMPTY:int = 207; 11 | 12 | private var _batteryLevel:String; 13 | 14 | public function get batteryLevel():String 15 | { 16 | return _batteryLevel; 17 | } 18 | 19 | public function toString() : String 20 | { 21 | return _batteryLevel; 22 | } 23 | 24 | public function TransmitterStatus():void { 25 | _batteryLevel = UNKNOWN; 26 | } 27 | 28 | public static function getBatteryLevel(b:int):TransmitterStatus { 29 | var returnValue:TransmitterStatus = new TransmitterStatus(); 30 | if (b <= TRANSMITTER_BATTERY_EMPTY) { 31 | returnValue._batteryLevel = EMPTY; 32 | } 33 | else { 34 | if (b < TRANSMITTER_BATTERY_LOW) { 35 | returnValue._batteryLevel = LOW; 36 | } 37 | else { 38 | returnValue._batteryLevel = OK; 39 | } 40 | } 41 | return returnValue; 42 | } 43 | } 44 | } -------------------------------------------------------------------------------- /src/G5Model/AuthChallengeRxMessage.as: -------------------------------------------------------------------------------- 1 | package G5Model 2 | { 3 | import flash.utils.ByteArray; 4 | import flash.utils.Endian; 5 | 6 | public class AuthChallengeRxMessage extends TransmitterMessage 7 | { 8 | public var opcode:int = 0x3; 9 | public var tokenHash:ByteArray; 10 | public var challenge:ByteArray; 11 | 12 | public function AuthChallengeRxMessage(data:ByteArray) { 13 | if (data.length >= 17) { 14 | if (data.readByte() == opcode) { 15 | tokenHash = new ByteArray(); 16 | tokenHash.endian = Endian.LITTLE_ENDIAN; 17 | challenge = new ByteArray(); 18 | challenge.endian = Endian.LITTLE_ENDIAN; 19 | data.readBytes(tokenHash, 0, 8);//Arrays.copyOfRange(data, 1, 9); 20 | data.readBytes(challenge, 0, 8);//Arrays.copyOfRange(data, 9, 17); 21 | } 22 | } 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /src/G5Model/AuthChallengeTxMessage.as: -------------------------------------------------------------------------------- 1 | package G5Model 2 | { 3 | import flash.utils.ByteArray; 4 | import flash.utils.Endian; 5 | 6 | public class AuthChallengeTxMessage extends TransmitterMessage 7 | { 8 | 9 | public var opcode:int = 0x4; 10 | public var challengeHash:ByteArray; 11 | 12 | public function AuthChallengeTxMessage(challenge:ByteArray) { 13 | challengeHash = new ByteArray(); 14 | challenge.endian = Endian.LITTLE_ENDIAN; 15 | challengeHash.writeBytes(challenge); 16 | challenge.readBytes(challengeHash); 17 | challenge.position = 0; 18 | byteSequence = new ByteArray();//ByteBuffer.allocate(9); 19 | byteSequence.endian = Endian.LITTLE_ENDIAN; 20 | byteSequence.writeByte(opcode);//data.put(opcode); 21 | byteSequence.writeBytes(challengeHash);//data.put(challengeHash); 22 | byteSequence.position = 0; 23 | } 24 | 25 | } 26 | } -------------------------------------------------------------------------------- /src/G5Model/AuthRequestTxMessage.as: -------------------------------------------------------------------------------- 1 | package G5Model 2 | { 3 | import flash.utils.ByteArray; 4 | import flash.utils.Endian; 5 | 6 | import Utilities.UniqueId; 7 | 8 | public class AuthRequestTxMessage extends TransmitterMessage 9 | { 10 | private var opcode:int = 0x1; 11 | public var singleUseToken:ByteArray; 12 | private var endByte:int = 0x2; 13 | 14 | public function AuthRequestTxMessage(token_size:int) { 15 | var uuidBytes:ByteArray = UniqueId.createRandomByteArray(16); 16 | singleUseToken = new ByteArray(); 17 | singleUseToken.endian = Endian.LITTLE_ENDIAN; 18 | singleUseToken.writeBytes(uuidBytes, 0, token_size); 19 | singleUseToken.position = 0; 20 | 21 | // Create the byteSequence. 22 | byteSequence = new ByteArray(); 23 | byteSequence.endian = Endian.LITTLE_ENDIAN; 24 | byteSequence.writeByte(opcode); 25 | byteSequence.writeBytes(singleUseToken); 26 | byteSequence.writeByte(endByte); 27 | byteSequence.position = 0; 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /src/G5Model/AuthStatusRxMessage.as: -------------------------------------------------------------------------------- 1 | package G5Model 2 | { 3 | import flash.utils.ByteArray; 4 | import flash.utils.Endian; 5 | 6 | import Utilities.Trace; 7 | 8 | public class AuthStatusRxMessage extends TransmitterMessage 9 | { 10 | private var opcode:int = 0x5; 11 | public var authenticated:Boolean; 12 | public var bonded:Boolean; 13 | 14 | public function AuthStatusRxMessage(packet:ByteArray) { 15 | if (packet.length >= 3) { 16 | if (packet[0] == opcode) { 17 | byteSequence = new ByteArray(); 18 | byteSequence.endian = Endian.LITTLE_ENDIAN; 19 | packet.readBytes(byteSequence); 20 | byteSequence.position = 0; 21 | authenticated = byteSequence.readUnsignedByte() != 0; 22 | bonded = byteSequence.readUnsignedByte() != 2; 23 | myTrace("AuthRequestRxMessage: authenticated:" + authenticated + " bonded:" + bonded); 24 | byteSequence.position = 0; 25 | } 26 | } 27 | } 28 | 29 | private static function myTrace(log:String):void { 30 | Trace.myTrace("AuthStatusRxMessage.as", log); 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /src/G5Model/BatteryInfoRxMessage.as: -------------------------------------------------------------------------------- 1 | package G5Model 2 | { 3 | import flash.utils.ByteArray; 4 | import flash.utils.Endian; 5 | 6 | import Utilities.Trace; 7 | 8 | public class BatteryInfoRxMessage extends TransmitterMessage 9 | { 10 | private var opcode:int = 0x23; 11 | 12 | public var status:int; 13 | public var voltagea:int; 14 | public var voltageb:int; 15 | public var resist:int; 16 | public var runtime:int; 17 | public var temperature:int; 18 | 19 | public function BatteryInfoRxMessage(packet:ByteArray) { 20 | if (packet.length >= 12) { 21 | byteSequence = new ByteArray(); 22 | byteSequence.endian = Endian.LITTLE_ENDIAN; 23 | byteSequence.writeBytes(packet); 24 | byteSequence.position = 0; 25 | if (byteSequence.readByte() == opcode) { 26 | status = byteSequence.readByte(); 27 | voltagea = byteSequence.readUnsignedShort(); 28 | voltageb = byteSequence.readUnsignedShort(); 29 | resist = byteSequence.readUnsignedShort(); 30 | runtime = byteSequence.readUnsignedShort(); 31 | temperature = byteSequence.readByte(); // not sure if signed or not, but <0c or >127C seems unlikely! 32 | } else { 33 | myTrace("Invalid opcode for BatteryInfoRxMessage"); 34 | } 35 | byteSequence.position = 0; 36 | } 37 | } 38 | 39 | private static function myTrace(log:String):void { 40 | Trace.myTrace("BatteryInfoRxMessage.as", log); 41 | } 42 | 43 | public function toString():String { 44 | var returnValue:String = "Status: " + TransmitterStatus.getBatteryLevel(status).toString() + 45 | " / VoltageA: " + voltagea + 46 | "/ VoltageB: " + voltageb + 47 | "/ Resistance: " + resist + 48 | "/ Run Time: " + runtime + 49 | "/ Temperature: " + temperature; 50 | return returnValue; 51 | } 52 | 53 | } 54 | } -------------------------------------------------------------------------------- /src/G5Model/BatteryInfoTxMessage.as: -------------------------------------------------------------------------------- 1 | package G5Model 2 | { 3 | import flash.utils.ByteArray; 4 | 5 | import Utilities.UniqueId; 6 | 7 | public class BatteryInfoTxMessage extends TransmitterMessage 8 | { 9 | private var opcode:int = 0x22; 10 | private var crc:ByteArray = UniqueId.calculate(opcode); 11 | 12 | public function BatteryInfoTxMessage() { 13 | byteSequence = new ByteArray(); 14 | byteSequence.writeByte(opcode); 15 | byteSequence.writeBytes(crc); 16 | byteSequence.position = 0; 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /src/G5Model/DisconnectTxMessage.as: -------------------------------------------------------------------------------- 1 | package G5Model 2 | { 3 | import flash.utils.ByteArray; 4 | import flash.utils.Endian; 5 | 6 | public class DisconnectTxMessage extends TransmitterMessage 7 | { 8 | private var opcode:int = 0x09; 9 | 10 | public function DisconnectTxMessage() { 11 | byteSequence = new ByteArray(); 12 | byteSequence.endian = Endian.LITTLE_ENDIAN; 13 | byteSequence.writeByte(opcode); 14 | byteSequence.position = 0; 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /src/G5Model/KeepAliveTxMessage.as: -------------------------------------------------------------------------------- 1 | package G5Model 2 | { 3 | import flash.utils.ByteArray; 4 | import flash.utils.Endian; 5 | import Utilities.Trace; 6 | import Utilities.UniqueId; 7 | 8 | public class KeepAliveTxMessage extends TransmitterMessage 9 | { 10 | public static const opcode:int = 0x6; 11 | private var time:Number; 12 | 13 | public function KeepAliveTxMessage(time:Number) 14 | { 15 | this.time = time; 16 | byteSequence = new ByteArray(); 17 | byteSequence.endian = Endian.LITTLE_ENDIAN; 18 | byteSequence.writeByte(opcode); 19 | byteSequence.writeByte(time); 20 | byteSequence.position = 0; 21 | myTrace("New KeepAliveRequestTxMessage: " + UniqueId.bytesToHex(byteSequence)); 22 | } 23 | 24 | private static function myTrace(log:String):void { 25 | Trace.myTrace("KeepAliveTxMessage.as", log); 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /src/G5Model/SensorRxMessage.as: -------------------------------------------------------------------------------- 1 | package G5Model 2 | { 3 | import flash.utils.ByteArray; 4 | import flash.utils.Endian; 5 | 6 | import Utilities.Trace; 7 | 8 | import databaseclasses.BlueToothDevice; 9 | 10 | public class SensorRxMessage extends TransmitterMessage 11 | { 12 | private const G6_SCALING:int = 34; 13 | 14 | private var opcode:int = 0x2f; 15 | public var timestamp:Number; 16 | public var unfiltered:Number; 17 | public var filtered:Number; 18 | public var transmitterStatus:TransmitterStatus; 19 | 20 | public function SensorRxMessage(packet:ByteArray) { 21 | if (packet.length >= 14) { 22 | byteSequence = new ByteArray(); 23 | byteSequence.endian = Endian.LITTLE_ENDIAN; 24 | byteSequence.writeBytes(packet); 25 | byteSequence.position = 0; 26 | if (byteSequence.readByte() == opcode) { 27 | 28 | transmitterStatus = TransmitterStatus.getBatteryLevel(byteSequence.readByte()); 29 | timestamp = byteSequence.readInt(); 30 | unfiltered = BlueToothDevice.isDexcomG6() ? byteSequence.readInt() * G6_SCALING : byteSequence.readInt(); 31 | filtered = BlueToothDevice.isDexcomG6() ? byteSequence.readInt() * G6_SCALING : byteSequence.readInt(); 32 | myTrace("SensorRX dbg: timestamp = " + timestamp + ", unfiltered = " + unfiltered + ", filtered = " + filtered + ", transmitterStatus = " + transmitterStatus.toString()); 33 | } 34 | byteSequence.position = 0; 35 | } else { 36 | myTrace("SensorRX packet.length < 14"); 37 | } 38 | } 39 | 40 | private static function myTrace(log:String):void { 41 | Trace.myTrace("SensorRxMessage.as", log); 42 | } 43 | } 44 | } -------------------------------------------------------------------------------- /src/G5Model/SensorTxMessage.as: -------------------------------------------------------------------------------- 1 | package G5Model 2 | { 3 | import flash.utils.ByteArray; 4 | import flash.utils.Endian; 5 | 6 | import Utilities.Trace; 7 | import Utilities.UniqueId; 8 | 9 | public class SensorTxMessage extends TransmitterMessage 10 | { 11 | private var opcode:int = 0x2e; 12 | private var crc:ByteArray = UniqueId.calculate(opcode); 13 | 14 | public function SensorTxMessage() { 15 | byteSequence = new ByteArray(); 16 | byteSequence.endian = Endian.LITTLE_ENDIAN; 17 | byteSequence.writeByte(opcode); 18 | byteSequence.writeBytes(crc); 19 | byteSequence.position = 0; 20 | myTrace("SensorTx dbg: " + UniqueId.bytesToHex(byteSequence)); 21 | } 22 | 23 | private static function myTrace(log:String):void { 24 | Trace.myTrace("SensorTxMessage.as", log); 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /src/G5Model/TransmitterMessage.as: -------------------------------------------------------------------------------- 1 | package G5Model 2 | { 3 | import flash.utils.ByteArray; 4 | 5 | public class TransmitterMessage { 6 | public var byteSequence:ByteArray = null; 7 | } 8 | } -------------------------------------------------------------------------------- /src/G5Model/TransmitterStatus.as: -------------------------------------------------------------------------------- 1 | package G5Model 2 | { 3 | public class TransmitterStatus 4 | { 5 | public static const BRICKED:String = "BRICKED"; 6 | public static const LOW:String = "LOW"; 7 | public static const OK:String = "OK"; 8 | public static const UNKNOWN:String = "UNKNOWN"; 9 | public static const LOW_BATTERY_WARNING_LEVEL_VOLTAGEA:int = 300; 10 | public static const LOW_BATTERY_WARNING_LEVEL_VOLTAGEB:int = 290; 11 | public static const RESIST_BAD:int = 1400; 12 | public static const RESIST_NOTICE:int = 1000; 13 | public static const RESIST_NORMAL:int = 750 14 | 15 | private var _batteryLevel:String; 16 | 17 | public function get batteryLevel():String 18 | { 19 | return _batteryLevel; 20 | } 21 | 22 | public function toString() : String 23 | { 24 | return _batteryLevel; 25 | } 26 | 27 | public function TransmitterStatus():void { 28 | _batteryLevel = UNKNOWN; 29 | } 30 | 31 | public static function getBatteryLevel(b:int):TransmitterStatus { 32 | var returnValue:TransmitterStatus = new TransmitterStatus(); 33 | if (b > 0x81) { 34 | returnValue._batteryLevel = BRICKED; 35 | } 36 | else { 37 | if (b == 0x81) { 38 | returnValue._batteryLevel = LOW; 39 | } 40 | else if (b == 0x00) { 41 | returnValue._batteryLevel = OK; 42 | } 43 | else { 44 | returnValue._batteryLevel = UNKNOWN; 45 | } 46 | } 47 | return returnValue; 48 | } 49 | } 50 | } -------------------------------------------------------------------------------- /src/Utilities/AlertPopUp.mxml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 22 | 23 | 24 | [ResourceBundle("general")] 25 | 26 | 27 | @namespace s "library://ns.adobe.com/flex/spark"; 28 | .mystyle 29 | { 30 | backgroundAlpha:0.5; 31 | backgroundColor:black; 32 | } 33 | 34 | 35 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 94 | 95 | 96 | 97 | 98 | -------------------------------------------------------------------------------- /src/Utilities/BgGraphBuilder.as: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright (C) 2016 Johan Degraeve 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | 17 | */ 18 | package Utilities 19 | { 20 | import mx.collections.ArrayCollection; 21 | 22 | import databaseclasses.BgReading; 23 | import databaseclasses.BlueToothDevice; 24 | import databaseclasses.CommonSettings; 25 | 26 | import model.ModelLocator; 27 | 28 | public class BgGraphBuilder 29 | { 30 | public static const MAX_SLOPE_MINUTES:int = 21; 31 | 32 | public function BgGraphBuilder() 33 | { 34 | } 35 | 36 | /** 37 | * unitIsMgDl = true if unit as set by user is mgdl
38 | * value in mgdl
39 | */ 40 | public static function unitizedString(value:Number, unitIsMgDl:Boolean):String { 41 | var returnValue:String; 42 | if (value >= 400) { 43 | returnValue = "HIGH"; 44 | } else if (value >= 40) { 45 | if(unitIsMgDl) { 46 | returnValue = Math.round(value).toString(); 47 | } else { 48 | returnValue = ((Math.round(value * BgReading.MGDL_TO_MMOLL * 10))/10).toString(); 49 | } 50 | } else if (value > 12) { 51 | returnValue = "LOW"; 52 | } else { 53 | switch(value) { 54 | case 0: 55 | returnValue = "??0"; 56 | break; 57 | case 1: 58 | returnValue = "?SN"; 59 | break; 60 | case 2: 61 | returnValue = "??2"; 62 | break; 63 | case 3: 64 | returnValue = "?NA"; 65 | break; 66 | case 5: 67 | returnValue = "?NC"; 68 | break; 69 | case 6: 70 | returnValue = "?CD"; 71 | break; 72 | case 9: 73 | returnValue = "?AD"; 74 | break; 75 | case 12: 76 | returnValue = "?RF"; 77 | break; 78 | default: 79 | returnValue = "???"; 80 | break; 81 | } 82 | } 83 | return returnValue; 84 | } 85 | 86 | public static function unitizedDeltaString(showUnit:Boolean,highGranularity:Boolean):String { 87 | 88 | var last2:ArrayCollection = BgReading.latest(2, BlueToothDevice.isFollower()); 89 | if(last2.length < 2 || (last2.getItemAt(0) as BgReading).timestamp - (last2.getItemAt(1) as BgReading).timestamp > MAX_SLOPE_MINUTES * 60 * 1000) { 90 | // don't show delta if there are not enough values or the values are more than 20 mintes apart 91 | return "???"; 92 | } 93 | 94 | var value:Number = BgReading.currentSlope(BlueToothDevice.isFollower()) * 5 * 60 * 1000; 95 | if(Math.abs(value) > 100){ 96 | // a delta > 100 will not happen with real BG values -> problematic sensor data 97 | return "ERR"; 98 | } 99 | 100 | value = unitized(value); 101 | 102 | var valueAsString:String = ""; 103 | if (highGranularity) { 104 | if (CommonSettings.getCommonSetting(CommonSettings.COMMON_SETTING_DO_MGDL) != "true") { 105 | valueAsString = ((Math.round(value * 100))/100).toString(); 106 | } else { 107 | valueAsString = ((Math.round(value * 10))/10).toString(); 108 | } 109 | } else { 110 | if (CommonSettings.getCommonSetting(CommonSettings.COMMON_SETTING_DO_MGDL) != "true") { 111 | valueAsString = ((Math.round(value * 10))/10).toString(); 112 | } else { 113 | valueAsString = (Math.round(value)).toString(); 114 | } 115 | } 116 | 117 | var delta_sign:String = ""; 118 | if (value > 0) { delta_sign = "+"; } 119 | 120 | if (CommonSettings.getCommonSetting(CommonSettings.COMMON_SETTING_DO_MGDL) == "true") { 121 | return delta_sign + valueAsString + (showUnit ? (" " + ModelLocator.resourceManagerInstance.getString('settingsview','mgdl')):""); 122 | } else { 123 | return delta_sign + valueAsString + (showUnit ? (" " + ModelLocator.resourceManagerInstance.getString('settingsview','mmol')):""); 124 | } 125 | } 126 | 127 | public static function unitized(value:Number):Number { 128 | if (CommonSettings.getCommonSetting(CommonSettings.COMMON_SETTING_DO_MGDL) == "true") { 129 | return value; 130 | } else { 131 | return value * BgReading.MGDL_TO_MMOLL; 132 | } 133 | return Number.NaN; 134 | } 135 | } 136 | } -------------------------------------------------------------------------------- /src/Utilities/Crc.as: -------------------------------------------------------------------------------- 1 | /** 2 | * copied from xdripplus Models/JoH.java 3 | */ 4 | package Utilities 5 | { 6 | import flash.utils.ByteArray; 7 | 8 | public class Crc 9 | { 10 | public function Crc() 11 | { 12 | } 13 | 14 | private static var crc16table:Array = new Array ( 15 | 0, 4489, 8978, 12955, 17956, 22445, 25910, 29887, 35912, 16 | 40385, 44890, 48851, 51820, 56293, 59774, 63735, 4225, 264, 17 | 13203, 8730, 22181, 18220, 30135, 25662, 40137, 36160, 49115, 18 | 44626, 56045, 52068, 63999, 59510, 8450, 12427, 528, 5017, 19 | 26406, 30383, 17460, 21949, 44362, 48323, 36440, 40913, 60270, 20 | 64231, 51324, 55797, 12675, 8202, 4753, 792, 30631, 26158, 21 | 21685, 17724, 48587, 44098, 40665, 36688, 64495, 60006, 55549, 22 | 51572, 16900, 21389, 24854, 28831, 1056, 5545, 10034, 14011, 23 | 52812, 57285, 60766, 64727, 34920, 39393, 43898, 47859, 21125, 24 | 17164, 29079, 24606, 5281, 1320, 14259, 9786, 57037, 53060, 25 | 64991, 60502, 39145, 35168, 48123, 43634, 25350, 29327, 16404, 26 | 20893, 9506, 13483, 1584, 6073, 61262, 65223, 52316, 56789, 27 | 43370, 47331, 35448, 39921, 29575, 25102, 20629, 16668, 13731, 28 | 9258, 5809, 1848, 65487, 60998, 56541, 52564, 47595, 43106, 29 | 39673, 35696, 33800, 38273, 42778, 46739, 49708, 54181, 57662, 30 | 61623, 2112, 6601, 11090, 15067, 20068, 24557, 28022, 31999, 31 | 38025, 34048, 47003, 42514, 53933, 49956, 61887, 57398, 6337, 32 | 2376, 15315, 10842, 24293, 20332, 32247, 27774, 42250, 46211, 33 | 34328, 38801, 58158, 62119, 49212, 53685, 10562, 14539, 2640, 34 | 7129, 28518, 32495, 19572, 24061, 46475, 41986, 38553, 34576, 35 | 62383, 57894, 53437, 49460, 14787, 10314, 6865, 2904, 32743, 36 | 28270, 23797, 19836, 50700, 55173, 58654, 62615, 32808, 37281, 37 | 41786, 45747, 19012, 23501, 26966, 30943, 3168, 7657, 12146, 38 | 16123, 54925, 50948, 62879, 58390, 37033, 33056, 46011, 41522, 39 | 23237, 19276, 31191, 26718, 7393, 3432, 16371, 11898, 59150, 40 | 63111, 50204, 54677, 41258, 45219, 33336, 37809, 27462, 31439, 41 | 18516, 23005, 11618, 15595, 3696, 8185, 63375, 58886, 54429, 42 | 50452, 45483, 40994, 37561, 33584, 31687, 27214, 22741, 18780, 43 | 15843, 11370, 7921, 3960 ); 44 | 45 | // first two bytes = crc16 included in data 46 | private static function computeCRC16(data:ByteArray, start:int, size:int):Number{ 47 | var crc:Number = 0xffff; 48 | for (var i:int = start + 2; i < start + size; i++) { 49 | crc = ((crc >> 8) ^ crc16table[(int)(crc ^ (getByteAt(data,i) & 0xFF) ) & 0xff]); 50 | } 51 | 52 | var reverseCrc:Number = 0; 53 | for (var i:int=0; i <16; i++) { 54 | reverseCrc = (reverseCrc << 1) | (crc & 1); 55 | crc >>= 1; 56 | } 57 | return reverseCrc; 58 | } 59 | 60 | private static function CheckCRC16(data:ByteArray, start:int, size:int):Boolean { 61 | var crc:Number = computeCRC16(data, start, size); 62 | return crc == ((getByteAt(data, start+1) & 0xFF) * 256 + (getByteAt(data,start) & 0xff)); 63 | } 64 | 65 | public static function LibreCrc(data:ByteArray):Boolean { 66 | if(data.length < 344) { 67 | myTrace("in librecrc, Must have at least 344 bytes for libre data"); 68 | return false; 69 | } 70 | var cheksum_ok:Boolean = CheckCRC16(data, 0 ,24); 71 | cheksum_ok &&= CheckCRC16(data, 24 ,296); 72 | cheksum_ok &&= CheckCRC16(data, 320 ,24); 73 | return cheksum_ok; 74 | 75 | } 76 | 77 | private static function getByteAt(buffer:ByteArray, position:int):int { 78 | buffer.position = position; 79 | return buffer.readByte(); 80 | } 81 | 82 | private static function myTrace(log:String):void { 83 | Trace.myTrace("Crc.as", log); 84 | } 85 | 86 | } 87 | } -------------------------------------------------------------------------------- /src/Utilities/Export.as: -------------------------------------------------------------------------------- 1 | package Utilities 2 | { 3 | import com.distriqt.extension.message.Message; 4 | import com.distriqt.extension.message.MessageAttachment; 5 | import com.freshplanet.ane.AirBackgroundFetch.BackgroundFetch; 6 | 7 | import flash.filesystem.File; 8 | 9 | import mx.collections.ArrayCollection; 10 | 11 | import databaseclasses.BgReading; 12 | import databaseclasses.BlueToothDevice; 13 | import databaseclasses.Calibration; 14 | import databaseclasses.LocalSettings; 15 | 16 | import model.ModelLocator; 17 | 18 | import services.DialogService; 19 | 20 | public class Export 21 | { 22 | [ResourceBundle("export")] 23 | 24 | private static var filePath:String = ""; 25 | private static var fileName:String = ""; 26 | 27 | public function Export() 28 | { 29 | } 30 | 31 | public static function exportSiDiary():void { 32 | var lastExportTimeStamp:Number = new Number(LocalSettings.getLocalSetting(LocalSettings.LOCAL_SETTING_TIMESTAMP_SINCE_LAST_EXPORT_SIDIARY)); 33 | 34 | //export bgreadings 35 | var cntr:int = ModelLocator.bgReadings.length - 1; 36 | while (cntr > -1) { 37 | var bgReading:BgReading = ModelLocator.bgReadings.getItemAt(cntr) as BgReading; 38 | if (bgReading.timestamp > lastExportTimeStamp) { 39 | if (bgReading.calculatedValue != 0) { 40 | BackgroundFetch.writeStringToFile(DateTimeUtilities.createSiDiaryEntryFormattedDateAndTime(new Date(bgReading.timestamp)) + ";" + Math.round(bgReading.calculatedValue) + ";;;;;;", getFilePath()); 41 | } 42 | } else { 43 | break; 44 | } 45 | cntr--; 46 | } 47 | 48 | //export calibrations 49 | var calibrations:ArrayCollection = Calibration.allForSensor(); 50 | cntr = calibrations.length - 1; 51 | while (cntr > -1) { 52 | var calibration:Calibration = calibrations.getItemAt(cntr) as Calibration; 53 | if (calibration.timestamp > lastExportTimeStamp) { 54 | BackgroundFetch.writeStringToFile(DateTimeUtilities.createSiDiaryEntryFormattedDateAndTime(new Date(calibration.timestamp)) + ";;" + Math.round(calibration.bg) + ";;;;;", getFilePath()); 55 | } 56 | cntr--; 57 | } 58 | 59 | if (filePath != "") { 60 | //there's readings written to the file, send it 61 | var f:File = File.applicationStorageDirectory.resolvePath(fileName); 62 | var attachment:MessageAttachment = new MessageAttachment(f.nativePath, "", "", ""); 63 | var body:String = "Attached export in SiDiary format."; 64 | Message.service.sendMailWithOptions("SiDiary export", body, "","","",[attachment],false); 65 | f.deleteFileAsync(); 66 | filePath = ""; 67 | LocalSettings.setLocalSetting(LocalSettings.LOCAL_SETTING_TIMESTAMP_SINCE_LAST_EXPORT_SIDIARY, (new Date()).valueOf().toString()); 68 | } else { 69 | DialogService.openSimpleDialog(ModelLocator.resourceManagerInstance.getString("export","info"), 70 | ModelLocator.resourceManagerInstance.getString("export","now_values_to_export_for_sidiary")); 71 | } 72 | } 73 | 74 | private static function getFilePath():String { 75 | if (filePath == "") {//file not yet created, create it now 76 | fileName ="export" + DateTimeUtilities.createSiDiaryFileNameFormattedDateAndTime(new Date()) + ".csv";//exportyyyyMMdd-kkmmsscsv 77 | filePath = File.applicationStorageDirectory.resolvePath(fileName).nativePath; 78 | BackgroundFetch.writeStringToFile("DAY;TIME;UDT_CGMS;BG_LEVEL;CH_GR;BOLUS;REMARK", filePath); 79 | } 80 | return filePath; 81 | } 82 | } 83 | } -------------------------------------------------------------------------------- /src/Utilities/FromtimeAndValue.as: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright (C) 2017 Johan Degraeve 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | 17 | */ 18 | package Utilities 19 | { 20 | 21 | /** 22 | * a class that can hold a from time
23 | * a value (decimal value)
24 | * an alarmName
25 | *
26 | * from time between 0 and 24 hours
27 | *
28 | * Once created, value, alarm name and from can't be modified anymore.
29 | */ 30 | public class FromtimeAndValue 31 | { 32 | private var _from:int;//time in seconds 33 | public function get from():int {return _from;} 34 | private var _value:Number; 35 | 36 | private var _alarmName:String; 37 | 38 | public function get alarmName():String 39 | { 40 | return _alarmName; 41 | } 42 | 43 | public function get value():Number 44 | { 45 | return _value; 46 | } 47 | 48 | private var _editable:Boolean = true; 49 | 50 | /** 51 | * get should only be used by the itemrenderer FromtimeAndValueItemRenderer
52 | * 53 | */ 54 | public function get editable():Boolean 55 | { 56 | return _editable; 57 | } 58 | 59 | 60 | private var _deletable:Boolean = true; 61 | /** 62 | * get should only be used by the itemrenderer FromtimeAndValueItemRenderer
63 | * 64 | */ 65 | public function get deletable():Boolean 66 | { 67 | return _deletable; 68 | } 69 | 70 | private var _hasAddButton:Boolean = true; 71 | 72 | /** 73 | * should it have an add button or not
74 | * If yes, an add button is shown in the itemrenderer, and treated in listview
75 | * It means a new item can be added after this one. 76 | */ 77 | public function get hasAddButton():Boolean 78 | { 79 | return _hasAddButton; 80 | } 81 | 82 | /** 83 | * @private 84 | */ 85 | public function set hasAddButton(value:Boolean):void 86 | { 87 | _hasAddButton = value; 88 | } 89 | 90 | private var _isBgValue:Boolean = true; 91 | 92 | public function get isBgValue():Boolean 93 | { 94 | return _isBgValue; 95 | } 96 | 97 | public function set isBgValue(value:Boolean):void 98 | { 99 | _isBgValue = value; 100 | } 101 | 102 | 103 | /** 104 | * the fromtime in format hh:mm 105 | */ 106 | public function fromAsString():String { 107 | //return _from.toString();; 108 | var minutes:Number = (Math.round(from % 3600/60)); 109 | var hours:Number = Math.floor(from/3600); 110 | if (minutes == 60) { 111 | minutes = 0; 112 | hours++; 113 | } 114 | return (hours < 10 ? "0" + hours:hours) + ":" + (minutes < 10 ? "0" + minutes:minutes); 115 | } 116 | 117 | /** 118 | * newFrom can be integer or Number, in which case it represents time in seconds ! (not in milliseconds)
119 | * or String, in which case it represents time in format HH:mm
120 | *
121 | * once created, value and from can't be modified anymore.
122 | */ 123 | public function FromtimeAndValue(newFrom:Object,newValue:Number, alarmName:String, isEditable:Boolean,isDeletable:Boolean, isBgvalue:Boolean) 124 | { 125 | _editable = isEditable; 126 | _deletable = isDeletable; 127 | _alarmName = alarmName; 128 | _value = newValue; 129 | _isBgValue = isBgvalue; 130 | 131 | if (newFrom is Number || newFrom is int) 132 | _from = newFrom as Number; 133 | else if (newFrom is String) 134 | _from = ((new Number(newFrom.split(":")[0])) * 60 + (new Number(newFrom.split(":")[1])))*60; 135 | else 136 | throw new Error("error in FromtimeAndValue, newFrom should be Number, int or String"); 137 | 138 | if (_from < 0 || _from > 86400000) 139 | throw new Error("error in FromtimeAndValue, newFrom should be between 00:00 and 24:00 or between 0 and 86400"); 140 | } 141 | } 142 | } -------------------------------------------------------------------------------- /src/Utilities/Libre/GlucoseData.as: -------------------------------------------------------------------------------- 1 | /** 2 | code ported from xdripplus 3 | */ 4 | package Utilities.Libre 5 | { 6 | import spark.collections.Sort; 7 | import spark.collections.SortField; 8 | 9 | public class GlucoseData 10 | { 11 | private static var _dataSortField:SortField; 12 | private static var _dataSort:Sort; 13 | 14 | public var realDate:Number = 0; 15 | public var sensorId:String; 16 | public var sensorTime:Number; 17 | public var glucoseLevel:int = -1; 18 | public var glucoseLevelRaw:int = -1; 19 | //public var phoneDatabaseId:Number = 0; 20 | 21 | public function GlucoseData() {} 22 | 23 | /** 24 | * sort ascending realDate 25 | */ 26 | public static function get dataSort():Sort 27 | { 28 | if (_dataSortField == null) 29 | init_dataSort(); 30 | return _dataSort; 31 | } 32 | 33 | public static function createGlucoseData( glucoseLevelRaw:int, timestamp:Number):GlucoseData { 34 | var returnValue:GlucoseData = new GlucoseData; 35 | returnValue.glucoseLevelRaw = glucoseLevelRaw; 36 | returnValue.realDate = timestamp; 37 | return returnValue; 38 | } 39 | 40 | private static function init_dataSort():void { 41 | _dataSortField = new SortField(); 42 | _dataSortField.name = "realDate"; 43 | _dataSortField.numeric = true; 44 | _dataSortField.descending = false; 45 | _dataSort = new Sort(); 46 | _dataSort.fields=[_dataSortField]; 47 | } 48 | 49 | /** 50 | * if glucoseLevelParam == 0, then GlucoseData.glucoseLevel is used 51 | */ 52 | public function glucose(glucoseLevelParam:int, mmol:Boolean):String { 53 | if (glucoseLevelParam == 0) 54 | glucoseLevelParam = glucoseLevel; 55 | if (mmol) { 56 | return (Math.round(glucoseLevelParam/18 * 10)).toString(); 57 | } else { 58 | return (new Number(glucoseLevelParam)).toString(); 59 | } 60 | } 61 | } 62 | } -------------------------------------------------------------------------------- /src/Utilities/UniqueId.as: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright (C) 2016 Johan Degraeve 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | 17 | */ 18 | package Utilities 19 | { 20 | import flash.utils.ByteArray; 21 | import flash.utils.Endian; 22 | 23 | import mx.utils.StringUtil; 24 | 25 | public class UniqueId 26 | { 27 | private static var ALPHA_CHAR_CODES:Array = ["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"]; 28 | private static var hexArray:Array = ["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F"]; 29 | 30 | public function UniqueId() 31 | { 32 | } 33 | 34 | /** 35 | * creates an event id of 24 chars, compliant with the way Nightscout expects it 36 | */ 37 | public static function createEventId():String { 38 | var eventId:Array = new Array(24); 39 | var date:String = (new Date()).valueOf().toString(); 40 | for (var i:int = 0; i < date.length; i++) { 41 | eventId[i] = date.charAt(i); 42 | } 43 | for (; i < eventId.length;i++) { 44 | eventId[i] = ALPHA_CHAR_CODES[Math.floor(Math.random() * 16)]; 45 | } 46 | var returnValue:String = ""; 47 | for (i = 0; i < eventId.length; i++) 48 | returnValue += eventId[i]; 49 | return returnValue; 50 | } 51 | 52 | /** 53 | * creates random string of digits only, length 54 | */ 55 | public static function createNonce(length:int):String { 56 | var nonce:Array = new Array(length); 57 | for (var i:int = 0; i < length; i++) { 58 | nonce[i] = ALPHA_CHAR_CODES[Math.floor(Math.random() * 10)]; 59 | } 60 | var returnValue:String = ""; 61 | for (i = 0; i < nonce.length; i++) 62 | returnValue += nonce[i]; 63 | return returnValue; 64 | } 65 | 66 | public static function createRandomByteArray(length:int):ByteArray { 67 | var byteArray:ByteArray = new ByteArray(); 68 | for (var i:int = 0; i < length; i++) { 69 | byteArray.writeByte(Math.floor(Math.random() * 256)); 70 | } 71 | return byteArray; 72 | } 73 | 74 | public static function bytesToHex(bytes:ByteArray):String { 75 | if (bytes == null) return ""; 76 | var hexChars:Array = new Array(bytes.length * 2); 77 | for (var j:int = 0; j < bytes.length; j++) { 78 | var v:int = bytes[j] & 0xFF; 79 | hexChars[j * 2] = hexArray[v >>> 4]; 80 | hexChars[j * 2 + 1] = hexArray[v & 0x0F]; 81 | } 82 | var returnValue:String = ""; 83 | for (var cntr:int = 0; cntr < hexChars.length; cntr++) { 84 | returnValue += hexChars[cntr]; 85 | } 86 | return returnValue; 87 | } 88 | 89 | public static function hexStringToByteArray(str:String) :ByteArray { 90 | str = StringUtil.trim(str.toUpperCase()); 91 | if (str.length == 0) return null; 92 | var len:int = str.length; 93 | var data:ByteArray = new ByteArray(); 94 | for (var i:int = 0; i < len; i += 2) { 95 | data.writeByte(parseInt(str.substring(i, i + 2), 16)); 96 | //data[i / 2] = (byte) ((Character.digit(str.charAt(i), 16) << 4) + Character.digit(str.charAt(i + 1), 16)); 97 | } 98 | return data; 99 | } 100 | 101 | public static function calculate(b:int):ByteArray { 102 | var crcShort:int = 0; 103 | crcShort = ((crcShort >>> 8) | (crcShort << 8)) & 0xffff; 104 | crcShort ^= (b & 0xff); 105 | crcShort ^= ((crcShort & 0xff) >> 4); 106 | crcShort ^= (crcShort << 12) & 0xffff; 107 | crcShort ^= ((crcShort & 0xFF) << 5) & 0xffff; 108 | crcShort &= 0xffff; 109 | var returnValue:ByteArray = new ByteArray(); 110 | returnValue.writeByte(crcShort & 0xff); 111 | returnValue.writeByte((crcShort >> 8) & 0xff); 112 | return returnValue; 113 | } 114 | 115 | public static function byteArrayToString(value:ByteArray):String { 116 | if (value == null) 117 | return "[]"; 118 | if (value.length == 0) { 119 | return "[]"; 120 | } 121 | var returnValue:String; 122 | var copyOfValue:ByteArray = new ByteArray(); 123 | copyOfValue.endian = Endian.LITTLE_ENDIAN; 124 | copyOfValue.writeBytes(value); 125 | //value.readBytes(copyOfValue); 126 | returnValue = '['; 127 | for (var i:int = 0; i < copyOfValue.length; i++) { 128 | returnValue += copyOfValue[i]; 129 | if (i < copyOfValue.length - 1) { 130 | returnValue += ", "; 131 | } 132 | } 133 | returnValue += ']'; 134 | return returnValue; 135 | } 136 | } 137 | } -------------------------------------------------------------------------------- /src/assets/1-millisecond-of-silence.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JohanDegraeve/iosxdripreader/1e58e274d2305849ced3f9545f42467fbcbceb6d/src/assets/1-millisecond-of-silence.mp3 -------------------------------------------------------------------------------- /src/assets/Done_48x48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JohanDegraeve/iosxdripreader/1e58e274d2305849ced3f9545f42467fbcbceb6d/src/assets/Done_48x48.png -------------------------------------------------------------------------------- /src/assets/Trash_48x48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JohanDegraeve/iosxdripreader/1e58e274d2305849ced3f9545f42467fbcbceb6d/src/assets/Trash_48x48.png -------------------------------------------------------------------------------- /src/assets/add48x48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JohanDegraeve/iosxdripreader/1e58e274d2305849ced3f9545f42467fbcbceb6d/src/assets/add48x48.png -------------------------------------------------------------------------------- /src/assets/alto.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JohanDegraeve/iosxdripreader/1e58e274d2305849ced3f9545f42467fbcbceb6d/src/assets/alto.mp3 -------------------------------------------------------------------------------- /src/assets/app-icon_1024x1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JohanDegraeve/iosxdripreader/1e58e274d2305849ced3f9545f42467fbcbceb6d/src/assets/app-icon_1024x1024.png -------------------------------------------------------------------------------- /src/assets/app-icon_114x114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JohanDegraeve/iosxdripreader/1e58e274d2305849ced3f9545f42467fbcbceb6d/src/assets/app-icon_114x114.png -------------------------------------------------------------------------------- /src/assets/app-icon_120x120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JohanDegraeve/iosxdripreader/1e58e274d2305849ced3f9545f42467fbcbceb6d/src/assets/app-icon_120x120.png -------------------------------------------------------------------------------- /src/assets/app-icon_152x152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JohanDegraeve/iosxdripreader/1e58e274d2305849ced3f9545f42467fbcbceb6d/src/assets/app-icon_152x152.png -------------------------------------------------------------------------------- /src/assets/app-icon_180x180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JohanDegraeve/iosxdripreader/1e58e274d2305849ced3f9545f42467fbcbceb6d/src/assets/app-icon_180x180.png -------------------------------------------------------------------------------- /src/assets/app-icon_29x29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JohanDegraeve/iosxdripreader/1e58e274d2305849ced3f9545f42467fbcbceb6d/src/assets/app-icon_29x29.png -------------------------------------------------------------------------------- /src/assets/app-icon_36x36.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JohanDegraeve/iosxdripreader/1e58e274d2305849ced3f9545f42467fbcbceb6d/src/assets/app-icon_36x36.png -------------------------------------------------------------------------------- /src/assets/app-icon_48x48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JohanDegraeve/iosxdripreader/1e58e274d2305849ced3f9545f42467fbcbceb6d/src/assets/app-icon_48x48.png -------------------------------------------------------------------------------- /src/assets/app-icon_512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JohanDegraeve/iosxdripreader/1e58e274d2305849ced3f9545f42467fbcbceb6d/src/assets/app-icon_512x512.png -------------------------------------------------------------------------------- /src/assets/app-icon_57x57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JohanDegraeve/iosxdripreader/1e58e274d2305849ced3f9545f42467fbcbceb6d/src/assets/app-icon_57x57.png -------------------------------------------------------------------------------- /src/assets/app-icon_72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JohanDegraeve/iosxdripreader/1e58e274d2305849ced3f9545f42467fbcbceb6d/src/assets/app-icon_72x72.png -------------------------------------------------------------------------------- /src/assets/app-icon_76x76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JohanDegraeve/iosxdripreader/1e58e274d2305849ced3f9545f42467fbcbceb6d/src/assets/app-icon_76x76.png -------------------------------------------------------------------------------- /src/assets/basso.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JohanDegraeve/iosxdripreader/1e58e274d2305849ced3f9545f42467fbcbceb6d/src/assets/basso.mp3 -------------------------------------------------------------------------------- /src/assets/basso55.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JohanDegraeve/iosxdripreader/1e58e274d2305849ced3f9545f42467fbcbceb6d/src/assets/basso55.mp3 -------------------------------------------------------------------------------- /src/assets/bell48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JohanDegraeve/iosxdripreader/1e58e274d2305849ced3f9545f42467fbcbceb6d/src/assets/bell48.png -------------------------------------------------------------------------------- /src/assets/betterwakeup.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JohanDegraeve/iosxdripreader/1e58e274d2305849ced3f9545f42467fbcbceb6d/src/assets/betterwakeup.mp3 -------------------------------------------------------------------------------- /src/assets/bluetooth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JohanDegraeve/iosxdripreader/1e58e274d2305849ced3f9545f42467fbcbceb6d/src/assets/bluetooth.png -------------------------------------------------------------------------------- /src/assets/bruteforce.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JohanDegraeve/iosxdripreader/1e58e274d2305849ced3f9545f42467fbcbceb6d/src/assets/bruteforce.mp3 -------------------------------------------------------------------------------- /src/assets/edit48x48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JohanDegraeve/iosxdripreader/1e58e274d2305849ced3f9545f42467fbcbceb6d/src/assets/edit48x48.png -------------------------------------------------------------------------------- /src/assets/home-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JohanDegraeve/iosxdripreader/1e58e274d2305849ced3f9545f42467fbcbceb6d/src/assets/home-white.png -------------------------------------------------------------------------------- /src/assets/image_G5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JohanDegraeve/iosxdripreader/1e58e274d2305849ced3f9545f42467fbcbceb6d/src/assets/image_G5.png -------------------------------------------------------------------------------- /src/assets/image_calibrate_active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JohanDegraeve/iosxdripreader/1e58e274d2305849ced3f9545f42467fbcbceb6d/src/assets/image_calibrate_active.png -------------------------------------------------------------------------------- /src/assets/modern2.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JohanDegraeve/iosxdripreader/1e58e274d2305849ced3f9545f42467fbcbceb6d/src/assets/modern2.mp3 -------------------------------------------------------------------------------- /src/assets/modernalarm.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JohanDegraeve/iosxdripreader/1e58e274d2305849ced3f9545f42467fbcbceb6d/src/assets/modernalarm.mp3 -------------------------------------------------------------------------------- /src/assets/settings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JohanDegraeve/iosxdripreader/1e58e274d2305849ced3f9545f42467fbcbceb6d/src/assets/settings-white.png -------------------------------------------------------------------------------- /src/assets/shorthigh1.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JohanDegraeve/iosxdripreader/1e58e274d2305849ced3f9545f42467fbcbceb6d/src/assets/shorthigh1.mp3 -------------------------------------------------------------------------------- /src/assets/shorthigh2.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JohanDegraeve/iosxdripreader/1e58e274d2305849ced3f9545f42467fbcbceb6d/src/assets/shorthigh2.mp3 -------------------------------------------------------------------------------- /src/assets/shorthigh3.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JohanDegraeve/iosxdripreader/1e58e274d2305849ced3f9545f42467fbcbceb6d/src/assets/shorthigh3.mp3 -------------------------------------------------------------------------------- /src/assets/shorthigh4.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JohanDegraeve/iosxdripreader/1e58e274d2305849ced3f9545f42467fbcbceb6d/src/assets/shorthigh4.mp3 -------------------------------------------------------------------------------- /src/assets/shortlow1.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JohanDegraeve/iosxdripreader/1e58e274d2305849ced3f9545f42467fbcbceb6d/src/assets/shortlow1.mp3 -------------------------------------------------------------------------------- /src/assets/shortlow2.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JohanDegraeve/iosxdripreader/1e58e274d2305849ced3f9545f42467fbcbceb6d/src/assets/shortlow2.mp3 -------------------------------------------------------------------------------- /src/assets/shortlow3.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JohanDegraeve/iosxdripreader/1e58e274d2305849ced3f9545f42467fbcbceb6d/src/assets/shortlow3.mp3 -------------------------------------------------------------------------------- /src/assets/shortlow4.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JohanDegraeve/iosxdripreader/1e58e274d2305849ced3f9545f42467fbcbceb6d/src/assets/shortlow4.mp3 -------------------------------------------------------------------------------- /src/assets/silence-1sec.aif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JohanDegraeve/iosxdripreader/1e58e274d2305849ced3f9545f42467fbcbceb6d/src/assets/silence-1sec.aif -------------------------------------------------------------------------------- /src/assets/spaceship.aif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JohanDegraeve/iosxdripreader/1e58e274d2305849ced3f9545f42467fbcbceb6d/src/assets/spaceship.aif -------------------------------------------------------------------------------- /src/assets/spaceship.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JohanDegraeve/iosxdripreader/1e58e274d2305849ced3f9545f42467fbcbceb6d/src/assets/spaceship.mp3 -------------------------------------------------------------------------------- /src/assets/style.css: -------------------------------------------------------------------------------- 1 | /* CSS file */ 2 | @namespace s "library://ns.adobe.com/flex/spark"; 3 | @namespace mx "library://ns.adobe.com/flex/mx"; 4 | 5 | s|Application { 6 | backgroundColor:#212121; 7 | fontSize:18pt; 8 | } 9 | 10 | s|TabbedViewNavigatorApplication 11 | { 12 | backgroundColor:#212121; 13 | color:#FFFFFF; 14 | } 15 | 16 | s|Label { 17 | backgroundColor:#212121; 18 | } 19 | 20 | s|TabbedViewNavigator #tabBar 21 | {/* tabbar will used a customized tabbartabskin, to have the background with gradient color */ 22 | /*chromeColor:#8EADD8 ; /* gives the tabnavigator buttons our special color*/ 23 | skinClass: ClassReference("skins.TabbedViewNavigatorTabBarSkin"); 24 | color: #000000; 25 | } 26 | 27 | .tabbartabbuttoncolor {/* a tabbar in a viewnavigator has tabs, this tab has a backgroundcolor when selected, this will be the colors used for a gradient box from bottom to top */ 28 | colorbottom:#003D6E;/* gradient will be applied from bottom to top, this is the bottom color*/ 29 | colortop:#153460;/* gradient will be applied from bottom to top, this is the top color*/ 30 | } 31 | 32 | .listAlternatingColors {/*used in menu items*/ 33 | color1:#C8C8C8; 34 | color2:#E5E5E5; 35 | } 36 | 37 | s|ActionBar 38 | { 39 | chromeColor: #3B6999; /* gives our action bar our special color*/ 40 | defaultButtonAppearance: beveled; /* ios style action bar buttons*/ 41 | } 42 | 43 | s|View { 44 | backgroundAlpha: 0; 45 | } 46 | 47 | s|List { 48 | contentBackgroundAlpha: 0; 49 | } 50 | 51 | /*Roboto Fonts*/ 52 | @font-face 53 | { src: url(spark/skins/android4/assets/fonts/Roboto-Regular.ttf); fontFamily: RobotoRegular; embed-as-cff: true; } 54 | @font-face 55 | { src: url(spark/skins/android4/assets/fonts/Roboto-Bold.ttf); fontFamily: RobotoBold; fontWeight: bold; embed-as-cff: true; } 56 | -------------------------------------------------------------------------------- /src/assets/xdripalert.aif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JohanDegraeve/iosxdripreader/1e58e274d2305849ced3f9545f42467fbcbceb6d/src/assets/xdripalert.aif -------------------------------------------------------------------------------- /src/databaseclasses/NSBgReading.as: -------------------------------------------------------------------------------- 1 | package databaseclasses 2 | { 3 | public class NSBgReading extends BgReading 4 | { 5 | /** 6 | * used by NightScoutService
7 | * NightScoutService will download readings from NS, and store them as NSBgReading
8 | * When user switches from follower to non-follower, NightScout service must go through readings in modellocator, if it's a NSBgReading then it will be cleaned
9 | */ 10 | public function NSBgReading(timestamp:Number, sensor:Sensor, calibration:Calibration, rawData:Number, filteredData:Number, ageAdjustedRawValue:Number, calibrationFlag:Boolean, calculatedValue:Number, filteredCalculatedValue:Number, calculatedValueSlope:Number, a:Number, b:Number, c:Number, ra:Number, rb:Number, rc:Number, rawCalculated:Number, hideSlope:Boolean, noise:String, lastmodifiedtimestamp:Number, bgreadingid:String) 11 | { 12 | super(timestamp, sensor, calibration, rawData, filteredData, ageAdjustedRawValue, calibrationFlag, calculatedValue, filteredCalculatedValue, calculatedValueSlope, a, b, c, ra, rb, rc, rawCalculated, hideSlope, noise, lastmodifiedtimestamp, bgreadingid); 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /src/databaseclasses/Sensor.as: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright (C) 2016 Johan Degraeve 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | 17 | * MOST OF THIS CODE HERE IS COPIED FROM THE xDRIP-EXPERIMENTAL PROJECT AND PORTED 18 | * see https://github.com/StephenBlackWasAlreadyTaken/xDrip-Experimental 19 | * 20 | */ 21 | package databaseclasses 22 | { 23 | import services.NotificationService; 24 | 25 | public class Sensor extends SuperDatabaseClass 26 | { 27 | private var _startedAt:Number; 28 | public function get startedAt():Number 29 | { 30 | return _startedAt; 31 | } 32 | 33 | private var _stoppedAt:Number; 34 | public function get stoppedAt():Number 35 | { 36 | return _stoppedAt; 37 | } 38 | 39 | private var _latestBatteryLevel:int; 40 | 41 | public function set latestBatteryLevel(value:int):void 42 | { 43 | _latestBatteryLevel = value; 44 | Database.updateSensor(this); 45 | } 46 | 47 | public function get latestBatteryLevel():int 48 | { 49 | return _latestBatteryLevel; 50 | } 51 | 52 | public function Sensor(startedAt:Number, stoppedAt:Number, latestBatteryLevel:int, sensorId:String, lastmodifiedtimestamp:Number) 53 | { 54 | super(sensorId, lastmodifiedtimestamp); 55 | _startedAt = startedAt; 56 | _stoppedAt = stoppedAt; 57 | _latestBatteryLevel = latestBatteryLevel; 58 | } 59 | 60 | /** 61 | * if sensor is active, then returns the active sensor
62 | * if sensor not active, then returns null
63 | */ 64 | public static function getActiveSensor():Sensor { 65 | var sensorId:String = CommonSettings.getCommonSetting(CommonSettings.COMMON_SETTING_CURRENT_SENSOR); 66 | if (sensorId == "0") 67 | return null; 68 | return Database.getSensor(sensorId); 69 | } 70 | 71 | /** 72 | * starts a new sensor and inserts it in the database
73 | * if a sensor is currently active then it will be stopped
74 | *
75 | * If timestamp isNaN then start time will be set to current time - 2 hours, otherwise it's assigned value of timestamp
76 | * Number.NaN is only to be used for testpurposes 77 | */ 78 | public static function startSensor(timestamp:Number = Number.NaN):void { 79 | if (isNaN(timestamp)) 80 | timestamp = (new Date()).valueOf() - 2 * 60 * 60 * 1000; 81 | var currentSensor:Sensor = getActiveSensor(); 82 | if (currentSensor != null) { 83 | currentSensor._stoppedAt = (new Date()).valueOf(); 84 | currentSensor.resetLastModifiedTimeStamp(); 85 | Database.updateSensor(currentSensor); 86 | } 87 | currentSensor = new Sensor(timestamp, 0, 0, null, Number.NaN); 88 | Database.insertSensor(currentSensor); 89 | CommonSettings.setCommonSetting(CommonSettings.COMMON_SETTING_CURRENT_SENSOR, currentSensor.uniqueId); 90 | } 91 | 92 | /** 93 | * stops the sensor and updates the database
94 | * also sets FSL_SENSOR_AGE to 0 95 | */ 96 | public static function stopSensor():void { 97 | var currentSensor:Sensor = getActiveSensor(); 98 | if (currentSensor != null) { 99 | currentSensor._stoppedAt = (new Date()).valueOf(); 100 | currentSensor.resetLastModifiedTimeStamp(); 101 | Database.updateSensor(currentSensor); 102 | } 103 | CommonSettings.setCommonSetting(CommonSettings.COMMON_SETTING_CURRENT_SENSOR, "0"); 104 | CommonSettings.setCommonSetting(CommonSettings.COMMON_SETTING_FSL_SENSOR_AGE, "0"); 105 | } 106 | 107 | public function print(indentation:String):String { 108 | var r:String = "sensor = "; 109 | r += "\n" + indentation + "uniqueid = " + uniqueId; 110 | r += "\n" + indentation + "startedAt = " + (new Date(startedAt)).toLocaleString(); 111 | r += "\n" + indentation + "stoppedAt = " + (new Date(stoppedAt)).toLocaleString(); 112 | r += "\n" + indentation + "latestBatteryLevel = " + latestBatteryLevel; 113 | return r; 114 | } 115 | } 116 | } -------------------------------------------------------------------------------- /src/databaseclasses/SuperDatabaseClass.as: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright (C) 2016 Johan Degraeve 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | 17 | */ 18 | package databaseclasses 19 | { 20 | import Utilities.UniqueId; 21 | 22 | /** 23 | * class that holds and does generic attributes and methods for all classes that will do google sync etc.
24 | * lastmodifiedtimestamp is to allow syncing, this is not a generic timestamp to be used for other purposes 25 | */ 26 | public class SuperDatabaseClass 27 | { 28 | protected var _lastModifiedTimestamp:Number; 29 | 30 | public function get lastModifiedTimestamp():Number 31 | { 32 | return _lastModifiedTimestamp; 33 | } 34 | 35 | protected var _uniqueId:String; 36 | 37 | public function get uniqueId():String 38 | { 39 | return _uniqueId; 40 | } 41 | 42 | /** 43 | * if uniqueID is null than a new id is assigned
44 | * if lastmodifiedtimestamp is Number.NaN then current time is assigned
45 | */ 46 | public function SuperDatabaseClass(uniqueId:String, lastmodifiedtimestamp:Number) 47 | { 48 | if (isNaN(lastmodifiedtimestamp)) 49 | _lastModifiedTimestamp = (new Date()).valueOf(); 50 | else 51 | _lastModifiedTimestamp = lastmodifiedtimestamp; 52 | 53 | if (uniqueId == null) 54 | _uniqueId = Utilities.UniqueId.createEventId(); 55 | else 56 | _uniqueId = uniqueId; 57 | } 58 | 59 | protected function resetLastModifiedTimeStamp():void { 60 | _lastModifiedTimestamp = (new Date()).valueOf(); 61 | } 62 | } 63 | } -------------------------------------------------------------------------------- /src/distriqtkey/DistriqtKey.as: -------------------------------------------------------------------------------- 1 | package distriqtkey 2 | { 3 | public class DistriqtKey 4 | { 5 | public static const distriqtKey:String = "f89601149f16c773905648fe24418fa26f3cbfbcLSOMIi/SPyhAghQqRFNLdE8v6RvUO8JSnqTi7PLrl9rVg7p/R+xwRu8NuqGPewfIkmcekJAQgJ4jEGvahM2fgBDKJ4X8GjHtRG7fT8qcXeF5Uu6KfycbQg1QYSi1R0FS5oP1N8RY+ohIKIESDlUvqomC6+elAqqzLDYG4usq0bUyXkvNAwlpXPdcIifnpMGaiffJQzXgu/UmfMBsO+lobpk4Lmz2PUkk56kVSpBNVeMDhVinHek5a485zdvR2u/r4W5REYkVHi6qdbQ9n3micMf59nf/HT7py9Q0jGskqSgoUPU/Md0ih36m1Wfn8ZzHf6TuJTWzMy+4Wzh6fQ/OyA=="; 6 | public static const distriqtKeyFireBaseAndPushNotification = "f89601149f16c773905648fe24418fa26f3cbfbcQ6GxZvcHd3Gbpq2HEJ+941/0S6DqBt4unLnU98AAPcH3B9IbLJjGUV8LcXOGMLrSc1xSOmf/YbWdVwgnaerRiuAv0gbOXOlojV4zx4r2IUKUqbVonUlXqJnbDsz+I3PkSRRtToN/on5tl9WFbrO5wgQ5tpTra1SaFOyKsBp45MaLlgWsda+GlneW3yMiIKimiuOwWlDxCGoJIG5UOwZLE8Zyi6aBUg6v3ALJmDMz2MFJ8V72E2CoOpn/NNgdzNVjNJHo8NZ3gOnHO41dYCWW2I5b9pmFKkDRlQ6h326iL+E/A3amd0/RbiC5KYCHLIdfZjctSTy77h5FQQPLlsVXqQ=="; 7 | 8 | public function DistriqtKey() {} 9 | } 10 | } -------------------------------------------------------------------------------- /src/events/BackGroundFetchServiceEvent.as: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright (C) 2016 Johan Degraeve 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | 17 | */ 18 | package events 19 | { 20 | import flash.events.Event; 21 | 22 | [Event(name="LoadRequestResult",type="events.BackGroundFetchServiceEvent")] 23 | [Event(name="LoadRequestERror",type="events.BackGroundFetchServiceEvent")] 24 | [Event(name="LoadRequestERror",type="events.BackGroundFetchServiceEvent")] 25 | 26 | public class BackGroundFetchServiceEvent extends Event 27 | { 28 | /** 29 | * load request was successful, data.information contains the result 30 | */ 31 | public static const LOAD_REQUEST_RESULT:String = "LoadRequestResult"; 32 | /** 33 | * load request was successful, data.information contains the error 34 | */ 35 | public static const LOAD_REQUEST_ERROR:String = "LoadRequestERror"; 36 | public var data:*; 37 | 38 | public function BackGroundFetchServiceEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false) 39 | { 40 | super(type, bubbles, cancelable); 41 | } 42 | } 43 | } -------------------------------------------------------------------------------- /src/events/BlueToothServiceEvent.as: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright (C) 2016 Johan Degraeve 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | 17 | */ 18 | package events 19 | { 20 | import flash.events.Event; 21 | 22 | [Event(name="ResultEvent",type="events.BlueToothServiceEvent")] 23 | [Event(name="ErrorEvent",type="events.BlueToothServiceEvent")] 24 | [Event(name="BluetoothStatusChangedEvent",type="events.BlueToothServiceEvent")] 25 | [Event(name="BluetoothServiceInformation",type="events.BlueToothServiceEvent")] 26 | [Event(name="TransmitterData",type="events.BlueToothServiceEvent")] 27 | [Event(name="BluetoothServiceInitiated",type="events.BlueToothServiceEvent")] 28 | [Event(name="StoppedScanning",type="events.BlueToothServiceEvent")] 29 | [Event(name="DeviceNotPaired",type="events.BlueToothServiceEvent")] 30 | [Event(name="CharacteristicUpdate",type="events.BlueToothServiceEvent")] 31 | [Event(name="glucosePatchReadError",type="events.BlueToothServiceEvent")] 32 | 33 | /** 34 | * used by bluetoothservice to notify on all kinds of events : information messages like bluetooth state change, bluetooth state change, 35 | * result received from transmitter, etc..
36 | * to get info about connectivity status, new transmitter data ... create listeners for the events
37 | */ 38 | public class BlueToothServiceEvent extends Event 39 | { 40 | /** 41 | * generic event to inform about the result of an event, specifically for case where a dispatcher has been supplied by the client 42 | */ 43 | public static const RESULT_EVENT:String = "ResultEvent"; 44 | /** 45 | * generic event to inform about the error that happened, specifically for case where a dispatcher has been supplied by the client 46 | */ 47 | public static const ERROR_EVENT:String = "ErrorEvent"; 48 | /** 49 | * To pass status information, this is just text that can be shown to the user to display progress info
50 | * data.information will be a string with this info. 51 | */ 52 | public static const BLUETOOTH_SERVICE_INFORMATION_EVENT:String = "BluetoothServiceInformation"; 53 | /** 54 | * To inform that scanning is programmatically stopped after timer expiry 55 | */ 56 | public static const STOPPED_SCANNING:String = "StoppedScanning"; 57 | /** 58 | * to inform that g5 transmitter is not paired 59 | */ 60 | public static const DEVICE_NOT_PAIRED:String = "DeviceNotPaired"; 61 | public static const CHARACTERISTIC_UPDATE:String = "CharacteristicUpdate"; 62 | /** 63 | * for BLUKON 64 | */ 65 | public static const GLUCOSE_PATCH_READ_ERROR:String = "glucosePatchReadError"; 66 | 67 | /** 68 | * To pass transmitter data
69 | * data will be an instance of TransmitterData. The type of subclass determines the type of transmitter data
70 | * The bluetoothservice will not reply to the device and not ack any message
71 | * This is the responsibility of the service that processes the transmitter data (ie TransmitterService) 72 | */ 73 | public static const TRANSMITTER_DATA:String = "Transmitterdata"; 74 | /** 75 | * will be dispatches as soon as blue tooth service is initiated and distriqt classes can be used 76 | */ 77 | public static const BLUETOOTH_SERVICE_INITIATED:String = "BluetoothServiceInitiated"; 78 | 79 | /** 80 | * Dispatched when successfully subscribed to characteristics - this is the final step in the process of connecting to a device
81 | */ 82 | public static const BLUETOOTH_DEVICE_CONNECTION_COMPLETED:String = "BluetoothDeviceConnectionCompleted"; 83 | 84 | public var data:*; 85 | 86 | public function BlueToothServiceEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false) { 87 | super(type, bubbles, cancelable); 88 | } 89 | } 90 | } -------------------------------------------------------------------------------- /src/events/CalibrationServiceEvent.as: -------------------------------------------------------------------------------- 1 | package events 2 | { 3 | import flash.events.Event; 4 | 5 | [Event(name="InitialCalibrationEvent",type="events.CalibrationServiceEvent")] 6 | [Event(name="NewCalibrationEvent",type="events.CalibrationServiceEvent")] 7 | 8 | public class CalibrationServiceEvent extends Event 9 | { 10 | /** 11 | * event to inform that initial calibration is done 12 | */ 13 | public static const INITIAL_CALIBRATION_EVENT:String = "InitialCalibrationEvent"; 14 | /** 15 | * event to inform that there's a new calibration done (could also be an override of a previous calibration) 16 | */ 17 | public static const NEW_CALIBRATION_EVENT:String = "NewCalibrationEvent"; 18 | 19 | public var data:*; 20 | /** 21 | * timestamp that the event was generated 22 | */ 23 | public var timestamp:Number; 24 | 25 | public function CalibrationServiceEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false) 26 | { 27 | super(type, bubbles, cancelable); 28 | } 29 | 30 | } 31 | } -------------------------------------------------------------------------------- /src/events/DatabaseEvent.as: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright (C) 2013 hippoandfriends 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | 17 | */ 18 | package events 19 | { 20 | import flash.events.Event; 21 | 22 | [Event(name="ResultEvent",type="events.DatabaseEvent")] 23 | [Event(name="ErrorEvent",type="events.DatabaseEvent")] 24 | [Event(name="DatabaseInitFinishedEvent",type="events.DatabaseEvent")] 25 | [Event(name="BGReadingRetrievedEvent",type="events.DatabaseEvent")] 26 | 27 | public class DatabaseEvent extends Event 28 | { 29 | public static const RESULT_EVENT:String = "ResultEvent"; 30 | public static const ERROR_EVENT:String = "ErrorEvent"; 31 | public static const DATABASE_INIT_FINISHED_EVENT:String = "DatabaseInitFinishedEvent"; 32 | public static const BGREADING_RETRIEVAL_EVENT:String = "BGReadingRetrievedEvent"; 33 | 34 | public var data:*; 35 | 36 | public function DatabaseEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false) 37 | { 38 | super(type, bubbles, cancelable); 39 | } 40 | } 41 | } -------------------------------------------------------------------------------- /src/events/DeepSleepServiceEvent.as: -------------------------------------------------------------------------------- 1 | package events 2 | { 3 | import flash.events.Event; 4 | 5 | public class DeepSleepServiceEvent extends Event 6 | { 7 | [Event(name="DeepSleepServiceTimerEvent",type="events.DeepSleepServiceEvent")] 8 | 9 | /** 10 | * event to inform that dialogservice is initiated.
11 | */ 12 | public static const DEEP_SLEEP_SERVICE_TIMER_EVENT:String = "DeepSleepServiceTimerEvent"; 13 | 14 | public var data:*; 15 | 16 | public function DeepSleepServiceEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false) 17 | { 18 | super(type, bubbles, cancelable); 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /src/events/DialogServiceEvent.as: -------------------------------------------------------------------------------- 1 | package events 2 | { 3 | import flash.events.Event; 4 | 5 | public class DialogServiceEvent extends Event 6 | { 7 | [Event(name="DialogServiceInitiatedEvent",type="events.DialogServiceEvent")] 8 | 9 | /** 10 | * event to inform that dialogservice is initiated.
11 | */ 12 | public static const DIALOG_SERVICE_INITIATED_EVENT:String = "DialogServiceInitiatedEvent"; 13 | 14 | public var data:*; 15 | 16 | public function DialogServiceEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false) 17 | { 18 | super(type, bubbles, cancelable); 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /src/events/IosXdripReaderEvent.as: -------------------------------------------------------------------------------- 1 | package events 2 | { 3 | import flash.events.Event; 4 | 5 | public class IosXdripReaderEvent extends Event 6 | { 7 | [Event(name="AppInForeGroundEvent",type="events.IosXdripReaderEvent")] 8 | 9 | /** 10 | * event to inform that app has moved to foreground
11 | */ 12 | public static const APP_IN_FOREGROUND:String = "AppInForeGroundEvent"; 13 | 14 | public function IosXdripReaderEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false) 15 | { 16 | super(type, bubbles, cancelable); 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /src/events/NightScoutServiceEvent.as: -------------------------------------------------------------------------------- 1 | package events 2 | { 3 | import flash.events.Event; 4 | 5 | [Event(name="BgReadingReceived",type="events.NightScoutServiceEvent")] 6 | [Event(name="BgReadingsRemoved",type="events.NightScoutServiceEvent")] 7 | 8 | public class NightScoutServiceEvent extends Event 9 | { 10 | /** 11 | * on or more bgreading received from NS. Only for Follower
12 | */ 13 | public static const NIGHTSCOUT_SERVICE_BG_READING_RECEIVED:String = "BgReadingReceived"; 14 | /** 15 | * readings that were stored in modellocator by nightscoutservice, are removed 16 | */ 17 | public static const NIGHTSCOUT_SERVICE_BG_READINGS_REMOVED:String = "BgReadingsRemoved"; 18 | 19 | public var data:*; 20 | 21 | public function NightScoutServiceEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false) { 22 | super(type, bubbles, cancelable); 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /src/events/NotificationServiceEvent.as: -------------------------------------------------------------------------------- 1 | package events 2 | { 3 | import flash.events.Event; 4 | 5 | public class NotificationServiceEvent extends Event 6 | { 7 | [Event(name="NotificationSelectedEvent",type="events.NotificationServiceEvent")] 8 | [Event(name="NotificationActionEvent",type="events.NotificationServiceEvent")] 9 | [Event(name="NotificationEvent",type="events.NotificationServiceEvent")] 10 | [Event(name="NotificationServiceInitiatedEvent",type="events.NotificationServiceEvent")] 11 | 12 | /** 13 | * Event to inform about a notifiation event.
14 | * This event is dispatched when the app receives a notification
15 | * This type of event should only happen if the app is in the foreground
16 | *
17 | * data will be the notification ie an object of type NotificationEvent 18 | */ 19 | public static const NOTIFICATION_EVENT:String = "NotificationEvent"; 20 | 21 | /** 22 | * Event to inform that the user selected a notifiation.
23 | * This event is dispatched when the user selected a notification
24 | * This type of event should normally only happen if the app is in the background, because, if a notification 25 | * is fired while the app is in the foreground, it only pops up for a second, user doesn't have chance to select it. 26 | *
27 | * data will be the notification ie an object of type NotificationEvent 28 | */ 29 | public static const NOTIFICATION_SELECTED_EVENT:String = "NotificationSelectedEvent"; 30 | 31 | /** 32 | * Event to inform that the user selected an action in a notification.
33 | *
34 | * data will be the notification ie an object of type NotificationEvent 35 | */ 36 | public static const NOTIFICATION_ACTION_EVENT:String = "NotificationActionEvent"; 37 | 38 | /** 39 | * event to inform that the notificationservice is initiated successfully, ie authorised by user.
40 | */ 41 | public static const NOTIFICATION_SERVICE_INITIATED_EVENT:String = "NotificationServiceInitiatedEvent"; 42 | 43 | public var data:*; 44 | 45 | public function NotificationServiceEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false) 46 | { 47 | super(type, bubbles, cancelable); 48 | } 49 | } 50 | } -------------------------------------------------------------------------------- /src/events/SettingsServiceEvent.as: -------------------------------------------------------------------------------- 1 | package events 2 | { 3 | import flash.events.Event; 4 | 5 | public class SettingsServiceEvent extends Event 6 | { 7 | [Event(name="SettingChanged",type="events.SettingsServiceEvent")] 8 | 9 | /** 10 | * a setting has changed, data will contain the id (integer) of the setting that changed 11 | */ 12 | public static const SETTING_CHANGED:String = "SettingChanged"; 13 | 14 | public var data:*; 15 | 16 | public function SettingsServiceEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false) { 17 | super(type, bubbles, cancelable); 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /src/events/TransmitterServiceEvent.as: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright (C) 2016 Johan Degraeve 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | 17 | */ 18 | package events 19 | { 20 | import flash.events.Event; 21 | 22 | [Event(name="BGReadingEvent",type="events.TransmitterServiceEvent")] 23 | 24 | /** 25 | * used by transmitter service to notify on all kinds of events : information messages, etc..
26 | */ 27 | 28 | public class TransmitterServiceEvent extends Event 29 | { 30 | /** 31 | * event to inform that there's a new bgreading available
32 | * event is dispatched when bgreading is stored in the Modellocator and also in the databaase.
33 | * There's no data attached to it. 34 | */ 35 | public static const BGREADING_EVENT:String = "BGReadingEvent"; 36 | 37 | public var data:*; 38 | 39 | public function TransmitterServiceEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false) 40 | { 41 | super(type, bubbles, cancelable); 42 | } 43 | } 44 | } -------------------------------------------------------------------------------- /src/iosxdripreader.mxml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 24 | 25 | 26 | 27 | 74 | 75 | 76 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /src/locale/en_US/alarmservice.properties: -------------------------------------------------------------------------------- 1 | low_alert_notification_alert_text=Low Alert 2 | verylow_alert_notification_alert_text=Very Low Alert 3 | high_alert_notification_alert_text=High Alert 4 | veryhigh_alert_notification_alert_text=Very High Alert 5 | missed_reading_alert_notification_alert=Missed Reading 6 | phonemuted_alert_notification_alert_text=Phone Muted 7 | batteryLevel_alert_notification_alert_text=Battery Low 8 | calibration_request_alert_notification_alert_title=Calibration needed 9 | hour=hour 10 | hours=hours 11 | minutes=minutes 12 | day=day 13 | days=days 14 | week=week 15 | snooze_text_low_alert=Low Alert\n\nSelect snooze value. 16 | snooze_text_very_low_alert=Very Low Alert\n\nSelect snooze value. 17 | snooze_text_phone_muted_alert=Phone Muted Alert\n\nSelect snooze value. 18 | snooze_text_high_alert=High Alert\n\nSelect snooze value. 19 | snooze_text_very_high_alert=Very High Alert\n\nSelect snooze value. 20 | snooze_text_missed_reading_alert=Missed Reading Alert\n\nSelect snooze value. 21 | snooze_text_battery_alert=Battery Low Alert\n\nSelect snooze value. 22 | snooze_text_calibration_alert=Calibration Request Alert\n\nSelect snooze value. 23 | application_stopped_alert_title=Application Alert 24 | application_stopped_alert_body=xDrip application inactive more than 5 minutes ! 25 | received=Received 26 | consecutive_sensor_not_detected=times 'sensor not detected'. Check the position of MiaoMiao. -------------------------------------------------------------------------------- /src/locale/en_US/alerttypesview.properties: -------------------------------------------------------------------------------- 1 | alerttype_still_used=This Alert Type is still used. You can not delete it. 2 | delete_alert_type=Delete Alert Type Failed ! 3 | default_alarm_name=Alert -------------------------------------------------------------------------------- /src/locale/en_US/alerttypeview.properties: -------------------------------------------------------------------------------- 1 | enabled=Enabled 2 | disabled=Disabled 3 | alarmname=Name 4 | vibrationenabled=Vibration enabled 5 | snoozefromnotification=Snooze from notification 6 | defaultsnoozeperiod=Snooze period (min) 7 | edit_alert_type=Edit Alert Type 8 | soundname=Sound 9 | alarm_name=Alert Name 10 | alarm_name_invalid=Invalud value ! 11 | enter_alarm_name=Give new alert name 12 | default_snooze=Default Snooze period 13 | default_snooze_text=Snooze period in minutes, to be applied when snoozed from notification center. 14 | default_snooze_set_failed=Invalid value ! 15 | sound_name=Give new Sound Name 16 | enter_sound_name=Empty field means no sound. 17 | alarm_name_already_exists=an Alert with that name already exists ! 18 | repeat=Repeat 19 | sound_names_as_in_assets_no_translation_needed_comma_seperated=../assets/xdripalert.aif,../assets/shorthigh1.mp3,../assets/shorthigh2.mp3,../assets/shorthigh3.mp3,../assets/shorthigh4.mp3,../assets/shortlow1.mp3,../assets/shortlow2.mp3,../assets/shortlow3.mp3,../assets/shortlow4.mp3,../assets/modernalarm.mp3,../assets/modern2.mp3,../assets/spaceship.mp3,../assets/bruteforce.mp3,../assets/betterwakeup.mp3 20 | sound_names_as_displayed_can_be_translated_must_match_above_list=xDrip Sound,Short High 1, Short High 2, Short High 3, Short High 4, Short Low 1, Short Low 2, Short Low 3, Short Low 4, Modern Alarm, Modern Alarm 2, Spaceship, Bruteforce, Better Wakeup 21 | default_sound_as_displayed=Default iOS Sound 22 | no_sound=No Sound -------------------------------------------------------------------------------- /src/locale/en_US/bluetoothservice.properties: -------------------------------------------------------------------------------- 1 | unknownpackettypeinfo=Your xdrip seems to have a firmware version that is not supported by iosxdripreader.\nSend an e-mail and you will receive a link to a supported version.\n\n(Please make sure you have a native e-mail account configured on your iPhone) 2 | notnow=Not now 3 | dontaskagain=Don't ask again 4 | sendemail=Send e-mail 5 | cantusesensor=Can't use this sensor as it is 6 | other_G5_app=Other G5 app running 7 | other_G5_app_info=There seems to be another app trying to connect to the G5 transmitter or you have recently used another app. Close any other app, or even more, delete other apps that may try to connect to your transmitter. If you used another app recently, then keep xDrip running and wait. It make take 15 minutes before it connects. 8 | dead_or_expired_sensor=Dead or expired sensor 9 | sensor_not_detected_miaomiao=Sensor not detected. Check if the MiaoMiao is well placed on the sensor. -------------------------------------------------------------------------------- /src/locale/en_US/calibrationservice.properties: -------------------------------------------------------------------------------- 1 | enter_calibration_title=Calibration 2 | enter_calibration=Measure your blood glucose level now and enter the value. 3 | invalid_value=Invalid Value ! 4 | value_should_be_numeric=Value should be numeric. 5 | enter_calibration_title_with_override=Override Calibration 6 | can_not_calibrate_right_now=Can not calibrate right now because there are not enough recent readings. 7 | enter_bg_value_with_override=Calibrating now will override the previous calibration !\n\nEnter bloodglucose value : 8 | value=Value 9 | enter_bg_value_without_override=Enter bloodglucose value : 10 | calibration_request_alert=Calibration Needed 11 | calibration_request_title=Calibration Needed 12 | calibration_request_body=A calibration entered now will GREATLY increase performance 13 | extra_calibration_not_needed_anymore=An extra calibration is not needed anymore 14 | blood_glucose_calibration_value=Reading 15 | latest_reading_is_too_old=Latest reading received from transmitter is more than 2 minutes old, please wait for new reading -------------------------------------------------------------------------------- /src/locale/en_US/dexcomshareservice.properties: -------------------------------------------------------------------------------- 1 | account_name_not_found=Account name not found 2 | login_error=Dexcom Share Login Failed 3 | invalid_password=Invalid password 4 | max_login_attempts_excceded=Maximum login attempts exceeded. Will wait 10 minutes before new login attempt. 5 | upload_error=Dexcom Share Upload Error 6 | monitored_receiver_sn_doesnotmatch=Dexcom Share Serial Number does not match the serial number for this account. Verify the Serial Number in the settings. 7 | credentialtest=Dexcom Login 8 | credentialtest_success=Login successful. 9 | dexcom_max_login_attempts_exceeded=Maximum number of failed login attempts reached, wait a few minutes before retrying. 10 | monitored_receiver_not_assigned_1=It seems the transmitter id or serial number 11 | monitored_receiver_not_assigned_2=is not assigned to 12 | monitored_receiver_not_assigned_3=Use the official Dexcom app to register the transmitter (G5) or Share receiver (G4) 13 | -------------------------------------------------------------------------------- /src/locale/en_US/dialogservice.properties: -------------------------------------------------------------------------------- 1 | device_not_paired_dialog_title=Device not paired. 2 | device_not_paired_dialog_body=G5 transmitter is not paired with this iOS device. Keep the app open in the foreground until you receive a Bluetooth pairing request. This request will arrive at $time. \n\nIt may also be 5, 10 .. minutes later.\n\nIf there's no Bluetooth pairing request within 15 minutes, then close and re-open the xDrip app.\nIt may also be necessary to remove the Dexcom transmitter from list of paired devices in Bluetooth settings.\n\nTo keep the app always open, go to the app home screen, and long press 1 second till the phone vibrates. Don't lock the phone and don't press the Home button. -------------------------------------------------------------------------------- /src/locale/en_US/export.properties: -------------------------------------------------------------------------------- 1 | info=Info 2 | now_values_to_export_for_sidiary=No new values to export. -------------------------------------------------------------------------------- /src/locale/en_US/fromtimeandvalueelementview.properties: -------------------------------------------------------------------------------- 1 | value=Value 2 | from=From 3 | choose_from_time=From 4 | first_element_can_not_change_time=You can not change the from time of the first Alert 5 | change_from_alert_title=Change From 6 | change_value_alert_title=Change Value 7 | change_value_alert_message=Alert Value 8 | alarmname=Alert Type 9 | alarm_picker_title=Choose 10 | give_info_about_value=Choose an Alert Type that is enabled if you want to change the value. You may have to define a new Alert Type first. -------------------------------------------------------------------------------- /src/locale/en_US/fromtimeandvaluelistview.properties: -------------------------------------------------------------------------------- 1 | value=Alert Value 2 | from=From 3 | savechanges=Save Changes ? 4 | chose_yes_or_no=Choose Yes or No 5 | fromtimeandvaluelistview_info=Using the + sign you can add periods during which you want to use another value and/or another alert type.\nThe last row is valid till 23:59 -------------------------------------------------------------------------------- /src/locale/en_US/general.properties: -------------------------------------------------------------------------------- 1 | back=Back 2 | cancel=Cancel 3 | yes=Yes 4 | no=No 5 | dont_show_again=Don't Show Again 6 | ok=OK 7 | languagecode=en-US -------------------------------------------------------------------------------- /src/locale/en_US/nightscoutservice.properties: -------------------------------------------------------------------------------- 1 | nightscout_title=Nightscout test 2 | nightscout_test_result_ok=Nightscout url and api_secret successfully tested.\n\nUpload to Nightscout will now occur automatically. 3 | nightscout_test_result_nok=Nightscout url and api_secret test failed.\n\nError Message = 4 | care_portal_should_be_enabled=careportal should be enabled on your site because the app tries to create an exercise treatment to test the NightScout url and api_secret. 5 | -------------------------------------------------------------------------------- /src/locale/en_US/notificationservice.properties: -------------------------------------------------------------------------------- 1 | open=Open 2 | calibrate=Calibrate 3 | connected=Connected 4 | not_connected=Not connected 5 | device_not_paired_notification_title=Device Not Paired 6 | device_not_paired_body_text_background=Open the xDrip Application. 7 | device_not_paired_body_text_foreground=Accept the Bluetooth pairing request. 8 | snooze_for_snoozin_alarm_in_notification_screen=Snooze 9 | glucose_patch_read_error_notification_title=Error 10 | glucose_patch_read_error_body_text=Patch read error.. please check the connectivity and re-initiate... or maybe battery is low. -------------------------------------------------------------------------------- /src/locale/en_US/pickerview.properties: -------------------------------------------------------------------------------- 1 | click_to_close=(Click to close this view) -------------------------------------------------------------------------------- /src/locale/en_US/settingsview.properties: -------------------------------------------------------------------------------- 1 | title=Preferences 2 | logging_and_tracing=Logging and Tracing 3 | detailed_tracing=Detailed Tracing 4 | on=on 5 | off=off 6 | send_tracing_via_email=Send trace file via e-mail 7 | show_nightscout_title=NightScout 8 | url=Url 9 | api_secret=API_SECRET 10 | enter_nightscout_url_title=Enter NightScout Url 11 | enter_nightscout_url_message=Without /api/v1. 12 | enter_nightscout_api_secret_title=Enter API_SECRET 13 | enter_nightscout_api_secret_message=This is just the API_SECRET. 14 | alerts=Alerts 15 | general_settings=General Settings 16 | unit=Bg Unit 17 | mgdl=mgdl 18 | mmol=mmol 19 | high_value=High Value 20 | low_value=Low Value 21 | always_on_notification=Readings in Notification 22 | versioninfo=Version Info 23 | version=Version 24 | ns_logging=NSLog 25 | transmitter_type_settings_title=Transmitter Type/Follower 26 | low_alert=Low 27 | very_low_alert=Very Low 28 | high_alert=High 29 | very_high_alert=Very High 30 | missed_reading_alert=Missed Reading 31 | phone_muted_alert=Phone Muted 32 | calibration_request_alert=Calibration 33 | battery_low_alert=Battery Low 34 | alert_top_text=Add, Modify or Delete Alert 35 | no_alert=No Alert 36 | alert_types=Alert Types 37 | alert_types_list_top_text=Add, Modify or Delete Alert Types 38 | edit_low_alert=Edit Low Alert 39 | edit_very_low_alert=Edit Very Low Alert 40 | edit_high_alert=Edit High Alert 41 | edit_very_high_alert=Edit Very High Alert 42 | edit_missed_reading_alert=Edit Missed Reading Alert 43 | edit_phone_muted_alert=Edit Phone Muted Alert 44 | edit_battery_low_alert=Edit Battery Low Alert 45 | edit_calibration_request_alert=Edit Calibration Request Alert 46 | explain_low_alert_list=If a reading is below the value, then the alert will be applied. 47 | explain_very_low_alert_list=The very low alert value is checked before the low alert value, if a reading is below the value, then the alert will be applied. 48 | explain_high_alert=If a reading is above the value, then the alert will be applied. 49 | explain_very_high_alert_list=The very high alert value is checked before the high alert value, if a reading is above the value, then the alert will be applied. 50 | explain_missed_reading_alert=If no reading received for more than the specified number of minutes, then the alert will be applied. 51 | explain_phone_muted_alert=When to check if your phone is on mute. 52 | explain_battery_low_alert=If transmitter battery level below the specified value, then the alert will be applied. Default values depend on transmitter type. G5 : 300, G4 : 210, Blukon : 5, MiaoMiao : 20. 53 | explain_calibration_request_alert=How often do you want to calibrate (in hours). 54 | warning=Warning 55 | warn_and_info_phone_muted=You mute your phone during the day, but forget to unmute it when you go to sleep. You will not hear any of the alerts. The Phone Muted alert can warn you before you go to sleep to unmute your phone. 56 | warn_and_info_low_battery=Default low battery alert level is set to 300 which is the default value for G5. For other transmitter types change the value. G4 : 210, Blukon : 5, MiaoMiao : 20. 57 | silent_alert=Silent 58 | store_in_healthkit=Healthkit 59 | high_value_should_be_higher_than_low_value=High Value should be higher than Low Value 60 | low_value_should_be_lower_than_high_value=Low Value should be lower than High Value 61 | transmittertype_picker_title=Transmitter 62 | show_dexcomshare_title=Dexcom Share 63 | dexcomshareaccountname=Account 64 | dexcomsharepassword=Password 65 | dexcomshareserialnumber=Serial 66 | enter_dexcom_share_account_name_title=Enter Dexcom Share Account Name 67 | enter_dexcom_share_password_title=Enter Dexcom Share Password 68 | enter_dexcom_share_serialnumber_title=Enter Receiver Serial Number 69 | dexcomshareonoff=Dexcom Share 70 | dexcom_us_url=US Share url 71 | dexcom_non_us_url=non US Share url 72 | show_speak_readings_title=Speech 73 | speakreadingsonoff=Speak BG Readings 74 | speakreadingsinstructions=For this feature to work properly you should change the voice that will be used by going to iOS settings, general, accessibility, speech, voices and select the desired voice for exactly the same language and country you selected here. 75 | speakreadingsinterval=Interval 76 | enter_speak_readings_interval_title=Enter Interval 77 | enter_speak_readings_interval_message=Speak Every X Readings 78 | speakreadingstrendonoff=Speak BG Trend 79 | speakreadingsdeltaonoff=Speak BG Delta 80 | speakreadingslanguagetitle=Language 81 | speakreadingslanguagepickertitle=Language 82 | checkappupdatesonoff=Check App Updates 83 | override_mute=Override Mute 84 | export=Export 85 | app_inactive_alert=App inactive Alert 86 | vibrate_alert=Vibrate 87 | xdrip_sound_alert=xDrip Alert 88 | changedeepsleepinterval=Suspension Prevention 89 | selectdeepsleepinterval=How often playsound, in seconds (default value is 5) ? 90 | seconds=seconds 91 | nightscout_upload_always=Always NightScout upload 92 | nightscout_upload_every_12_hours=NightScout upload at least every 12 Hours 93 | ngithscout_upload_when_plugged=NightScout upload when charging 94 | ngithscout_upload_when_in_foreground=NightScout upload when in foreground 95 | ngithscout_upload_when_coming_to_foreground=One time NightScout upload when coming from background to foreground 96 | -------------------------------------------------------------------------------- /src/locale/en_US/texttospeech.properties: -------------------------------------------------------------------------------- 1 | ttslanguagelistdescription=Chinese,Dutch,English,French,Italian,Polish,Portuguese (Brazil),Portuguese (Portugal),Russian (Russia), Slovenian, Spanish (Mexico),Spanish (Spain) 2 | ttslanguagelistcodes=zh-CN,nl-BE,en-US,fr-FR,it-IT,pl-PL,pt-BR,pt-PT,ru-RU,sl-SL,es-MX,es-ES 3 | currentglucose=Current blood glucose is 4 | currenttrend=It's trending 5 | currentdelta=Difference from last reading is 6 | trendnoncomputable=non computable 7 | trenddoubledown=dramatically downward 8 | trendsingledown=significantly downward 9 | trendfortyfivedown=down 10 | trendflat=flat 11 | trendfortyfiveup=up 12 | trendsingleup=significantly upward 13 | trenddoubleup=dramatically upward 14 | deltanoncomputable=non computable 15 | high=high 16 | low=low -------------------------------------------------------------------------------- /src/locale/en_US/transmitterservice.properties: -------------------------------------------------------------------------------- 1 | enter_transmitter_id_dialog_title=Transmitter Id 2 | enter_transmitter_id=Enter transmitter id 3 | transmitter_id_should_be_five_chars=Transmitter Id should be {max} letters and digits. 4 | set_transmitter_id_in_settings=Go to Settings to change the Transmitter Id. 5 | transmitter_id_settings_title=Transmitter Id 6 | blukon_transmitter_id_should_be_five_chars=Transmitter id must have format BLUxxxxx. 7 | blukon_xxxxx_explanation=xxxxx are the last 5 digits of the identifier on the BluKon device. Example if the number on the BluKon is "BLU1157A00109", then your transmitter id should be "BLU00109". 8 | dead_g5_battery=G5 battery almost dead. 9 | dead_g5_battery_info=Time for replacement.The app will not create new readings until the transmitter sends good values.\n\nTo get rid of this notification, change the transmitter id. 10 | bad_placed_g5_transmitter=G5 transmitter problem. 11 | bad_placed_g5_transmitter_info=Received value 0 from G5 transmitter. This may be caused by badly placed transmitter or maybe a G5 battery problem. -------------------------------------------------------------------------------- /src/locale/es_ES/general.properties: -------------------------------------------------------------------------------- 1 | languagecode=es-ES -------------------------------------------------------------------------------- /src/locale/es_ES/texttospeech.properties: -------------------------------------------------------------------------------- 1 | currentglucose=Tu glucosa actual es 2 | currenttrend=Está tendiendo 3 | currentdelta=La diferencia desde la última lectura es de 4 | trendnoncomputable=de forma no calculable 5 | trenddoubledown=hacia abajo de forma acentuada 6 | trendsingledown=hacia abajo de forma significativa 7 | trendfortyfivedown=hacia abajo 8 | trendflat=a recto 9 | trendfortyfiveup=hacia arriba 10 | trendsingleup=hacia arriba de forma significativa 11 | trenddoubleup=hacia arriba de forma acentuada 12 | deltanoncomputable=no calculable -------------------------------------------------------------------------------- /src/locale/es_MX/general.properties: -------------------------------------------------------------------------------- 1 | languagecode=es-MX -------------------------------------------------------------------------------- /src/locale/es_MX/texttospeech.properties: -------------------------------------------------------------------------------- 1 | currentglucose=Su glucosa actual es -------------------------------------------------------------------------------- /src/locale/fr_FR/general.properties: -------------------------------------------------------------------------------- 1 | languagecode=fr-FR -------------------------------------------------------------------------------- /src/locale/fr_FR/texttospeech.properties: -------------------------------------------------------------------------------- 1 | currentglucose=La glycémie actuelle est de 2 | currenttrend=La tendance est 3 | currentdelta=La difference entre les 2 lecture est 4 | trendnoncomputable=non computable 5 | trenddoubledown=reduction dramatique 6 | trendsingledown=reduction significative 7 | trendfortyfivedown=reduction 8 | trendflat=plat 9 | trendfortyfiveup=augmentation 10 | trendsingleup=augmentation significative 11 | trenddoubleup=augmentation dramatique 12 | deltanoncomputable=non computable 13 | high=haut 14 | low=basse -------------------------------------------------------------------------------- /src/locale/it_IT/alerttypeview.properties: -------------------------------------------------------------------------------- 1 | sound_names_as_in_assets_no_translation_needed_comma_seperated=../assets/xdripalert.aif,../assets/shorthigh1.mp3,../assets/shorthigh2.mp3,../assets/shorthigh3.mp3,../assets/shorthigh4.mp3,../assets/shortlow1.mp3,../assets/shortlow2.mp3,../assets/shortlow3.mp3,../assets/shortlow4.mp3,../assets/modernalarm.mp3,../assets/modern2.mp3,../assets/spaceship.mp3,../assets/bruteforce.mp3,../assets/betterwakeup.mp3,../assets/alto.mp3,../assets/basso.mp3,../assets/basso55.mp3, 2 | sound_names_as_displayed_can_be_translated_must_match_above_list=xDrip Sound,Short High 1, Short High 2, Short High 3, Short High 4, Short Low 1, Short Low 2, Short Low 3, Short Low 4, Modern Alarm, Modern Alarm 2, Spaceship, Bruteforce, Better Wakeup, alto, basso, basso55 -------------------------------------------------------------------------------- /src/locale/it_IT/general.properties: -------------------------------------------------------------------------------- 1 | languagecode=it-IT -------------------------------------------------------------------------------- /src/locale/it_IT/texttospeech.properties: -------------------------------------------------------------------------------- 1 | currentglucose=Glicemia attuale 2 | currenttrend=Andamento glicemico attuale 3 | currentdelta=Differenza dall'ultimo valore 4 | trendnoncomputable=Andamento glicemico non misurabile 5 | trenddoubledown=Andamento glicemico in forte discesa 6 | trendsingledown=Andamento glicemico in discesa 7 | trendfortyfivedown=Modesta discesa 8 | trendflat=Stabile 9 | trendfortyfiveup=Modesta salita 10 | trendsingleup=Andamento glicemico in salita 11 | trenddoubleup=Andamento glicemico in forte salita 12 | deltanoncomputable=Differenza dall'ultimo valore glicemico non valutabile 13 | high=molto alta 14 | low=molto bassa 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/locale/nl_BE/alarmservice.properties: -------------------------------------------------------------------------------- 1 | low_alert_notification_alert_text=Laag alarm 2 | verylow_alert_notification_alert_text=Zeer laag alarm 3 | high_alert_notification_alert_text=Hoog alarm 4 | veryhigh_alert_notification_alert_text=Zeer hoog alarm 5 | missed_reading_alert_notification_alert=Gemiste meting 6 | phonemuted_alert_notification_alert_text=iPhone stil 7 | batteryLevel_alert_notification_alert_text=Batterij laag 8 | calibration_request_alert_notification_alert_title=Kalibratie nodig 9 | hour=uur 10 | hours=uren 11 | minutes=minuten 12 | day=dag 13 | days=dagen 14 | week=week 15 | snooze_text_low_alert=Laag alarm\n\nKies snooze waarde. 16 | snooze_text_very_low_alert=Zeer laag alarm\n\nKies snooze waarde. 17 | snooze_text_phone_muted_alert=Phone Muted Alert\n\nKies snooze waarde. 18 | snooze_text_high_alert=Hoog alarm\n\nKies snooze waarde. 19 | snooze_text_very_high_alert=Zeer hoog alarm\n\nKies snooze waarde. 20 | snooze_text_missed_reading_alert=Gemiste meting\n\nKies snooze waarde. 21 | snooze_text_battery_alert=Batterij laag\n\nKies snooze waarde. 22 | snooze_text_calibration_alert=Kalibratie alarm\n\nKies snooze waarde. 23 | application_stopped_alert_title=Applicatie alarm 24 | application_stopped_alert_body=xDrip meerdan 5 minuten inactief ! -------------------------------------------------------------------------------- /src/locale/nl_BE/alerttypesview.properties: -------------------------------------------------------------------------------- 1 | alerttype_still_used=Dit type alarm is nog in gebruik. Je kunt het niet verwijderen. 2 | delete_alert_type=Verwijderen mislukt ! 3 | default_alarm_name=Alarm -------------------------------------------------------------------------------- /src/locale/nl_BE/alerttypeview.properties: -------------------------------------------------------------------------------- 1 | enabled=Aan 2 | disabled=Uit 3 | alarmname=Naam 4 | vibrationenabled=Vibratie 5 | snoozefromnotification=Snooze via notificatie 6 | defaultsnoozeperiod=Snooze periode (min) 7 | edit_alert_type=Bewerk Alarm type 8 | soundname=Geluid 9 | alarm_name=Alarm naam 10 | alarm_name_invalid=Ongeldige waarde ! 11 | enter_alarm_name=Geef nieuwe naam 12 | default_snooze=Standaard snooze waarde 13 | default_snooze_text=Snooze periode in minuten, toe te passen indien snooze vanuit Notification Center. 14 | default_snooze_set_failed=Ongeldige waarde ! 15 | sound_name=Geef nieuwe naam voor geluid 16 | enter_sound_name=Een leeg veld betekent geen geluid. 17 | alarm_name_already_exists=er bestaat reeds een alarm met deze naam ! 18 | repeat=Herhaal 19 | sound_names_as_in_assets_no_translation_needed_comma_seperated=../assets/xdripalert.aif,../assets/shorthigh1.mp3,../assets/shorthigh2.mp3,../assets/shorthigh3.mp3,../assets/shorthigh4.mp3,../assets/shortlow1.mp3,../assets/shortlow2.mp3,../assets/shortlow3.mp3,../assets/shortlow4.mp3,../assets/modernalarm.mp3,../assets/modern2.mp3,../assets/spaceship.mp3,../assets/bruteforce.mp3,../assets/betterwakeup.mp3 20 | sound_names_as_displayed_can_be_translated_must_match_above_list=xDrip geluid,Kort Hoog 1, Kort High 2, Kort Hoog 3, Kort Hoog 4, Kort Laag 1, Kort Laag 2, Kort Laag 3, Kort Laag 4, Modern Alarm, Modern Alarm 2, Ruimteschip, Bruteforce, Beter op te staan 21 | default_sound_as_displayed=Default iOS Sound 22 | no_sound=Geen geluid -------------------------------------------------------------------------------- /src/locale/nl_BE/bluetoothservice.properties: -------------------------------------------------------------------------------- 1 | unknownpackettypeinfo=Je xDrip heeft een firmware versie die niet ondersteund wordt door iosxdripreader.\nStuur een e-mail en je zult een link ontvangen met een firmware versie die wel ondersteund is.\n\n(Zorg dat je een e-mail account geconfigureerd hebt in je iOS instellingen) 2 | notnow=Nu niet 3 | dontaskagain=Niet opnieuw vragen 4 | sendemail=Stuur e-mail 5 | cantusesensor=Can't use this sensor as it is 6 | other_G5_app=Er draait een andere G5 appr. 7 | other_G5_app_info=Ergens is er een andere G5 app die probeert connectie te maken met de G5 zender of je hebt onlangs een andere app gebruikt. Sluit elke andere app af, of beter nog, verwijder andere apps die eventueel proberen te connecteren naar je G5 zender. Indien je onlangs een andere app hebt gebruikt, hou dan de xDrip app en wacht. Het kan 15 minuten duren vooraleer de eerste connectie wordt gemaakt. -------------------------------------------------------------------------------- /src/locale/nl_BE/calibrationservice.properties: -------------------------------------------------------------------------------- 1 | enter_calibration=Meet nu je bloedglucose waarde en geef de waarde in. 2 | invalid_value=Ongeldige waarde ! 3 | value_should_be_numeric=Numerieke waarde vereist. 4 | enter_calibration_title=Kalibratie 5 | enter_calibration_title_with_override=Overschrijf kalibratie 6 | can_not_calibrate_right_now=Er kan nu niet gekalibreerd worden omdat er niet genoeg recente metingen zijn. 7 | enter_bg_value_with_override=Nu kalibreren zal de vorige kalibratie overschrijven !\n\nGeef bloedglucose waarde : 8 | value=Value 9 | enter_bg_value_without_override=Geef bloedglucose waarde : 10 | calibration_request_alert=Kalibratie nodig 11 | calibration_request_title=Kalibratie nodig 12 | calibration_request_body=A calibration entered now will GREATLY increase performance 13 | extra_calibration_not_needed_anymore=An extra calibration is not needed anymore 14 | blood_glucose_calibration_value=Meting 15 | latest_reading_is_too_old=Laatst ontvangen meting is meer dan 2 minuten oud, wacht op een nieuwe meting -------------------------------------------------------------------------------- /src/locale/nl_BE/dexcomshareservice.properties: -------------------------------------------------------------------------------- 1 | account_name_not_found=Account niet gevonden 2 | login_error=Dexcom Share Login niet gelukt 3 | invalid_password=Ongeldig paswoord 4 | max_login_attempts_excceded=Maximum aantal login pogingen overschreden. De app zal nu 10 minuten wachten vooraleer opnieuw te proberen. 5 | upload_error=Dexcom Share Upload mislukt 6 | monitored_receiver_sn_doesnotmatch=Dexcom Share Serial Number komt niet overeen met de Serial Number voor deze account. Zie Serial Number na in de instellingen. 7 | credentialtest=Dexcom Login 8 | credentialtest_success=Login gelukt. 9 | dexcom_max_login_attempts_exceeded=Maximum aantal mislukte logoin pogingen bereikt, wacht een paar minuten alvorens opnieuw te proberen. 10 | monitored_receiver_not_assigned_1=Zender met serie nummer of serie nummer 11 | monitored_receiver_not_assigned_2=is niet toegekend aan 12 | monitored_receiver_not_assigned_3=Gebruikt de officiële Dexcom app om de zender (G5) of Share ontvanger (G4) te registreren. 13 | -------------------------------------------------------------------------------- /src/locale/nl_BE/dialogservice.properties: -------------------------------------------------------------------------------- 1 | device_not_paired_dialog_title=Zender niet gekoppeld. 2 | device_not_paired_dialog_body=G5 zender is niet gekoppeld met deze iPhone. Hou de app open op de voorgrond tot je een koppelingsverzoek ontvangt. Dit verzoek komt op tijdstip $time. \n\nHet kan ook 5, 10 .. minuten later zijn.\n\nIndien er geen koppelingsverzoek komt binnen de 15 minuten, sluit en heropen dan de app.\nHet kan ook nodig zijn de G5 zender te verwijderen uit de lijst van Bluetooth apparaten in de iOS Bluetooth instellingen.\n\nOm de app altijd open te houden, ga naar het eerste scherm (home), klik tot het toestel vibreert. Sluit de iPhone niet en klik niet op de iphone home toets. -------------------------------------------------------------------------------- /src/locale/nl_BE/export.properties: -------------------------------------------------------------------------------- 1 | info=Info 2 | now_values_to_export_for_sidiary=Er zijn geen waarden te exporteren -------------------------------------------------------------------------------- /src/locale/nl_BE/fromtimeandvalueelementview.properties: -------------------------------------------------------------------------------- 1 | value=Waarde 2 | from=Vanaf 3 | choose_from_time=Vanaf 4 | first_element_can_not_change_time=Je kunt de "Vanaf" waarde van het eerste alarm niet aanpassen. 5 | change_from_alert_title=Wijzig "Vanaf" 6 | change_value_alert_title=Wijzig Waarde 7 | change_value_alert_message=Alarm waarde 8 | alarmname=Alarm type 9 | alarm_picker_title=Kies 10 | give_info_about_value=Kies een alarm type dat "Aan" is om de waarde te wijzigen. Eventueel moet je eerste een nieuw alarm type definiëren. -------------------------------------------------------------------------------- /src/locale/nl_BE/fromtimeandvaluelistview.properties: -------------------------------------------------------------------------------- 1 | value=Alarm waarde 2 | from=Vanaf 3 | savechanges=Wijzigingen bewaren ? 4 | chose_yes_or_no=Kies ja of nee 5 | fromtimeandvaluelistview_info=Met het + teken kun je periodes definiëren gedurende dewelke je een andere alarm type wilt gebruiken.\nDe laatste rij is geldig tot 23:59 -------------------------------------------------------------------------------- /src/locale/nl_BE/general.properties: -------------------------------------------------------------------------------- 1 | languagecode=nl-BE 2 | back=Terug 3 | cancel=Annuleer 4 | yes=Ja 5 | no=Nee 6 | dont_show_again=Niet opnieuw tonen 7 | ok=Ok -------------------------------------------------------------------------------- /src/locale/nl_BE/nightscoutservice.properties: -------------------------------------------------------------------------------- 1 | nightscout_title=Nightscout test 2 | nightscout_test_result_ok=Nightscout url en api_secret zijn correct getest.\n\nUpload naar Nightscout zal nu automatisch gebeuren. 3 | nightscout_test_result_nok=Nightscout url en api_secret test niet correct uitgevoerd\n\nFoutboodschap = 4 | care_portal_should_be_enabled=careportal moet enabled zijn op je NightScout site omdat de app probeert een treatment aan te maken om je NightScout url en api_secret te testen. 5 | -------------------------------------------------------------------------------- /src/locale/nl_BE/notificationservice.properties: -------------------------------------------------------------------------------- 1 | open=Open 2 | calibrate=Kalibreer 3 | connected=Verbonden 4 | not_connected=Niet Verbonden 5 | device_not_paired_notification_title=Device niet gekoppeld 6 | device_not_paired_body_text_background=Open de xDrip Applicatie. 7 | device_not_paired_body_text_foreground=Accepteer het Bluetooth koppelingsverzoek. 8 | snooze_for_snoozin_alarm_in_notification_screen=Snooze 9 | glucose_patch_read_error_notification_title=Fout 10 | glucose_patch_read_error_body_text=Patch lees fout.. controleer de verbinding en herinitialiseer .. of misschien is de batterij leeg. -------------------------------------------------------------------------------- /src/locale/nl_BE/pickerview.properties: -------------------------------------------------------------------------------- 1 | click_to_close=(Klik om dit scherm te sluiten) -------------------------------------------------------------------------------- /src/locale/nl_BE/settingsview.properties: -------------------------------------------------------------------------------- 1 | title=Instellingen 2 | logging_and_tracing=Logging en Tracing 3 | detailed_tracing=Gedetailleerde Tracing 4 | on=aan 5 | off=uit 6 | send_tracing_via_email=Stuur trace via e-mail 7 | show_nightscout_title=NightScout 8 | url=Url 9 | api_secret=API_SECRET 10 | enter_nightscout_url_title=Geef NightScout Url 11 | enter_nightscout_url_message=Zonder /api/v1. 12 | enter_nightscout_api_secret_title=Geef API_SECRET 13 | enter_nightscout_api_secret_message=Enkel de API_SECRET. 14 | alerts=Alarmen 15 | general_settings=Algemene Instellingen 16 | unit=Bloedglucose eenheid 17 | mgdl=mg/dL 18 | mmol=mmol/L 19 | high_value=Hoge waarde 20 | low_value=Lage waarde 21 | always_on_notification=Metingen in notificatie 22 | versioninfo=Versie Info 23 | version=Versie 24 | ns_logging=NSLog 25 | transmitter_type_settings_title=Zender Type/Follower 26 | low_alert=Laag 27 | very_low_alert=Zeer laag 28 | high_alert=Hoog 29 | very_high_alert=Zeer hoog 30 | missed_reading_alert=Gemiste meting 31 | phone_muted_alert=iPhone stil 32 | calibration_request_alert=Kalibratie 33 | battery_low_alert=Batterij laag 34 | alert_top_text=Wijzig, verwijder of voeg een alarm toe 35 | no_alert=Geen Alarm 36 | alert_types=Alarm Types 37 | alert_types_list_top_text=Wijzig, verwijder of voeg een alarm type toe 38 | edit_low_alert=Wijzig laag alarm 39 | edit_very_low_alert=Wijzig zeer laag alarm 40 | edit_high_alert=Wijzig hoog alarm 41 | edit_very_high_alert=Wijzig zeer hoog alarm 42 | edit_missed_reading_alert=Wijzig gemiste meting alarm 43 | edit_phone_muted_alert=Wijzig iPhone stil alarm 44 | edit_battery_low_alert=Wijzig batterij laag alarm 45 | edit_calibration_request_alert=Wijzig kalibratie alarm 46 | explain_low_alert_list=Het alarm is geldig indien een meting onder de waarde is 47 | explain_very_low_alert_list=Zeer laag alarm wordt gecontroleerd voor laag alarm. Het alarm is geldig indien een meting onder de waarde is. 48 | explain_high_alert=Het alarm is geldig indien een meting boven de waarde is 49 | explain_very_high_alert_list=Zeer hoog alarm wordt gecontroleerd voor hoog alarm. Het alarm is geldig indien een meting boven de waarde is. 50 | explain_missed_reading_alert=Indien geen metingen ontvangen langer dan het aantal minuten, dan is het alarm geldig. 51 | explain_phone_muted_alert=Wanneer controleren of je iPHone op mode stil staat. 52 | explain_battery_low_alert=Indien het niveau van de zender batterij onder de waarde is, dan is het alarm geldig. Default waardes hangen af van zender type. G5 : 300, G4 : 210, Blukon : 5, MiaoMiao : 20. 53 | explain_calibration_request_alert=Hoe dikwijls wil je kalibreren (in uren). 54 | warning=Waarschuwing 55 | warn_and_info_phone_muted=Je zet je iPhone stil gedurende de dag, maar vergeet te unmuten voor je gaat slapen. Dan zul je de alarmen nie thoren. Dit alarm kan je verwittigen dat je iPhone stil staat voor je gaat slapen. 56 | warn_and_info_low_battery=Default waarde voor alarm lage batterij is 300, dit is de waarde voor G5. Voor andere zender types, wijzig de waarde. G4 : 210, Blukon : 5, MiaoMiao : 20. 57 | silent_alert=Stil 58 | store_in_healthkit=Healthkit 59 | high_value_should_be_higher_than_low_value=Hoge waarde moet hoger zijn dan de lage waarde 60 | low_value_should_be_lower_than_high_value=Lage waarde moet lager zijn dan de hoge waarde 61 | transmittertype_picker_title=Zender 62 | show_dexcomshare_title=Dexcom Share 63 | dexcomshareaccountname=Account 64 | dexcomsharepassword=Paswoord 65 | dexcomshareserialnumber=Serial 66 | enter_dexcom_share_account_name_title=Geef Dexcom Share Account naam 67 | enter_dexcom_share_password_title=Geef Dexcom Share paswoord 68 | enter_dexcom_share_serialnumber_title=Geef ontvanger Serial Number 69 | dexcomshareonoff=Dexcom Share 70 | dexcom_us_url=US Share url 71 | dexcom_non_us_url=non US Share url 72 | show_speak_readings_title=Spraak 73 | speakreadingsonoff=Spreek BG waardes 74 | speakreadingsinstructions=ga naar iOS instellingen, algemeen, toegankelijkheid, spraak, stemmen en kies de gewenste stem voor de taal die je hier kiest. 75 | speakreadingsinterval=Interval 76 | enter_speak_readings_interval_title=Geef Interval 77 | enter_speak_readings_interval_message=Spreek om de X metingen 78 | speakreadingstrendonoff=Spreek trend 79 | speakreadingsdeltaonoff=Spreek delta 80 | speakreadingslanguagetitle=Taal 81 | speakreadingslanguagepickertitle=Taal 82 | checkappupdatesonoff=Controleer App Updates 83 | override_mute=Negeer iPhone stil 84 | export=Export 85 | app_inactive_alert=App inactief alarm 86 | vibrate_alert=Vibratie 87 | xdrip_sound_alert=xDrip Alarm 88 | -------------------------------------------------------------------------------- /src/locale/nl_BE/texttospeech.properties: -------------------------------------------------------------------------------- 1 | ttslanguagelistdescription=Chinees,Nederlands,Engels,Frans,Italiaans,Pools,Portugees (Brazil),Portugees (Portugal),Russisch (Russia),Sloveens,Spaans (Mexico),Spaans (Spain) 2 | currentglucose=Huidige bloedglucose waarde is 3 | currenttrend=De waarde evolueert 4 | currentdelta=Verschil met vorige waarde is 5 | trendnoncomputable=niet berekenbaar 6 | trenddoubledown=zeer sterk dalend 7 | trendsingledown=sterk dalend 8 | trendfortyfivedown=dalend 9 | trendflat=gelijkblijvend 10 | trendfortyfiveup=stijgend 11 | trendsingleup=sterk stijgend 12 | trenddoubleup=zeer sterk stijgend 13 | deltanoncomputable=niet berekenbaar 14 | high=hoog 15 | low=laag -------------------------------------------------------------------------------- /src/locale/nl_BE/transmitterservice.properties: -------------------------------------------------------------------------------- 1 | enter_transmitter_id_dialog_title=Zender-ID 2 | enter_transmitter_id=Geef de zender-ID 3 | transmitter_id_should_be_five_chars=ZenderID mag maximaal {max} letters en cijfers bevatten. 4 | set_transmitter_id_in_settings=Ga naar de instellingen om de zender-ID aan te passen. 5 | transmitter_id_settings_title=Zender-ID 6 | blukon_transmitter_id_should_be_five_chars=Zender-ID formaat is BLUxxxxx. 7 | blukon_xxxxx_explanation=xxxxx zijn de laatste 5 cijfers van de identificatie op de Blukon zender. Bijvoorbeeld, stel de identificatie op de Blukon is "BLU1157A00109", dan is je zender-ID "BLU00109". 8 | dead_g5_battery=G5 batterij bijna leeg. 9 | dead_g5_battery_info=Aan vervanging toe.De app zal geen nieuwe metingen aanmaken zolang de zender geen goeie waardes doorstuurt.\n\nOm dit bericht niet meer te zien, wijzig de zender-ID. 10 | bad_placed_g5_transmitter=G5 zender probleem. 11 | bad_placed_g5_transmitter_info=Waarde 0 ontvangen van de G5 zender. Dit kan veroorzaakt zijn door een slecht geplaatste zender, of een probleem met de batterij. -------------------------------------------------------------------------------- /src/locale/pl_PL/general.properties: -------------------------------------------------------------------------------- 1 | languagecode=pl-PL 2 | back=Cofnij 3 | cancel=Anuluj 4 | yes=Tak 5 | no=Nie 6 | dont_show_again=Nie pokazuj więcej 7 | ok=OK -------------------------------------------------------------------------------- /src/locale/pl_PL/texttospeech.properties: -------------------------------------------------------------------------------- 1 | currentglucose= Obecny poziom glukozy we krwi to 2 | currentglucose= Poziom glukozy 3 | currenttrend= Zmiana 4 | currentdelta= Róznica 5 | trendnoncomputable= brak trendu 6 | trenddoubledown= Szybko spada 7 | trendsingledown= Spada 8 | trendfortyfivedown= Wolno spada 9 | trendflat=Bez zmian 10 | trendfortyfiveup=Wolno rośnie 11 | trendsingleup=Rośnie 12 | trenddoubleup= Szybko rośnie 13 | deltanoncomputable= brak danych 14 | high=wysoki 15 | low=niski -------------------------------------------------------------------------------- /src/locale/pt_BR/general.properties: -------------------------------------------------------------------------------- 1 | languagecode=pt-BR -------------------------------------------------------------------------------- /src/locale/pt_BR/texttospeech.properties: -------------------------------------------------------------------------------- 1 | currentglucose=A sua glicose atual é 2 | currenttrend=Está tendendo 3 | trendflat=a reto -------------------------------------------------------------------------------- /src/locale/pt_PT/general.properties: -------------------------------------------------------------------------------- 1 | languagecode=pt-PT -------------------------------------------------------------------------------- /src/locale/pt_PT/texttospeech.properties: -------------------------------------------------------------------------------- 1 | currentglucose=A tua glicose actual é 2 | currenttrend=Está a tender 3 | currentdelta=A diferença desde a última leitura é de 4 | trendnoncomputable=de forma não computável 5 | trenddoubledown=para baixo de forma acentuada 6 | trendsingledown=para baixo de forma significativa 7 | trendfortyfivedown=para baixo 8 | trendflat=a recto 9 | trendfortyfiveup=para cima 10 | trendsingleup=para cima de forma significativa 11 | trenddoubleup=para cirma de forma acentuada 12 | deltanoncomputable=não cumputável -------------------------------------------------------------------------------- /src/locale/ru_RU/general.properties: -------------------------------------------------------------------------------- 1 | languagecode=ru-RU -------------------------------------------------------------------------------- /src/locale/ru_RU/texttospeech.properties: -------------------------------------------------------------------------------- 1 | currentglucose=Текущий уровень сахара 2 | currenttrend=Тенденция 3 | currentdelta=Разница с предыдущим показанием 4 | trendnoncomputable=невычислима 5 | trenddoubledown=к резкому снижению 6 | trendsingledown=к значительному снижению 7 | trendfortyfivedown=к снижению 8 | trendflat=без изменений 9 | trendfortyfiveup=к повышению 10 | trendsingleup=к значительному повышению 11 | trenddoubleup=к резкому повышению 12 | deltanoncomputable=невычислима -------------------------------------------------------------------------------- /src/locale/sl_SL/alarmservice.properties: -------------------------------------------------------------------------------- 1 | low_alert_notification_alert_text=Nizko opozorilo 2 | verylow_alert_notification_alert_text=Zelo nizko opozorilo 3 | high_alert_notification_alert_text=Visoko opozorilo 4 | veryhigh_alert_notification_alert_text=Zelo visoko opozorilo 5 | missed_reading_alert_notification_alert=Izpuščena meritev 6 | phonemuted_alert_notification_alert_text=Telefon utišan 7 | batteryLevel_alert_notification_alert_text=Baterija skoraj prazna 8 | calibration_request_alert_notification_alert_title=Potrebna kalibracija 9 | hour=ura 10 | hours=ure 11 | minutes=minute 12 | day=dan 13 | days=dnevi 14 | week=teden 15 | snooze_text_low_alert=Nizko opozorilo\n\nIzberite vrednost dremeža. 16 | snooze_text_very_low_alert=Zelo nizko opozorilo\n\nIzberite vrednost dremeža. 17 | snooze_text_phone_muted_alert=Opozorilo na utišan telefon\n\nIzberite vrednost dremeža. 18 | snooze_text_high_alert=Visoko opozorilo\n\nIzberite vrednost dremeža. 19 | snooze_text_very_high_alert=Zelo visoko opozorilo\n\nIzberite vrednost dremeža. 20 | snooze_text_missed_reading_alert=Opozorilo na izpuščeno meritev\n\nIzberite vrednost dremeža. 21 | snooze_text_battery_alert=Opozorilo na skoraj prazno baterijo\n\nIzberite vrednost dremeža. 22 | snooze_text_calibration_alert=Opozorilo na zahtevek za kalibracijo\n\nIzberite vrednost dremeža. 23 | application_stopped_alert_title=Opozorilo aplikacije 24 | application_stopped_alert_body=Aplikacija xDrip je neaktivna že več kot 5 minut! 25 | -------------------------------------------------------------------------------- /src/locale/sl_SL/alerttypesview.properties: -------------------------------------------------------------------------------- 1 | alerttype_still_used=Ta vrsta opozorila je še v uporabi. Ne morete je pobrisati. 2 | delete_alert_type=Brisanje vrste opozorila ni uspelo! 3 | default_alarm_name=Opozorilo 4 | -------------------------------------------------------------------------------- /src/locale/sl_SL/alerttypeview.properties: -------------------------------------------------------------------------------- 1 | enabled=Omogočeno 2 | disabled=Onemogočeno 3 | alarmname=Ime 4 | vibrationenabled=Omogočeno vibriranje 5 | snoozefromnotification=Dremež od obvestil 6 | defaultsnoozeperiod=Obdobje dremeža (min) 7 | edit_alert_type=Uredi vrsto opozorila 8 | soundname=Zvok 9 | alarm_name=Ime opozorila 10 | alarm_name_invalid=Neveljavna vrednost! 11 | enter_alarm_name=Vnesite novo ime opozorila 12 | default_snooze=Privzeto obdobje dremeža 13 | default_snooze_text=Obdobje dremeža v minutah, ki bo uporabljeno, če bo dremež aktiviran iz centra za obvestila. 14 | default_snooze_set_failed=Neveljavna vrednost! 15 | sound_name=Navedite novo ime zvoka 16 | enter_sound_name=Prazno polje pomeni brez zvoka. 17 | alarm_name_already_exists=Opozorilo s tem imenom že obstaja! 18 | repeat=Ponovi 19 | sound_names_as_in_assets_no_translation_needed_comma_seperated=../assets/xdripalert.aif,../assets/shorthigh1.mp3,../assets/shorthigh2.mp3,../assets/shorthigh3.mp3,../assets/shorthigh4.mp3,../assets/shortlow1.mp3,../assets/shortlow2.mp3,../assets/shortlow3.mp3,../assets/shortlow4.mp3,../assets/modernalarm.mp3,../assets/modern2.mp3,../assets/spaceship.mp3,../assets/bruteforce.mp3,../assets/betterwakeup.mp3 20 | sound_names_as_displayed_can_be_translated_must_match_above_list=Zvok xDrip, Kratek visok 1, Kratek visok 2, Kratek visok 3, Kratek visok 4, Kratek nizek 1, Kratek nizek 2, Kratek nizek 3, Kratek nizek 4, Sodoben alarm, Sodoben alarm 2, Vesoljska ladja, Groba sila, Rajši se prebudi 21 | default_sound_as_displayed=Privzeti zvok iOS 22 | no_sound=Brez zvoka 23 | -------------------------------------------------------------------------------- /src/locale/sl_SL/bluetoothservice.properties: -------------------------------------------------------------------------------- 1 | unknownpackettypeinfo=Zdi se, da ima vaš xdrip verzijo strojne programske opreme, ki je iosxdripreader ne podpira.\nPošljite e-pošto in prejeli boste povezavo na verzijo, za katero je na voljo podpora.\n\n(Prepričajte se, da je na vašem iPhonu nastavljen domači e-naslov) 2 | notnow=Ne zdaj 3 | dontaskagain=Ne sprašuj več 4 | sendemail=Pošlji e-sporočilo 5 | cantusesensor=Senzorja ni mogoče uporabiti v trenutnem stanju 6 | other_G5_app=Teče druga aplikacija G5 7 | other_G5_app_info=Videti je, da se neka druga aplikacija poskuša povezati z oddajnikom G5, ali pa ste pred kratkim uporabili drugo aplikacijo. Zaprite morebitne druge aplikacije, ali še več, pobrišite druge aplikacije, ki bi se morda poskušale povezati z vašim oddajnikom. Če ste pred kratkim uporabljali drugo aplikacijo, pustite, da xDrip teče, in počakajte. Lahko traja 15 minut, da se poveže. 8 | -------------------------------------------------------------------------------- /src/locale/sl_SL/calibrationservice.properties: -------------------------------------------------------------------------------- 1 | enter_calibration=Zdaj izmerite glukozo v svoji krvi in vnesite vrednost. 2 | invalid_value=Neveljavna vrednost! 3 | value_should_be_numeric=Vrednost mora biti numerična. 4 | enter_calibration_title=Kalibracija 5 | enter_calibration_title_with_override=Preglasi kalibracijo 6 | can_not_calibrate_right_now=Trenutno kalibracija ni mogoča. ker ni dovolj novih meritev. 7 | enter_bg_value_with_override=Če kalibrirate zdaj, bo to preglasilo prejšnjo kalibracijo!\n\nVnesite vrednost glukoze v krvi: 8 | value=Vrednost 9 | enter_bg_value_without_override=Vnesite vrednost glukoze v krvi: 10 | calibration_request_alert=Potrebna kalibracija 11 | calibration_request_title=Potrebna kalibracija 12 | calibration_request_body=Kalibracija, ki jo boste vnesli zdaj, bo OBČUTNO izboljšala delovanje 13 | extra_calibration_not_needed_anymore=Dodatna kalibracija ni več potrebna 14 | blood_glucose_calibration_value=Meritev 15 | latest_reading_is_too_old=Zadnja meritev, prejeta od oddajnika, je starejša od 2 minut; počakajte na novo meritev 16 | -------------------------------------------------------------------------------- /src/locale/sl_SL/dexcomshareservice.properties: -------------------------------------------------------------------------------- 1 | account_name_not_found=Ne najdem imena računa 2 | login_error=Prijava v Dexcom Share ni uspela 3 | invalid_password=Neveljavno geslo 4 | max_login_attempts_excceded=Maksimalno število poskusov prijave preseženo. Počakajte 10 minut, preden se poskusite ponovno prijaviti. 5 | upload_error=Napaka pri prenosu na Dexcom Share 6 | monitored_receiver_sn_doesnotmatch=Serijska številka Dexcom Share se ne ujema s serijsko številko za ta račun. Preverite serijsko številko v nastavitvah. 7 | credentialtest=Prijava Dexcom 8 | credentialtest_success=Prijava uspešna. 9 | dexcom_max_login_attempts_exceeded=Doseženo maksimalno število neuspešnih poskusov prijave, počakajte nekaj minut, preden poskusite znova. 10 | monitored_receiver_not_assigned_1=Zdi se, da ID oddajnika ali serijska številka 11 | monitored_receiver_not_assigned_2=ni dodeljen(a) 12 | monitored_receiver_not_assigned_3=Uporabite uradno aplikacijo Dexcom za registracijo oddajnika (G5) ali sprejemnika Share (G4) 13 | 14 | -------------------------------------------------------------------------------- /src/locale/sl_SL/dialogservice.properties: -------------------------------------------------------------------------------- 1 | device_not_paired_dialog_title=Naprava ni seznanjena. 2 | device_not_paired_dialog_body=Oddajnik G5 ni seznanjen s to napravo iOS. Aplikacijo imejte odprto v ospredju, dokler ne prejmete zahtevka za seznanjanje Bluetooth. Ta zahtevek bo prispel ob $time. \n\nLahko je tudi 5, 10 ... minut kasneje.\n\nČe ne prejmete zahtevka za seznanitev Bluetoothv 15 minutah, zaprite aplikacijo xDrip in jo ponovno odprite.\nMorda bo potrebno tudi odstraniti oddajnik Dexcom s seznama seznanjenih naprav v nastavitvah Bluetooth.\n\nDa bo aplikacija ves čas odprta, pojdite na domači zaslon aplikacije in pritiskajte dolgo 1 sekundo, dokler telefon ne zavibrira. Ne zaklepajte telefona in ne pritiskajte gumba Domov. 3 | -------------------------------------------------------------------------------- /src/locale/sl_SL/export.properties: -------------------------------------------------------------------------------- 1 | info=Info 2 | now_values_to_export_for_sidiary=Ni novih vrednosti za izvoz. 3 | -------------------------------------------------------------------------------- /src/locale/sl_SL/fromtimeandvalueelementview.properties: -------------------------------------------------------------------------------- 1 | value=Vrednost 2 | from=Od 3 | choose_from_time=Od 4 | first_element_can_not_change_time=Ne morete spremeniti časa od za prvo opozorilo 5 | change_from_alert_title=Spremeni od 6 | change_value_alert_title=Spremeni vrednost 7 | change_value_alert_message=Opozorilo na vrednost 8 | alarmname=Vrsta opozorila 9 | alarm_picker_title=Izberite 10 | give_info_about_value=Izberite vrsto opozorila, ki je aktivna, če želite spremeniti vrednost. Lahko da boste morali najprej definirati novo vrsto opozorila. 11 | -------------------------------------------------------------------------------- /src/locale/sl_SL/fromtimeandvaluelistview.properties: -------------------------------------------------------------------------------- 1 | value=Vrednost opozorila 2 | from=Od 3 | savechanges=Shrani spremembe? 4 | chose_yes_or_no=Izberite Da ali Ne 5 | fromtimeandvaluelistview_info=Z uporabo znaka + lahko dodate obdobja, v katerih želite uporabljati drugo vrednost in/ali drugo vrsto opozoril.\nZadnja vrsta velja do 23:59 6 | -------------------------------------------------------------------------------- /src/locale/sl_SL/general.properties: -------------------------------------------------------------------------------- 1 | back=Nazaj 2 | cancel=Prekliči 3 | yes=Da 4 | no=Ne 5 | dont_show_again=Ne prikaži ponovno 6 | ok=OK 7 | languagecode=sl-SL 8 | -------------------------------------------------------------------------------- /src/locale/sl_SL/nightscoutservice.properties: -------------------------------------------------------------------------------- 1 | nightscout_title=Test Nightscout 2 | nightscout_test_result_ok=Nightscout url in api_secret uspešno testirana.\n\nPrenos na Nightscout bo zdaj potekal samodejno. 3 | nightscout_test_result_nok=Nightscout url in api_secret test neuspešnja.\n\nSporočilo o napaki= 4 | care_portal_should_be_enabled=Careportal mora biti omogočen na vaši spletni strani, ker aplikacija skuša kreirati učno terapijo za testiranje NightScout url in api_secret. 5 | -------------------------------------------------------------------------------- /src/locale/sl_SL/notificationservice.properties: -------------------------------------------------------------------------------- 1 | open=Odpri 2 | calibrate=Kalibriraj 3 | connected=Povezan 4 | not_connected=Ni povezan 5 | airdevice_not_paired_notification_title=Naprava ni seznanjena 6 | device_not_paired_body_text_background=Odprite aplikacijo xDrip. 7 | device_not_paired_body_text_foreground=Sprejmite zahtevo za seznanjanje Bluetooth. 8 | snooze_for_snoozin_alarm_in_notification_screen=Dremež 9 | glucose_patch_read_error_notification_title=Napaka 10 | glucose_patch_read_error_body_text=Napaka branja obliža .. preverite povezavo in ponovno zaženite ... morda pa je baterija prazna. 11 | -------------------------------------------------------------------------------- /src/locale/sl_SL/pickerview.properties: -------------------------------------------------------------------------------- 1 | click_to_close=(Kliknite, da zaprete ta pogled) 2 | -------------------------------------------------------------------------------- /src/locale/sl_SL/settingsview.properties: -------------------------------------------------------------------------------- 1 | title=Prednostne nastavitve 2 | logging_and_tracing=Beleženje in sledenje 3 | detailed_tracing=Podrobno sledenje 4 | on=vklop 5 | off=izklop 6 | send_tracing_via_email=Pošlji sledenje po e-pošti 7 | show_nightscout_title=NightScout 8 | url=Url 9 | api_secret=API_SECRET 10 | enter_nightscout_url_title=Vnesi url za NightScout 11 | enter_nightscout_url_message=Brez /api/v1. 12 | enter_nightscout_api_secret_title=Vnesi API_SECRET 13 | enter_nightscout_api_secret_message=To je samo API_SECRET. 14 | alerts=Opozorila 15 | general_settings=Splošne nastavitve 16 | unit=Enota Bg 17 | mgdl=mgdl 18 | mmol=mmol 19 | high_value=Zgornja vrednost 20 | low_value=Spodnja vrednost 21 | always_on_notification=Meritve v obvestilih 22 | versioninfo=Informacija o različici 23 | version=Različica 24 | ns_logging=NSLog 25 | transmitter_type_settings_title=Oddajnik tip/privrženec 26 | low_alert=Nizko 27 | very_low_alert=Zelo nizko 28 | high_alert=Visoko 29 | very_high_alert=Zelo visoko 30 | missed_reading_alert=Izpuščena meritev 31 | phone_muted_alert=Telefon utišan 32 | calibration_request_alert=Kalibracija 33 | battery_low_alert=Baterija skoraj prazna 34 | alert_top_text=Dodaj, spremeni ali zbriši opozorilo 35 | no_alert=Brez opozorila 36 | alert_types=Vrste opozoril 37 | alert_types_list_top_text=Dodaj spremeni ali zbriši vrste opozoril 38 | edit_low_alert=Uredi opozorilo za nizko 39 | edit_very_low_alert=Uredi opozorilo za zelo nizko 40 | edit_high_alert=Uredi opozorilo za visoko 41 | edit_very_high_alert=Uredi opozorilo za zelo visoko 42 | edit_missed_reading_alert=Uredi opozorilo za izpuščeno meritev 43 | edit_phone_muted_alert=Uredi opozorilo za utišan telefon 44 | edit_battery_low_alert=Uredi opozorilo za skoraj prazno baterijo 45 | edit_calibration_request_alert=Uredi opozorilo za zahtevo po kalibraciji 46 | explain_low_alert_list=Če je meritev pod vrednostjo, bo aktivirano opozorilo. 47 | explain_very_low_alert_list=Vrednost pri opozorilu za zelo nizko vrednost se preveri pred vrednostjo opozorila za nizko vrednost; če je katera od meritev pod vrednostjo, se aktivira opozorilo. 48 | explain_high_alert=Če je katera od meritev nad vrednostjo, se aktivira opozorilo. 49 | explain_very_high_alert_list=Vrednost pri opozorilu za zelo visoko vrednost se preveri pred vrednostjo opozorila za visoko vrednost; če je katera od meritev nad vrednostjo, se aktivira opozorilo. 50 | explain_missed_reading_alert=Če dlje kot določeno število minut ni prejeta noben meritev, se aktivira opozorilo. 51 | explain_phone_muted_alert=Kdaj preverite, ali je vaš telefon utišan. 52 | explain_battery_low_alert=Če je napolnjenost baterije pod definirano vrednostjo, se bo aktiviralo opozorilo. Privzete vrednosti so odvisne od vrste oddajnika. G5 : 300, G4 : 210, Blukon : 5. 53 | explain_calibration_request_alert=Kako pogosto želite kalibrirati (v urah). 54 | warning=Pozor 55 | warn_and_info_phone_muted=Telefon utišate v teku dneva, nato pa ga pozabite spet nastaviti na normalno delovanje, ko greste spat. V tem primeru opozoril ne boste slišali. Opozorilo, da je telefon utišan, vas lahko pred spanjem opozori, da telefon nastavite na normalno delovanje. 56 | warn_and_info_low_battery=Privzeto opozorilo za prazno baterijo je nastavljeno na 300, kar je privzeta vrednost za G5. Za druge vrste oddajnikov spremenite vrednost. G4 : 210, Blukon : 5. 57 | silent_alert=Tiho 58 | store_in_healthkit=Medicinski komplet 59 | high_value_should_be_higher_than_low_value=Zgornja vrednost mora biti višja od spodnje vrednosti 60 | low_value_should_be_lower_than_high_value=Spodnja vrednost mora biti nižja od zgornje vrednosti 61 | transmittertype_picker_title=Oddajnik 62 | show_dexcomshare_title=Dexcom Share 63 | dexcomshareaccountname=Račun 64 | dexcomsharepassword=Geslo 65 | dexcomshareserialnumber=Serijska številka 66 | enter_dexcom_share_account_name_title=Vnesite ime računa Dexcom Share 67 | enter_dexcom_share_password_title=Vnesite geslo Dexcom Share 68 | enter_dexcom_share_serialnumber_title=Vnesite serijsko številko sprejemnika 69 | dexcomshareonoff=Dexcom Share 70 | dexcom_us_url=ZDA Share url 71 | dexcom_non_us_url=Share url izven ZDA 72 | show_speak_readings_title=Govor 73 | speakreadingsonoff=Glasovno sporočanje vrednosti GK 74 | speakreadingsinstructions=Za pravilno delovanje te funkcije spremenite glas, ki bo podajal vrednosti, v nastavitvah iOS, splošno, dostopnost, govor, glasovi, in izberite želeni glas za točno isti jezik in državo, ki ste ju izbrali tukaj. 75 | speakreadingsinterval=Interval 76 | enter_speak_readings_interval_title=Vnesite Interval 77 | enter_speak_readings_interval_message=Izgovori vsakih X meritev 78 | speakreadingstrendonoff=Izgovori trend GK 79 | speakreadingsdeltaonoff=Izgovori delta GK 80 | speakreadingslanguagetitle=Jezik 81 | speakreadingslanguagepickertitle=Jezik 82 | checkappupdatesonoff=Preveri posodobitve aplikacije 83 | override_mute=Preglasi utišanje 84 | export=Izvoz 85 | app_inactive_alert=Opozorilo na neaktivnost aplikacije 86 | -------------------------------------------------------------------------------- /src/locale/sl_SL/texttospeech.properties: -------------------------------------------------------------------------------- 1 | ttslanguagelistdescription=kitajsko,nizozemsko,angleško,francosko,italijansko,poljsko,portugalsko (Brazilija),portugalsko (Portugalska),rusko (Rusija), Slovenian,špansko (Mehika),špansko (Španija) 2 | currentglucose=Trenutna vrednost glukoze v krvi je 3 | currenttrend=Trend 4 | currentdelta=Razlika od zadnjega merjenja 5 | trendnoncomputable=ni mogoče izračunati 6 | trenddoubledown=dramatično navzdol 7 | trendsingledown=občutno navzdol 8 | trendfortyfivedown=navzdol 9 | trendflat=enakomerno 10 | trendfortyfiveup=navzgor 11 | trendsingleup=občutno navzgor 12 | trenddoubleup=dramatično navzgor 13 | deltanoncomputable=ni mogoče izračunati 14 | high=visoka 15 | low=nizka 16 | -------------------------------------------------------------------------------- /src/locale/sl_SL/transmitterservice.properties: -------------------------------------------------------------------------------- 1 | enter_transmitter_id_dialog_title=ID oddajnika 2 | enter_transmitter_id=Vnesi ID oddajnika 3 | transmitter_id_should_be_five_chars=ID oddajnika mora imeti {max} črk in številk. 4 | set_transmitter_id_in_settings=Pojdi na Nastavitve za spremembo ID oddajnika. 5 | transmitter_id_settings_title=ID oddajnika 6 | blukon_transmitter_id_should_be_five_chars=ID oddajnika mora imeti format BLUxxxxx. 7 | blukon_xxxxx_explanation=xxxxx je zadnjih 5 številk identifikatorja na napravi BluKon. Primer: če je številka na napravi "BLU1157A00109", mora biti ID vašega oddajnika "BLU00109". 8 | dead_g5_battery=Baterija G5 je skoraj prazna. 9 | dead_g5_battery_info=Čas je za zamenjavo. Aplikacija ne bo kreirala novih meritev, dokler oddajnik ne bo pošiljal ustreznih vrednosti.\n\nTo sporočilo lahko odpravite tako, da spremenite ID oddajnika. 10 | bad_placed_g5_transmitter=Problem z oddajnikom G5. 11 | bad_placed_g5_transmitter_info=Od oddajnika G5 prejeta vrednost 0. Vzrok za to je lahko slabo nameščen oddajnik ali problem z baterijo G5. 12 | -------------------------------------------------------------------------------- /src/locale/zh_CN/alarmservice.properties: -------------------------------------------------------------------------------- 1 | low_alert_notification_alert_text=警告 血糖数据偏低 2 | verylow_alert_notification_alert_text=警告 血糖数据过低 3 | high_alert_notification_alert_text=警告 血糖数据偏高 4 | veryhigh_alert_notification_alert_text=警告 血糖数据过高 5 | missed_reading_alert_notification_alert=警告 有警告信息未查看 6 | phonemuted_alert_notification_alert_text=警告 手机静音 7 | batteryLevel_alert_notification_alert_text=警告 电池电量低 8 | calibration_request_alert_notification_alert_title=警告 需要校准 9 | hour=小时 10 | hours=小时 11 | minutes=分钟 12 | day=天 13 | week=周 14 | snooze_text_low_alert=偏低警告\n\n选择提示音等级. 15 | snooze_text_very_low_alert=过低警告\n\n选择提示音等级. 16 | snooze_text_phone_muted_alert=手机静音警告\n\n选择提示音等级. 17 | snooze_text_high_alert=偏高警告\n\n选择提示音等级. 18 | snooze_text_very_high_alert=过高警告\n\n选择提示音等级. 19 | snooze_text_missed_reading_alert=未查看警告信息\n\n选择提示音等级. 20 | snooze_text_battery_alert=电池电量低警告\n\n选择提示音等级. 21 | snooze_text_calibration_alert=需要校准警告\n\n选择提示音等级. 22 | -------------------------------------------------------------------------------- /src/locale/zh_CN/alerttypesview.properties: -------------------------------------------------------------------------------- 1 | alerttype_still_used=当前警告类型使用中. 无法进行删除操作. 2 | delete_alert_type=删除警告类型失败! 3 | default_alarm_name=警告 4 | -------------------------------------------------------------------------------- /src/locale/zh_CN/alerttypeview.properties: -------------------------------------------------------------------------------- 1 | enabled=开启 2 | disabled=关闭 3 | alarmname=警告名称 4 | vibrationenabled=震动开启 5 | snoozefromnotification=懒人闹钟 6 | defaultsnoozeperiod=懒人闹钟周期 (分钟) 7 | edit_alert_type=编辑警告类型 8 | soundname=声音 9 | alarm_name=警告名称 10 | alarm_name_invalid=无效数值! 11 | enter_alarm_name=设置新警告名称 12 | default_snooze=默认懒人闹钟 13 | default_snooze_text=懒人闹钟周期, 将会在消息中心再次提醒您. 14 | default_snooze_set_failed=无效数值 ! 15 | sound_name=设置新铃声名称 16 | enter_sound_name=留空默认没有铃声. 17 | alarm_name_already_exists=警告名称已存在,请更改 ! 18 | repeat=重复 19 | sound_names_as_in_assets_no_translation_needed_comma_seperated=../assets/xdripalert.aif,../assets/shorthigh1.mp3,../assets/shorthigh2.mp3,../assets/shorthigh3.mp3,../assets/shorthigh4.mp3,../assets/shortlow1.mp3,../assets/shortlow2.mp3,../assets/shortlow3.mp3,../assets/shortlow4.mp3,../assets/modernalarm.mp3,../assets/modern2.mp3,../assets/spaceship.mp3,../assets/bruteforce.mp3,../assets/betterwakeup.mp3 20 | sound_names_as_displayed_can_be_translated_must_match_above_list=xDrip Sound,Short High 1, Short High 2, Short High 3, Short High 4, Short Low 1, Short Low 2, Short Low 3, Short Low 4, Modern Alarm, Modern Alarm 2, Spaceship, Bruteforce, Better Wakeup 21 | default_sound_as_displayed=默认 iOS 铃声 22 | no_sound=无声音 23 | -------------------------------------------------------------------------------- /src/locale/zh_CN/bluetoothservice.properties: -------------------------------------------------------------------------------- 1 | unknownpackettypeinfo=您的xdrip似乎有一个iosxdripreader不支持的固件版本.\n发送电子邮件,您将收到一个支持该版本的链接.\n\n(请确保您的iPhone上配置了该电子邮件帐户) 2 | notnow=现在不操作 3 | dontaskagain=不再提醒 4 | sendemail=发送 e-mail 5 | cantusesensor=不能使用这个传感器 6 | -------------------------------------------------------------------------------- /src/locale/zh_CN/calibrationservice.properties: -------------------------------------------------------------------------------- 1 | enter_calibration=现在测量您的血糖水平并输入数值. 2 | invalid_value=无效数据 ! 3 | value_should_be_numeric=请输入数字. 4 | enter_calibration_title=校准 5 | enter_calibration_title_with_override=覆盖校准 6 | can_not_calibrate_right_now=由于近期读取数据不足,现在无法进行校准. 7 | enter_bg_value_with_override=当前校准将会覆盖之前的校准 !\n\n请输入血糖数值 : 8 | value=数值 9 | enter_bg_value_without_override=输入血糖值 : 10 | calibration_request_alert=需要校准 11 | calibration_request_title=需要校准 12 | calibration_request_body=现在输入的校准将极大地提高性能 13 | extra_calibration_not_needed_anymore=现在不需要进行任何额外校准 14 | blood_glucose_calibration_value=正在读取 15 | latest_reading_is_too_old=最后获取的数据已超过2分钟, 请等待最新读取数据 16 | -------------------------------------------------------------------------------- /src/locale/zh_CN/dexcomshareservice.properties: -------------------------------------------------------------------------------- 1 | account_name_not_found=用户名未找到 2 | login_error=Dexcom 分享登录失败 3 | invalid_password=无效密码 4 | max_login_attempts_excceded=尝试登录错误过多. 请十分钟后再次尝试登录. 5 | upload_error=Dexcom 分享上传失败 6 | monitored_receiver_sn_doesnotmatch=Dexcom 分享账户的SN与您的SN不匹配. 请在设置中检查SN. 7 | credentialtest=Dexcom 登录 8 | credentialtest_success=登录成功. 9 | dexcom_max_login_attempts_exceeded=错误登录过多, 请稍候再试. 10 | monitored_receiver_not_assigned_1=看起来是传感器ID或者SN 11 | monitored_receiver_not_assigned_2=未分配 12 | monitored_receiver_not_assigned_3=请使用官方 Dexcom 程序注册传感器 (G5) 或者分享接收器 (G4) 13 | -------------------------------------------------------------------------------- /src/locale/zh_CN/dialogservice.properties: -------------------------------------------------------------------------------- 1 | device_not_paired_dialog_title=设备未配对. 2 | device_not_paired_dialog_body=G5 未与当前iOS设备配对. 收到配对请求前请确保App位于前台运行. 请求将会在 $time 内进行. \n\n有可能为 5, 10 .. 分钟以后.\n\n 如果超过15分钟未收到配对请求, 请关闭并重新打开xDrip程序.\n 请务必将Dexcom传感器从iOS设备蓝牙配对列表中删除.\n\n为了保持保持软件常开, 请跳转到软件主界面, 长按一秒钟 直到手机震动. 同时不要锁定手机或触控HOME键. 3 | -------------------------------------------------------------------------------- /src/locale/zh_CN/fromtimeandvalueelementview.properties: -------------------------------------------------------------------------------- 1 | value=数据 2 | from=开始于 3 | choose_from_time=开始于 4 | first_element_can_not_change_time=您无法更改第一次警告的时间 5 | change_from_alert_title=更改开始时间 6 | change_value_alert_title=更改数值 7 | change_value_alert_message=警告数值 8 | alarmname=警告类型 9 | alarm_picker_title=选择 10 | give_info_about_value=如果要更改值,请选择已启用的警告类型. 您可能必须先定义一个新的警告类型. 11 | -------------------------------------------------------------------------------- /src/locale/zh_CN/fromtimeandvaluelistview.properties: -------------------------------------------------------------------------------- 1 | value=警告数值 2 | from=开始于 3 | savechanges=保存修改 ? 4 | chose_yes_or_no=选择 是 或者 否 5 | fromtimeandvaluelistview_info=使用 + 号图标 可以切换到你想设置的数据或警告类型.\n 最后有效时间为 23:59 6 | -------------------------------------------------------------------------------- /src/locale/zh_CN/general.properties: -------------------------------------------------------------------------------- 1 | back=返回 2 | cancel=取消 3 | yes=是 4 | no=否 5 | dont_show_again=不再显示 6 | ok=确认 7 | languagecode=zh-CN -------------------------------------------------------------------------------- /src/locale/zh_CN/homeview.properties: -------------------------------------------------------------------------------- 1 | singalmissed=信号丢失 -- 未使用, 请查看 HomeView.mxml 中关于 notificationtext 的注释 2 | scan_for_device=扫描蓝牙设备 3 | forget_device=忘记蓝牙设备 4 | view_device_status=状态 5 | start_sensor=开始检测 6 | start_sensor_title_get_date=日期 \n 7 | start_sensor_title_get_time=时间 \n 8 | stop_sensor=停止检测 9 | connect_now=现在连接 10 | scanning_failed_tile=设备扫描结果 11 | scanning_started_message=正在扫描蓝牙设备 12 | scanning_failed=未发现蓝牙设备 13 | with_name= 名称 14 | bluetooth_not_switched_on=未打开蓝牙功能.\n\n请在设置中开启蓝牙功能后返回.\n\n不要在蓝牙设置中连接设备. 请在xDrip中扫描连接传感器设备. 15 | explain_expected_device_name=应用程序已将此设备的地址存储在数据库中,并且只会连接到该设备.\n如果您想连接新设备, 请先进行 "忘记蓝牙设备" 操作 16 | dont_start_with_time_in_future=请不要尝试点击开始检测.\n\n传感器未工作, 请稍候再试. 17 | sensor_started_wait_needed_1=传感器已启动. 但您需要继续等待到 18 | sensor_started_wait_needed_2=在开始校准前.\n\n您务必了解校准需进行两次. 每次成功读取并接收到数据您都会收到一次提示,这样才代表一次校准成功完成,该操作需要进行两次. 这个操作可能会花费您10分钟时间. 请务必在十分钟内进行两次数据读取接收操作.\n\n\n这期间请确保传感器正常, 校准完成后您将会收到一个提示. 19 | timestamppattern_for_sensor_start_warning=HH:mm 20 | sensor_started_no_wait_needed=探测开始.校准分两步进行. 每次成功读取并接收到数据您都会收到一次提示,这样才代表一个步骤成功完成,该操作需要进行两次. 这个操作可能会花费您10分钟时间. 请务必在十分钟内进行两次数据读取接收操作.\n\n\n这期间请确保传感器正常, 校准完成后您将会收到一个提示. 21 | stop_sensor_ask_confirmation=确定停止探测吗 ? 一旦开始不能撤销操作. 22 | connected_to_peripheral_device_id_stored=连接蓝牙设备后,会将此设备的地址存储在数据库中,并且只会连接到该设备.\n如果您想连接新设备, 请先进行 "忘记蓝牙设备" 操作 23 | info=信息 24 | info_screen_1=主屏幕右上角的按钮是操作按钮.蓝牙按钮允许您扫描设备, 忘记设备, 启动或者停止传感器, 获取传感器基础信息. (for MiaoMiao the sensor is automatically started). 25 | info_screen_2=主屏幕右上角的按钮是操作按钮,用来校准以及启动停止探测.\n\n 如果你的iOS设备尚未与传感器配对, 收到蓝牙配对请求前请一直打开软件.\n\n注意 : 请关闭官方 Dexcom 程序 ! G5传感器只能连接一个软件 ! 26 | info_screen_blukon=主屏幕右上角的按钮是操作按钮,用来校准以及启动停止探测.\n\n 如果你的iOS设备尚未与传感器配对, 收到蓝牙配对请求前请一直打开软件.\n\n注意 : 请关闭官方 BLUKON 程序 ! BLUKON传感器只能连接一个软件 ! 27 | info_screen_2_start_sensor=现在使用Action按键开始检测数据. 28 | start_sensor_warning_correct_timing=下一个窗口中, 你需要设定传感器启用时间. 注意 请务必设定最为准确的时间.该设置对传感器精度有影响. 29 | minuteago=分钟以前 30 | minutesago=分钟以前 31 | status_title=状态信息 32 | status_info_sensor_start=传感器开始于 33 | status_info_sensor_not_started=(未开始) 34 | status_info_device_name=设备名称 35 | status_info_transmitter_battery_level=传感器电池电量 36 | unknown=未知 37 | datetimepatternforstatusinfo=dd MMM HH:mm 38 | licenseinfo=该软件是基于 GNU General Public 许可发行的免费软件, 或 V3 版本许可, 以及以后的版本都将基于该许可 .\n编写软件的初衷只是帮助大家, 本人不承担任何责任,使用方自己负责. 或者访问 http://www.gnu.org/licenses/gpl.txt 查看更多细节\n\n联系方式 : xdrip@proximus.be 39 | home_view_transmitter_status_info_G5_title=传感器 : 40 | home_view_transmitter_status_info_G5_VOLTAGEA=VoltageA 41 | home_view_transmitter_status_info_G5_VOLTAGEB=VoltageB 42 | home_view_transmitter_status_info_G5_RESIST=Resistance 43 | home_view_transmitter_status_info_G5_TEMPERATURE=温度 44 | home_view_transmitter_status_info_G5_RUNTIME=运行时间 45 | info_about_click_on_chart=点击将会切换6或24小时视图. 46 | info_about_long_press_on_home_screen=要长时间开启应用程序, 请长按屏幕直到手机振动.\n在运动过程中可以很有趣.\n\n但如果手机锁屏或点了HOME按键,该操作将会被重置. 47 | last_connection=最后连接 48 | connected=已连接 49 | battery_level=电池电量等级 50 | sensor_age=传感器使用时间 51 | days=天 52 | iagree=同意 53 | idontagree=不同意 54 | select_unit=选择单位 55 | -------------------------------------------------------------------------------- /src/locale/zh_CN/nightscoutservice.properties: -------------------------------------------------------------------------------- 1 | nightscout_title=夜间检测 测试 2 | nightscout_test_result_ok=夜间检测 网址以及 私有API检测成功 .\n\n夜间检测数据将会自动上传. 3 | nightscout_test_result_nok=夜间检测 网址以及 私有API检测失败.\n\n错误信息 = 4 | care_portal_should_be_enabled=请确保对应网站的 careportal 功能启用,以方便App为您测试 夜间检测 功能. 5 | -------------------------------------------------------------------------------- /src/locale/zh_CN/notificationservice.properties: -------------------------------------------------------------------------------- 1 | open=打开 2 | calibrate=校准 3 | connected=已连接 4 | not_connected=未连接 5 | device_not_paired_notification_title=设备未配对 6 | device_not_paired_body_text_background=打开 xDrip 软件. 7 | device_not_paired_body_text_foreground=接收蓝牙配对请求. 8 | snooze_for_snoozin_alarm_in_notification_screen=振铃 9 | glucose_patch_read_error_notification_title=错误 10 | glucose_patch_read_error_body_text=Patch 读取错误.. 请检查连接状态或者重新初始化... 也可能是电池电量低. 11 | -------------------------------------------------------------------------------- /src/locale/zh_CN/pickerview.properties: -------------------------------------------------------------------------------- 1 | click_to_close=(点击关闭当前视图) 2 | -------------------------------------------------------------------------------- /src/locale/zh_CN/settingsview.properties: -------------------------------------------------------------------------------- 1 | title=设置 2 | logging_and_tracing=Logging and Tracing 3 | detailed_tracing=Detailed Tracing 4 | on=开启 5 | off=关闭 6 | send_tracing_via_email=Send trace file via e-mail 7 | show_nightscout_title=夜间探测 8 | url=Url 9 | api_secret=API_SECRET 10 | enter_nightscout_url_title=Enter NightScout Url 11 | enter_nightscout_url_message=This should only be the sub-domain, main domain and top level domain without https:// and without /api/v1. 12 | enter_nightscout_api_secret_title=Enter API_SECRET 13 | enter_nightscout_api_secret_message=This is just the API_SECRET. 14 | alerts=警告 15 | general_settings=通用设置 16 | unit=血糖单位 17 | mgdl=mgdl 18 | mmol=mmol 19 | high_value=高值 20 | low_value=低值 21 | always_on_notification=在通知中心显示数据 22 | versioninfo=版本信息 23 | version=版本号 24 | ns_logging=NSLog 25 | transmitter_type_settings_title=传感器类型 26 | low_alert=偏低警告 27 | very_low_alert=过低警告 28 | high_alert=偏高警告 29 | very_high_alert=过高警告 30 | missed_reading_alert=未读信息警告 31 | phone_muted_alert=手机静音警告 32 | calibration_request_alert=校准警告 33 | battery_low_alert=电池电量低警告 34 | alert_top_text=添加, 修改或删除警告 35 | no_alert=无警告 36 | alert_types=警告类型 37 | alert_types_list_top_text=添加, 修改或删除警告类型 38 | edit_low_alert=编辑偏低警告 39 | edit_very_low_alert=编辑过低警告 40 | edit_high_alert=编辑偏高警告 41 | edit_very_high_alert=编辑过高警告 42 | edit_missed_reading_alert=编辑未读信息警告 43 | edit_phone_muted_alert=编辑手机静音警告 44 | edit_battery_low_alert=编辑电池电量低警告 45 | edit_calibration_request_alert=编辑校准请求警告 46 | explain_low_alert_list=如果读取数据低于设置, 会触发该警告. 47 | explain_very_low_alert_list=过低警告会优先偏低警告,如果读取数据低于设置, 会触发该警告. 48 | explain_high_alert=如果读取数据高于设置, 会触发该警告. 49 | explain_very_high_alert_list=过高警告会优先偏高警告,如果读取数据高于设置, 会触发该警告. 50 | explain_missed_reading_alert=超过设定分钟数未读取信息, 会触发该警告. 51 | explain_phone_muted_alert=如果手机静音会触发该警告. 52 | explain_battery_low_alert=如果传感器电池电量低于设定值会触发警告, 默认数据根据设备不同而不同. G5 默认数据为: 300, G4 默认数据为: 210, Blukon 默认数据为: 5, MiaoMiao : 20. 53 | explain_calibration_request_alert=你希望多久校准一次 ( 小时). 54 | warning=警告 55 | warn_and_info_phone_muted=你的手机为全天静音, 如果睡觉前你忘记取消静音设置. 你将听不到任何警告提示. 手机静音警告可以在你睡觉前提醒你取消静音设置. 56 | warn_and_info_low_battery=默认电池警告数据300为G5的默认数值. 其他类型传感器请更改为 . G4 : 210, Blukon : 5, MiaoMiao : 20 57 | silent_alert=静音 58 | store_in_healthkit=将数据与Healthkit共享 59 | high_value_should_be_higher_than_low_value=偏高数据必须比偏低数据高 60 | low_value_should_be_lower_than_high_value=偏低数据必须比偏高数据低 61 | transmittertype_picker_title=传感器 62 | show_dexcomshare_title=Dexcom Share 63 | dexcomshareaccountname=Account 64 | dexcomsharepassword=Password 65 | dexcomshareserialnumber=Serial 66 | enter_dexcom_share_account_name_title=Enter Dexcom Share Account Name 67 | enter_dexcom_share_password_title=Enter Dexcom Share Password 68 | enter_dexcom_share_serialnumber_title=Enter Receiver Serial Number 69 | dexcomshareonoff=Dexcom Share 70 | dexcom_us_url=US Share url 71 | dexcom_non_us_url=non US Share url 72 | show_speak_readings_title=语音播报 73 | speakreadingsonoff=语音播报血糖读数 74 | speakreadingsinstructions=如果想确保该功能正常请前往iOS设置,通用,辅助功能,语音,语音 然后选择对应的语言朗读语音 (该操作流程基于iPhone X iOS 11.2.1模拟). 75 | speakreadingsinterval=间隔播报 76 | enter_speak_readings_interval_title=输入间隔次数 77 | enter_speak_readings_interval_message=1为每五分钟播报一次,2为每10分钟播报一次 78 | speakreadingstrendonoff=语音播报血糖趋势 79 | speakreadingsdeltaonoff=语音播报与上次血糖差值 80 | speakreadingslanguagetitle=语言 81 | speakreadingslanguagepickertitle=语言 82 | checkappupdatesonoff=检测软件更新 83 | override_mute=手机静音也开启警告 84 | -------------------------------------------------------------------------------- /src/locale/zh_CN/texttospeech.properties: -------------------------------------------------------------------------------- 1 | currentglucose=当前血糖数据 2 | currenttrend=趋向于 3 | currentdelta=与最后获取数据差别为 4 | trendnoncomputable=无法计算 5 | trenddoubledown=急剧下降 6 | trendsingledown=显著下降 7 | trendfortyfivedown=下降 8 | trendflat=平稳 9 | trendfortyfiveup=升高 10 | trendsingleup=显著升高 11 | trenddoubleup=急剧升高 12 | deltanoncomputable=无法计算 13 | high=高 14 | low=低 15 | -------------------------------------------------------------------------------- /src/locale/zh_CN/transmitterservice.properties: -------------------------------------------------------------------------------- 1 | enter_transmitter_id_dialog_title=传感器 ID 2 | enter_transmitter_id=输入传感器 ID 3 | transmitter_id_should_be_five_chars=传感器 ID 必须为大写字母与数字. 4 | set_transmitter_id_in_settings=前往设置更改传感器 ID. 5 | transmitter_id_settings_title=传感器 ID 6 | blukon_transmitter_id_should_be_five_chars=传感器 ID格式必须为 BLU开头 例如 BLUxxxxx. 7 | blukon_xxxxx_explanation=xxxxx 是您 BluKon 设备编号的最后五位数字. 例如 如果您的BluKon 设备编号为 "BLU1157A00109", 那么您的传感器ID应该为 "BLU00109". 8 | dead_g5_battery=G5 电池已几乎耗尽. 9 | dead_g5_battery_info=在你更换电池前.软件不会再尝试读取传感器数据,直到传感器电池电量正常.\n\n 解除该提醒, 您可以尝试更改传感器ID. 10 | -------------------------------------------------------------------------------- /src/model/Tomato.as: -------------------------------------------------------------------------------- 1 | package model 2 | { 3 | import com.freshplanet.ane.AirBackgroundFetch.BackgroundFetch; 4 | 5 | import flash.events.Event; 6 | import flash.events.EventDispatcher; 7 | import flash.events.TimerEvent; 8 | import flash.utils.ByteArray; 9 | import flash.utils.Endian; 10 | import flash.utils.Timer; 11 | 12 | import mx.collections.ArrayCollection; 13 | 14 | import Utilities.Crc; 15 | import Utilities.Trace; 16 | import Utilities.UniqueId; 17 | import Utilities.Libre.LibreAlarmReceiver; 18 | 19 | import databaseclasses.CommonSettings; 20 | import databaseclasses.Sensor; 21 | 22 | import services.TransmitterService; 23 | 24 | public class Tomato extends EventDispatcher 25 | { 26 | /** 27 | * possible status miaomiao 28 | */ 29 | private static const TOMATO_STATES_REQUEST_DATA_SENT:String = "REQUEST_DATA_SENT"; 30 | /** 31 | * possible status miaomiao 32 | */ 33 | private static const TOMATO_STATES_RECIEVING_DATA:String = "RECIEVING_DATA"; 34 | public static const MINIMUM_TIME_BETWEEN_TWO_MIAO_MIAO_READINGS_IN_SECONDS:int = 10; 35 | public static const MAXIMUM_AMOUNT_OF_PACKETS_NEEDED:int = 19; 36 | /** 37 | * miaomiao status, one of TOMATO_STATES_REQUEST_DATA_SENT or TOMATO_STATES_RECIEVING_DATA or empty string 38 | */ 39 | private static var s_state:String; 40 | private static var TOMATO_HEADER_LENGTH:int = 18; 41 | //other Tomato Variables 42 | private static var s_lastReceiveTimestamp:Number = 0; 43 | 44 | private static var resendPakcetTimer:Timer; 45 | private static var resendPacketCounter:int = 0; 46 | private static const MAX_PACKET_RESEND_REQUESTS:int = 3; 47 | 48 | private static var _instance:Tomato = new Tomato(); 49 | public static function get instance():Tomato 50 | { 51 | return _instance; 52 | } 53 | 54 | public function Tomato() 55 | { 56 | } 57 | 58 | private static function sendStartReadingCommandToMiaoMiao(event:Event):void { 59 | myTrace("in sendStartReadingCommandToMiaoMiao"); 60 | BackgroundFetch.sendStartReadingCommmandToMiaoMia(); 61 | } 62 | 63 | public static function decodeTomatoPacket(s_full_data:ByteArray):void { 64 | if (resendPakcetTimer != null) { 65 | if (resendPakcetTimer.running) { 66 | resendPakcetTimer.stop(); 67 | } 68 | resendPakcetTimer = null; 69 | } 70 | 71 | s_full_data.position = 0; 72 | myTrace("in decodeTomatoPacket, received packet "); 73 | 74 | //// 75 | var data:ByteArray = new ByteArray(); 76 | data.endian = Endian.LITTLE_ENDIAN; 77 | s_full_data.position = TOMATO_HEADER_LENGTH; 78 | s_full_data.readBytes(data, 0, 344); 79 | var checksum_ok:Boolean = Crc.LibreCrc(data); 80 | myTrace("in decodeTomatoPacket, checksum_ok = " + checksum_ok); 81 | 82 | if (!checksum_ok) { 83 | resendPacketCounter++; 84 | if (resendPacketCounter <= MAX_PACKET_RESEND_REQUESTS) { 85 | myTrace("in decodeTomatoPacket, checksum not ok. Start timer of 60 seconds to send start reading command"); 86 | resendPakcetTimer = new Timer(60 * 1000, 1); 87 | resendPakcetTimer.addEventListener(TimerEvent.TIMER, sendStartReadingCommandToMiaoMiao); 88 | resendPakcetTimer.start(); 89 | } else { 90 | myTrace("in decodeTomatoPacket, checksum not ok. Reached maximum number of retries, which is " + MAX_PACKET_RESEND_REQUESTS); 91 | resendPacketCounter = 0; 92 | } 93 | return; 94 | } else { 95 | resendPacketCounter = 0; 96 | } 97 | 98 | CommonSettings.setCommonSetting(CommonSettings.COMMON_SETTING_MIAOMIAO_BATTERY_LEVEL, (new Number(getByteAt(s_full_data,13))).toString()); 99 | 100 | s_full_data.position = 16; 101 | var temp:ByteArray = new ByteArray();s_full_data.readBytes(temp, 0,2); 102 | CommonSettings.setCommonSetting(CommonSettings.COMMON_SETTING_MIAOMIAO_HARDWARE, Utilities.UniqueId.bytesToHex(temp)); 103 | 104 | s_full_data.position = 14; 105 | temp = new ByteArray();s_full_data.readBytes(temp, 0, 2); 106 | CommonSettings.setCommonSetting(CommonSettings.COMMON_SETTING_MIAOMIAO_FW,Utilities.UniqueId.bytesToHex(temp)); 107 | myTrace("in decodeTomatoPacket, COMMON_SETTING_MIAOMIAO_HARDWARE = " + CommonSettings.getCommonSetting(CommonSettings.COMMON_SETTING_MIAOMIAO_HARDWARE) + ", COMMON_SETTING_MIAOMIAO_FW = " + CommonSettings.getCommonSetting(CommonSettings.COMMON_SETTING_MIAOMIAO_FW) + ", battery level " + CommonSettings.getCommonSetting(CommonSettings.COMMON_SETTING_MIAOMIAO_BATTERY_LEVEL)); 108 | 109 | var mResult:ArrayCollection = LibreAlarmReceiver.parseData("tomato", data); 110 | if (LibreAlarmReceiver.CalculateFromDataTransferObject(mResult)) { 111 | TransmitterService.dispatchBgReadingEvent(); 112 | } 113 | } 114 | 115 | public static function receivedSensorChangedFromMiaoMiao():void { 116 | myTrace("in decodeTomatoPacket, received sensor change from miaomioa. Confirming sensor change and Stopping the sensor"); 117 | BackgroundFetch.confirmSensorChangeMiaoMiao(); 118 | Sensor.stopSensor(); 119 | CommonSettings.setCommonSetting(CommonSettings.COMMON_SETTING_FSL_SENSOR_AGE, "0"); 120 | } 121 | 122 | 123 | private static function InitBuffer():void { 124 | } 125 | 126 | private static function myTrace(log:String):void { 127 | Trace.myTrace("Tomato.as", log); 128 | } 129 | 130 | private static function getByteAt(buffer:ByteArray, position:int):int { 131 | buffer.position = position; 132 | return buffer.readByte(); 133 | } 134 | } 135 | } -------------------------------------------------------------------------------- /src/model/TransmitterData.as: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright (C) 2016 Johan Degraeve 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | 17 | */ 18 | package model 19 | { 20 | import flash.errors.IllegalOperationError; 21 | import flash.utils.getDefinitionByName; 22 | import flash.utils.getQualifiedClassName; 23 | 24 | /** 25 | * class with data received from transmitter, generic class
26 | * There's no relation with database class, just ust for passing transmitter data from one to another
27 | * There's no timestamp, nor uniqueid because this is only to be used temporary to pass the data, reflecting exactly what is received from the transmitter
µ 28 | *
29 | * (used http://stackoverflow.com/questions/1538391/as3-abstract-classes to make this class abstract) 30 | */ 31 | public class TransmitterData 32 | { 33 | public function TransmitterData() 34 | { 35 | inspectAbstract(); 36 | } 37 | 38 | private function inspectAbstract():void 39 | { 40 | var className : String = getQualifiedClassName(this); 41 | if (getDefinitionByName(className) == TransmitterData ) 42 | { 43 | throw new ArgumentError( 44 | getQualifiedClassName(this) + "Class can not be instantiated."); 45 | } 46 | } 47 | } 48 | } -------------------------------------------------------------------------------- /src/model/TransmitterDataBluKonPacket.as: -------------------------------------------------------------------------------- 1 | package model 2 | { 3 | public class TransmitterDataBluKonPacket extends TransmitterData 4 | { 5 | private var _bgValue:Number; 6 | 7 | public function get bgvalue():Number 8 | { 9 | return _bgValue; 10 | } 11 | 12 | private var _timeStamp:Number; 13 | 14 | public function get timeStamp():Number 15 | { 16 | return _timeStamp; 17 | } 18 | 19 | private var _sensorBatteryLevel:Number; 20 | 21 | public function get sensorBatteryLevel():Number 22 | { 23 | return _sensorBatteryLevel; 24 | } 25 | 26 | private var _bridgeBatteryLevel:Number; 27 | 28 | public function get bridgeBatteryLevel():Number 29 | { 30 | return _bridgeBatteryLevel; 31 | } 32 | 33 | private var _sensorAge:Number; 34 | 35 | public function get sensorAge():Number 36 | { 37 | return _sensorAge; 38 | } 39 | 40 | 41 | public function TransmitterDataBluKonPacket(rawData:Number, sensorBatteryLevel:Number, bridgeBatteryLevel:Number, sensorAge:Number, timestamp:Number) 42 | { 43 | _bgValue = rawData; 44 | _sensorBatteryLevel = sensorBatteryLevel; 45 | _bridgeBatteryLevel = bridgeBatteryLevel; 46 | _timeStamp = timestamp; 47 | _sensorAge = sensorAge; 48 | } 49 | } 50 | } -------------------------------------------------------------------------------- /src/model/TransmitterDataBlueReaderBatteryPacket.as: -------------------------------------------------------------------------------- 1 | package model 2 | { 3 | public class TransmitterDataBlueReaderBatteryPacket extends TransmitterData 4 | { 5 | public function TransmitterDataBlueReaderBatteryPacket() 6 | { 7 | super(); 8 | } 9 | } 10 | } -------------------------------------------------------------------------------- /src/model/TransmitterDataBlueReaderPacket.as: -------------------------------------------------------------------------------- 1 | package model 2 | { 3 | public class TransmitterDataBlueReaderPacket extends TransmitterData 4 | { 5 | private var _bgValue:Number; 6 | 7 | public function get bgValue():Number 8 | { 9 | return _bgValue; 10 | } 11 | 12 | private var _timeStamp:Number; 13 | 14 | public function get timeStamp():Number 15 | { 16 | return _timeStamp; 17 | } 18 | 19 | private var _sensorBatteryLevel:Number; 20 | 21 | public function get sensorBatteryLevel():Number 22 | { 23 | return _sensorBatteryLevel; 24 | } 25 | 26 | private var _bridgeBatteryLevel:Number; 27 | 28 | public function get bridgeBatteryLevel():Number 29 | { 30 | return _bridgeBatteryLevel; 31 | } 32 | 33 | /** 34 | * sensorAge in minutes 35 | */ 36 | private var _sensorAge:Number; 37 | 38 | public function get sensorAge():Number 39 | { 40 | return _sensorAge; 41 | } 42 | 43 | 44 | public function TransmitterDataBlueReaderPacket(rawData:Number, sensorBatteryLevel:Number, bridgeBatteryLevel:Number, sensorAge:Number, timestamp:Number) 45 | { 46 | _bgValue = rawData; 47 | _sensorBatteryLevel = sensorBatteryLevel; 48 | _bridgeBatteryLevel = bridgeBatteryLevel; 49 | _timeStamp = timestamp; 50 | _sensorAge = sensorAge; 51 | } 52 | } 53 | } -------------------------------------------------------------------------------- /src/model/TransmitterDataG5Packet.as: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright (C) 2016 Johan Degraeve 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | 17 | */ 18 | package model 19 | { 20 | import G5Model.TransmitterStatus; 21 | 22 | public class TransmitterDataG5Packet extends TransmitterData 23 | { 24 | private var _rawData:Number; 25 | 26 | public function get rawData():Number 27 | { 28 | return _rawData; 29 | } 30 | 31 | private var _filteredData:Number; 32 | 33 | public function get filteredData():Number 34 | { 35 | return _filteredData; 36 | } 37 | 38 | private var _transmitterBatteryVoltage:Number; 39 | 40 | public function get transmitterBatteryVoltage():Number 41 | { 42 | return _transmitterBatteryVoltage; 43 | } 44 | 45 | private var _timeStamp:Number; 46 | 47 | public function get timeStamp():Number 48 | { 49 | return _timeStamp; 50 | } 51 | 52 | private var _transmitterStatus:TransmitterStatus 53 | 54 | public function get transmitterStatus():TransmitterStatus 55 | { 56 | return _transmitterStatus; 57 | } 58 | 59 | /** 60 | * G5 data packet
61 | * There's no relation with database class, just ust for passing transmitter data from one to another
62 | */ 63 | public function TransmitterDataG5Packet(rawData:Number, filteredData:Number, transmitterBatteryVoltage:Number, timeStamp:Number, transmitter:TransmitterStatus) { 64 | _rawData = rawData; 65 | _filteredData = filteredData; 66 | _transmitterBatteryVoltage = transmitterBatteryVoltage; 67 | _timeStamp = timeStamp; 68 | _transmitterStatus = transmitterStatus; 69 | } 70 | } 71 | } -------------------------------------------------------------------------------- /src/model/TransmitterDataTransmiter_PLPacket.as: -------------------------------------------------------------------------------- 1 | package model 2 | { 3 | public class TransmitterDataTransmiter_PLPacket extends TransmitterData 4 | { 5 | private var _bgValue:Number; 6 | 7 | public function get bgValue():Number 8 | { 9 | return _bgValue; 10 | } 11 | 12 | private var _timeStamp:Number; 13 | 14 | public function get timeStamp():Number 15 | { 16 | return _timeStamp; 17 | } 18 | 19 | private var _bridgeBatteryLevel:Number; 20 | 21 | public function get bridgeBatteryLevel():Number 22 | { 23 | return _bridgeBatteryLevel; 24 | } 25 | 26 | /** 27 | * sensor age in minutes 28 | */ 29 | private var _sensorAge:Number; 30 | 31 | public function get sensorAge():Number 32 | { 33 | return _sensorAge; 34 | } 35 | 36 | public function TransmitterDataTransmiter_PLPacket(rawData:Number, bridgeBatteryLevel:Number, sensorAge:Number, timestamp:Number) 37 | { 38 | _bgValue = rawData; 39 | _bridgeBatteryLevel = bridgeBatteryLevel; 40 | _timeStamp = timestamp; 41 | _sensorAge = sensorAge; 42 | } 43 | } 44 | } -------------------------------------------------------------------------------- /src/model/TransmitterDataXBridgeBeaconPacket.as: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright (C) 2016 Johan Degraeve 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | 17 | */ 18 | package model 19 | { 20 | public class TransmitterDataXBridgeBeaconPacket extends TransmitterData 21 | { 22 | private var _TxID:String; 23 | 24 | public function get TxID():String 25 | { 26 | return _TxID; 27 | } 28 | 29 | 30 | /** 31 | * xbridge beacon packet
32 | * There's no relation with database class, just ust for passing transmitter data from one to another
33 | * There's no timestamp, nor uniqueid because this is only to be used temporary to pass the data, reflecting exactly what is received from the transmitter
34 | *
35 | * txID is the decoded transmitter id 36 | */ 37 | public function TransmitterDataXBridgeBeaconPacket(txID:String) { 38 | { 39 | _TxID = txID; 40 | } 41 | } 42 | } 43 | } -------------------------------------------------------------------------------- /src/model/TransmitterDataXBridgeDataPacket.as: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright (C) 2016 Johan Degraeve 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | 17 | */ 18 | package model 19 | { 20 | public class TransmitterDataXBridgeDataPacket extends TransmitterData 21 | { 22 | private var _rawData:Number; 23 | 24 | public function get rawData():Number 25 | { 26 | return _rawData; 27 | } 28 | 29 | private var _filteredData:Number; 30 | 31 | public function get filteredData():Number 32 | { 33 | return _filteredData; 34 | } 35 | 36 | private var _transmitterBatteryVoltage:Number; 37 | 38 | public function get transmitterBatteryVoltage():Number 39 | { 40 | return _transmitterBatteryVoltage; 41 | } 42 | 43 | private var _bridgeBatteryPercentage:Number; 44 | 45 | public function get bridgeBatteryPercentage():Number 46 | { 47 | return _bridgeBatteryPercentage; 48 | } 49 | 50 | private var _TxID:String; 51 | 52 | public function get TxID():String 53 | { 54 | return _TxID; 55 | } 56 | 57 | 58 | /** 59 | * xbridge data packet
60 | * There's no relation with database class, just ust for passing transmitter data from one to another
61 | * There's no timestamp, nor uniqueid because this is only to be used temporary to pass the data, reflecting exactly what is received from the transmitter
62 | *
63 | * txID is the decoded transmitter id 64 | */ 65 | public function TransmitterDataXBridgeDataPacket(rawData:Number, filteredData:Number, transmitterBatteryVoltage:Number, bridgeBatteryPercentage:Number, txID:String) { 66 | _rawData = rawData; 67 | _filteredData = filteredData; 68 | _transmitterBatteryVoltage = transmitterBatteryVoltage; 69 | _bridgeBatteryPercentage = bridgeBatteryPercentage; 70 | _TxID = txID; 71 | } 72 | } 73 | } -------------------------------------------------------------------------------- /src/model/TransmitterDataXdripDataPacket.as: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright (C) 2016 Johan Degraeve 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | 17 | */ 18 | package model 19 | { 20 | public class TransmitterDataXdripDataPacket extends TransmitterData 21 | { 22 | private var _rawData:Number; 23 | 24 | public function get rawData():Number 25 | { 26 | return _rawData; 27 | } 28 | 29 | private var _filteredData:Number; 30 | 31 | public function get filteredData():Number 32 | { 33 | return _filteredData; 34 | } 35 | 36 | private var _transmitterBatteryVoltage:Number; 37 | 38 | public function get transmitterBatteryVoltage():Number 39 | { 40 | return _transmitterBatteryVoltage; 41 | } 42 | 43 | 44 | /** 45 | * xdrip data packet
46 | * There's no relation with database class, just ust for passing transmitter data from one to another
47 | * There's no timestamp, nor uniqueid because this is only to be used temporary to pass the data, reflecting exactly what is received from the transmitter
48 | */ 49 | public function TransmitterDataXdripDataPacket(rawData:Number, filteredData:Number, transmitterBatteryVoltage:Number) { 50 | _rawData = rawData; 51 | _filteredData = filteredData; 52 | _transmitterBatteryVoltage = transmitterBatteryVoltage; 53 | } 54 | 55 | } 56 | } -------------------------------------------------------------------------------- /src/renderers/AlertTypeItemRenderer.as: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright (C) 2017 Johan Degraeve 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | 17 | */ 18 | package renderers 19 | { 20 | import flash.events.Event; 21 | import flash.events.MouseEvent; 22 | 23 | import mx.graphics.BitmapFillMode; 24 | 25 | import spark.components.Image; 26 | import spark.components.LabelItemRenderer; 27 | 28 | import databaseclasses.AlertType; 29 | 30 | import model.ModelLocator; 31 | 32 | public class AlertTypeItemRenderer extends LabelItemRenderer 33 | { 34 | private var editImage:Image; 35 | private var deleteImage:Image; 36 | 37 | /** 38 | * to dispatch event data delete button as clicked 39 | */ 40 | public static var DELETE_CLICKED:String = "FROMTIME_AND_VALUE_ITEMRENDERER_DELETE_CLICKED"; 41 | 42 | /** 43 | * to dispatch event data edit button as clicked 44 | */ 45 | public static var EDIT_CLICKED:String = "FROMTIME_AND_VALUE_ITEMRENDERER_EDIT_CLICKED"; 46 | 47 | private function deleteClicked(event:Event):void { 48 | this.dispatchEvent(new Event(DELETE_CLICKED,true,true)); 49 | } 50 | 51 | private function editClicked(event:Event):void { 52 | this.dispatchEvent(new Event(EDIT_CLICKED,true,true)); 53 | } 54 | 55 | static private var ITEM_HEIGHT:int = 48; 56 | static private var ICON_WIDTH:int = 48; 57 | static private var offsetToPutTextInTheMiddle:int = 15; 58 | 59 | public function AlertTypeItemRenderer() 60 | { 61 | super(); 62 | deleteImage = new Image(); 63 | deleteImage.fillMode = BitmapFillMode.CLIP; 64 | deleteImage.contentLoader = ModelLocator.iconCache; 65 | deleteImage.source = "assets/Trash_48x48.png"; 66 | deleteImage.addEventListener(MouseEvent.CLICK,deleteClicked); 67 | addChild(deleteImage); 68 | 69 | editImage = new Image(); 70 | editImage.fillMode = BitmapFillMode.CLIP; 71 | editImage.contentLoader = ModelLocator.iconCache; 72 | editImage.source = "assets/edit48x48.png"; 73 | editImage.addEventListener(MouseEvent.CLICK,editClicked); 74 | addChild(editImage); 75 | } 76 | 77 | /** 78 | * @private 79 | * 80 | * Override this setter to respond to data changes 81 | */ 82 | override public function set data(value:Object):void 83 | { 84 | super.data = value; 85 | if (value == null) 86 | return; 87 | var theDataAsAlertType:AlertType = value as AlertType; 88 | label = theDataAsAlertType.alarmName; 89 | } 90 | 91 | /** 92 | * @private 93 | * 94 | * Override this method to change how the item renderer 95 | * sizes itself. For performance reasons, do not call 96 | * super.measure() unless you need to. 97 | */ 98 | override protected function measure():void 99 | { 100 | super.measure(); 101 | // measure all the subcomponents here and set measuredWidth, measuredHeight, 102 | // measuredMinWidth, and measuredMinHeight 103 | } 104 | 105 | /** 106 | * @private 107 | * 108 | * Override this method to change how the background is drawn for 109 | * item renderer. For performance reasons, do not call 110 | * super.drawBackground() if you do not need to. 111 | */ 112 | override protected function drawBackground(unscaledWidth:Number, 113 | unscaledHeight:Number):void { 114 | //only draw a border line 115 | graphics.lineStyle(1, 0x212121); 116 | graphics.moveTo(0,unscaledHeight - 1); 117 | graphics.lineTo(unscaledWidth,unscaledHeight - 1); 118 | graphics.endFill(); 119 | } 120 | 121 | override protected function layoutContents(unscaledWidth:Number, 122 | unscaledHeight:Number):void { 123 | if (editImage) { 124 | setElementSize(editImage,ICON_WIDTH,ITEM_HEIGHT); 125 | setElementPosition(editImage,unscaledWidth - ICON_WIDTH,0); 126 | } 127 | if (deleteImage) { 128 | setElementSize(deleteImage,ICON_WIDTH,ITEM_HEIGHT); 129 | setElementPosition(deleteImage, unscaledWidth - ICON_WIDTH - (editImage?ICON_WIDTH:0), 0); 130 | } 131 | setElementSize(labelDisplay,unscaledWidth - ICON_WIDTH *2 ,ITEM_HEIGHT); 132 | setElementPosition(labelDisplay,0,offsetToPutTextInTheMiddle); 133 | } 134 | 135 | } 136 | } -------------------------------------------------------------------------------- /src/renderers/BGGraphItemRenderer.as: -------------------------------------------------------------------------------- 1 | package renderers 2 | { 3 | import flash.display.Graphics; 4 | 5 | import mx.charts.series.items.PlotSeriesItem; 6 | 7 | import spark.components.IconItemRenderer; 8 | 9 | import databaseclasses.BgReading; 10 | import databaseclasses.CommonSettings; 11 | 12 | public class BGGraphItemRenderer extends IconItemRenderer 13 | { 14 | private var _chartItem:PlotSeriesItem; 15 | 16 | public function BGGraphItemRenderer() 17 | { 18 | super(); 19 | } 20 | 21 | override public function get data():Object { 22 | return _chartItem; 23 | } 24 | 25 | override public function set data(value:Object):void { 26 | _chartItem = value as PlotSeriesItem; 27 | invalidateDisplayList(); 28 | } 29 | 30 | override protected function updateDisplayList(unscaledWidth:Number,unscaledHeight:Number):void { 31 | if(!_chartItem.item) 32 | return; 33 | 34 | if (!_chartItem.item.calculatedValue) 35 | return; 36 | 37 | if (isNaN(_chartItem.item.calculatedValue)) 38 | return; 39 | 40 | var g:Graphics = graphics; 41 | g.clear(); 42 | var value:Number = CommonSettings.getCommonSetting(CommonSettings.COMMON_SETTING_DO_MGDL) == "true" ? _chartItem.item.calculatedValue as Number:BgReading.mmolToMgdl(_chartItem.item.calculatedValue as Number); 43 | var color:uint = value > new Number(CommonSettings.getCommonSetting(CommonSettings.COMMON_SETTING_HIGH_MARK)) ? 0xFFBB33 : 44 | value < new Number(CommonSettings.getCommonSetting(CommonSettings.COMMON_SETTING_LOW_MARK)) ? 0xC30909:0x33B5E6; 45 | g.beginFill(color); 46 | g.drawCircle(0, 0, 2); 47 | g.endFill(); 48 | } 49 | 50 | } 51 | } -------------------------------------------------------------------------------- /src/renderers/MenuElementItemRenderer.as: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright (C) 2013 hippoandfriends 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | 17 | */ 18 | package renderers 19 | { 20 | import spark.components.LabelItemRenderer; 21 | 22 | 23 | /** 24 | * 25 | * itemrenderer for menu item for example in home screen or settings screen 26 | * 27 | */ 28 | public class MenuElementItemRenderer extends LabelItemRenderer 29 | { 30 | public function MenuElementItemRenderer() 31 | { 32 | //TODO: implement function 33 | super(); 34 | } 35 | 36 | /** 37 | * @private 38 | * 39 | * Override this setter to respond to data changes 40 | */ 41 | override public function set data(value:Object):void 42 | { 43 | super.data = value; 44 | // the data has changed. push these changes down in to the 45 | // subcomponents here 46 | } 47 | 48 | /** 49 | * @private 50 | * 51 | * Override this method to create children for your item renderer 52 | */ 53 | override protected function createChildren():void 54 | { 55 | super.createChildren(); 56 | // create any additional children for your item renderer here 57 | } 58 | 59 | /** 60 | * @private 61 | * 62 | * Override this method to change how the item renderer 63 | * sizes itself. For performance reasons, do not call 64 | * super.measure() unless you need to. 65 | */ 66 | override protected function measure():void 67 | { 68 | super.measure(); 69 | // measure all the subcomponents here and set measuredWidth, measuredHeight, 70 | // measuredMinWidth, and measuredMinHeight 71 | } 72 | 73 | /** 74 | * @private 75 | * 76 | * Override this method to change how the background is drawn for 77 | * item renderer. For performance reasons, do not call 78 | * super.drawBackground() if you do not need to. 79 | */ 80 | override protected function drawBackground(unscaledWidth:Number, 81 | unscaledHeight:Number):void 82 | { 83 | //super.drawBackground(unscaledWidth, unscaledHeight); 84 | // do any drawing for the background of the item renderer here 85 | if(itemIndex % 2 == 0) { 86 | graphics.beginFill(styleManager.getStyleDeclaration(".listAlternatingColors").getStyle("color1"),1); 87 | } else { 88 | graphics.beginFill(styleManager.getStyleDeclaration(".listAlternatingColors").getStyle("color2"),1); 89 | } 90 | graphics.drawRect(0, 0, unscaledWidth, unscaledHeight); 91 | graphics.endFill(); 92 | 93 | } 94 | 95 | /** 96 | * @private 97 | * 98 | * Override this method to change how the background is drawn for this 99 | * item renderer. For performance reasons, do not call 100 | * super.layoutContents() if you do not need to. 101 | */ 102 | override protected function layoutContents(unscaledWidth:Number, 103 | unscaledHeight:Number):void 104 | { 105 | super.layoutContents(unscaledWidth, unscaledHeight); 106 | // layout all the subcomponents here 107 | } 108 | 109 | } 110 | } -------------------------------------------------------------------------------- /src/renderers/WrapText.mxml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/services/BackGroundFetchService.as: -------------------------------------------------------------------------------- 1 | package services 2 | { 3 | import com.freshplanet.ane.AirBackgroundFetch.BackgroundFetch; 4 | import com.freshplanet.ane.AirBackgroundFetch.BackgroundFetchEvent; 5 | import flash.events.EventDispatcher; 6 | import flash.net.URLVariables; 7 | 8 | import Utilities.Trace; 9 | import events.BackGroundFetchServiceEvent; 10 | 11 | /** 12 | * controls all services that need up or download
13 | * 14 | * up- or downloads can not be done in parallel
15 | * 16 | * Services that need up or download, need to call createandloadurlrequest and listen for events BackgroundFetchServiceEvent.LOAD_REQUEST_RESULT 17 | * and BackgroundFetchServiceEvent.LOAD_REQUEST_ERROR
18 | * Failing to do so will not give the chance to BackGroundFetchService to keep control, ie to launch other services that need up or download and to call callcompletionhandler resulting in 19 | * timeout in BackGroundFetch (which is 20 seconds) 20 | * 21 | */ 22 | public class BackGroundFetchService extends EventDispatcher 23 | { 24 | private static var _instance:BackGroundFetchService = new BackGroundFetchService(); 25 | private static var initialStart:Boolean = true; 26 | 27 | private static var timeStampOfLastDeviceDiscovery:Number = 0; 28 | 29 | /** 30 | * to be used in function callCompletionHandler 31 | */ 32 | public static const NEW_DATA: String = "NEW_DATA"; 33 | /** 34 | * to be used in function callCompletionHandler 35 | */ 36 | public static const FETCH_FAILED: String = "FETCH_FAILED"; 37 | /** 38 | * to be used in function callCompletionHandler 39 | */ 40 | public static const NO_DATA: String = "NO_DATA"; 41 | 42 | public static function get instance():BackGroundFetchService { 43 | return _instance; 44 | } 45 | 46 | public function BackGroundFetchService() { 47 | if (_instance != null) { 48 | throw new Error("BackGroundFetchService class constructor can not be used"); 49 | } 50 | } 51 | 52 | public static function init():void { 53 | if (!initialStart) 54 | return; 55 | else 56 | initialStart = false; 57 | 58 | BackgroundFetch.init(); 59 | BackgroundFetch.instance.addEventListener(BackgroundFetchEvent.LOAD_REQUEST_RESULT, loadRequestSuccess); 60 | BackgroundFetch.instance.addEventListener(BackgroundFetchEvent.LOAD_REQUEST_ERROR, loadRequestError); 61 | BackgroundFetch.minimumBackgroundFetchInterval = BackgroundFetch.BACKGROUND_FETCH_INTERVAL_NEVER; 62 | } 63 | 64 | private static function loadRequestSuccess(event:BackgroundFetchEvent):void { 65 | myTrace("loadRequestSuccess, result only visible in NSLog : connect phone to Mac and use cfgutil"); 66 | myTrace("result = " + (event.data.result as String).substring(0, 2000), true); 67 | 68 | var backgroundFetchServiceResult:BackGroundFetchServiceEvent = new BackGroundFetchServiceEvent(BackGroundFetchServiceEvent.LOAD_REQUEST_RESULT); 69 | backgroundFetchServiceResult.data = new Object(); 70 | backgroundFetchServiceResult.data.information = event.data.result as String; 71 | trace("BACKGROUNDFETSERVICE information = " + backgroundFetchServiceResult.data.information); 72 | _instance.dispatchEvent(backgroundFetchServiceResult); 73 | } 74 | 75 | private static function loadRequestError(event:BackgroundFetchEvent):void { 76 | myTrace("loadRequestError"); 77 | myTrace("error = " + (event.data.error as String)); 78 | if (event.data.text) 79 | myTrace("text = " + (event.data.text as String)); 80 | if (event.data.type) 81 | myTrace("type = " + (event.data.type as String)); 82 | 83 | var backgroundFetchServiceResult:BackGroundFetchServiceEvent = new BackGroundFetchServiceEvent(BackGroundFetchServiceEvent.LOAD_REQUEST_ERROR); 84 | backgroundFetchServiceResult.data = new Object(); 85 | backgroundFetchServiceResult.data.information = event.data.error as String; 86 | _instance.dispatchEvent(backgroundFetchServiceResult); 87 | } 88 | 89 | /** 90 | * url is the url and should not be null
91 | *
92 | * if requestMethod is null then "GET" will be done
93 | *
94 | * urlVariables or data can be null, if urlVariables is not null, then urlVariables are added in the body, not the data
95 | * if urlVariables is null, then data is added in the body
97 | * urlvariables or data are url encoded within the ANE itself
98 | *
99 | * contentType can be null, if null it will get the value "application/x-www-form-urlencoded" 100 | *
101 | * args parameter is to pass additional header name value pairs, must always be by two.
102 | */ 103 | public static function createAndLoadUrlRequest(url: String, requestMethod:String, urlVariables:URLVariables, data:String, contentType:String, ... args): void { 104 | var parameters:Array = new Array(5 + args.length); 105 | parameters[0] = url; 106 | parameters[1] = requestMethod; 107 | parameters[2] = urlVariables; 108 | parameters[3] = data; 109 | parameters[4] = contentType; 110 | for (var i:int = 0;i < args.length;i++) { 111 | parameters[5 + i] = args[i]; 112 | } 113 | BackgroundFetch.createAndLoadUrlRequest.apply(null, parameters); 114 | } 115 | 116 | private static function myTrace(log:String, dontWriteToFile:Boolean = false):void { 117 | Trace.myTrace("BackGroundFetchService.as", log, dontWriteToFile); 118 | } 119 | } 120 | } -------------------------------------------------------------------------------- /src/services/HealthKitService.as: -------------------------------------------------------------------------------- 1 | package services 2 | { 3 | import com.freshplanet.ane.AirBackgroundFetch.BackgroundFetch; 4 | 5 | import flash.events.Event; 6 | 7 | import databaseclasses.BgReading; 8 | import databaseclasses.LocalSettings; 9 | 10 | import events.NightScoutServiceEvent; 11 | import events.SettingsServiceEvent; 12 | import events.TransmitterServiceEvent; 13 | 14 | import skins.TimeSpinner36Hours; 15 | 16 | public class HealthKitService 17 | { 18 | private static var _instance:HealthKitService = new HealthKitService(); 19 | private static var initialStart:Boolean = true; 20 | 21 | public function HealthKitService() 22 | { 23 | if (_instance != null) { 24 | throw new Error("HealthKitService class constructor can not be used"); 25 | } 26 | } 27 | 28 | public static function init():void { 29 | if (!initialStart) 30 | return; 31 | else 32 | initialStart = false; 33 | LocalSettings.instance.addEventListener(SettingsServiceEvent.SETTING_CHANGED, localSettingChanged); 34 | TransmitterService.instance.addEventListener(TransmitterServiceEvent.BGREADING_EVENT, bgReadingReceived); 35 | NightScoutService.instance.addEventListener(NightScoutServiceEvent.NIGHTSCOUT_SERVICE_BG_READING_RECEIVED, bgReadingReceived); 36 | if (LocalSettings.getLocalSetting(LocalSettings.LOCAL_SETTING_HEALTHKIT_STORE_ON) == "true") { 37 | BackgroundFetch.initHealthKit(); 38 | } 39 | } 40 | 41 | private static function localSettingChanged(event:SettingsServiceEvent):void { 42 | if (event.data == LocalSettings.LOCAL_SETTING_HEALTHKIT_STORE_ON) { 43 | if (LocalSettings.getLocalSetting(LocalSettings.LOCAL_SETTING_HEALTHKIT_STORE_ON) == "true") { 44 | //doesn't matterif it's already initiated 45 | BackgroundFetch.initHealthKit(); 46 | } 47 | } 48 | } 49 | 50 | private static function bgReadingReceived(be:Event):void { 51 | if (LocalSettings.getLocalSetting(LocalSettings.LOCAL_SETTING_HEALTHKIT_STORE_ON) == "false") { 52 | return; 53 | } 54 | 55 | var bgReading:BgReading = BgReading.lastNoSensor(); 56 | 57 | if (bgReading == null) 58 | return; 59 | if (bgReading.calculatedValue == 0) { 60 | return; 61 | } 62 | BackgroundFetch.storeBGInHealthKitMgDl(bgReading.calculatedValue, bgReading.timestamp); 63 | } 64 | } 65 | } -------------------------------------------------------------------------------- /src/skins/ButtonWithLabelOnTwoLinesSkin.mxml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 24 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | [HostComponent("spark.components.Button")] 40 | 41 | 42 | 43 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 112 | 113 | -------------------------------------------------------------------------------- /src/skins/ButtonWithoutBorderAndBackGroundSkin.mxml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 24 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | [HostComponent("spark.components.Button")] 40 | 41 | 42 | 43 | 66 | 67 | 68 | 69 | 70 | 76 | 77 | -------------------------------------------------------------------------------- /src/skins/FillForMyBorderContainer.as: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright (C) 2017 Johan Degraeve 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | 17 | */ 18 | package skins 19 | { 20 | import flash.display.GradientType; 21 | import flash.display.Graphics; 22 | import flash.geom.Matrix; 23 | import flash.geom.Point; 24 | import flash.geom.Rectangle; 25 | 26 | import mx.graphics.IFill; 27 | 28 | public class FillForMyBorderContainer implements IFill 29 | { 30 | static private var tabBackGroundColors:Array; 31 | static private var matrix:Matrix; 32 | 33 | public function FillForMyBorderContainer() 34 | { 35 | } 36 | 37 | public function begin(target:Graphics, targetBounds:Rectangle, targetOrigin:Point):void 38 | { 39 | if (tabBackGroundColors == null) { 40 | tabBackGroundColors = [] ; 41 | tabBackGroundColors[0] = '0x3B6999';/* gradient will be applied from bottom to top, this is the bottom color*/ 42 | tabBackGroundColors[1] = '0x7EA6CD'; 43 | matrix = new Matrix(); 44 | matrix.createGradientBox(targetBounds.width, targetBounds.height, 1.57, 0, 0); 45 | } 46 | 47 | //only if the tab is selected, then we'll have the gradient backup 48 | target.beginGradientFill(GradientType.LINEAR, tabBackGroundColors, [0.95,0.95],[0,255],matrix); 49 | 50 | //target.drawRect(0, 0, targetBounds.width, targetBounds.height); 51 | target.drawRoundRectComplex(0,0,targetBounds.width,targetBounds.height,10,10,10,10); 52 | 53 | target.endFill(); 54 | } 55 | 56 | public function end(target:Graphics):void 57 | { 58 | } 59 | } 60 | } -------------------------------------------------------------------------------- /src/skins/MyBorderContainer.as: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright (C) 2017 Johan Degraeve 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | 17 | */ 18 | package skins 19 | { 20 | import mx.graphics.IFill; 21 | 22 | import spark.components.BorderContainer; 23 | 24 | public class MyBorderContainer extends BorderContainer 25 | { 26 | static private var iFill:IFill; 27 | 28 | public function MyBorderContainer() 29 | { 30 | super(); 31 | } 32 | 33 | override public function get backgroundFill():IFill { 34 | if (!iFill) { 35 | iFill = new FillForMyBorderContainer(); 36 | } 37 | return iFill; 38 | } 39 | 40 | } 41 | } -------------------------------------------------------------------------------- /src/skins/TabbedViewNavigatorTabBarSkin.as: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright (C) 2013 hippoandfriends 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | 17 | */ 18 | /** 19 | * attempt to have a tabbarbutton with gradient background 20 | * based on 21 | */ 22 | package skins 23 | { 24 | import spark.components.ButtonBarButton; 25 | import spark.components.DataGroup; 26 | import spark.skins.mobile.ButtonBarSkin; 27 | import spark.skins.mobile.supportClasses.ButtonBarButtonClassFactory; 28 | import spark.skins.mobile.supportClasses.TabbedViewNavigatorTabBarHorizontalLayout; 29 | 30 | public class TabbedViewNavigatorTabBarSkin extends ButtonBarSkin 31 | { 32 | public function TabbedViewNavigatorTabBarSkin() 33 | { 34 | super(); 35 | } 36 | 37 | override protected function createChildren():void 38 | { 39 | if (!firstButton) 40 | { 41 | firstButton = new ButtonBarButtonClassFactory(ButtonBarButton); 42 | firstButton.skinClass = skins.TabbedViewNavigatorTabBarTabSkin 43 | } 44 | 45 | if (!lastButton) 46 | { 47 | lastButton = new ButtonBarButtonClassFactory(ButtonBarButton); 48 | lastButton.skinClass = skins.TabbedViewNavigatorTabBarTabSkin; 49 | } 50 | 51 | if (!middleButton) 52 | { 53 | middleButton = new ButtonBarButtonClassFactory(ButtonBarButton); 54 | middleButton.skinClass = skins.TabbedViewNavigatorTabBarTabSkin; 55 | } 56 | 57 | if (!dataGroup) 58 | { 59 | // TabbedViewNavigatorButtonBarHorizontalLayout for even percent layout 60 | var tabLayout:TabbedViewNavigatorTabBarHorizontalLayout = 61 | new TabbedViewNavigatorTabBarHorizontalLayout(); 62 | tabLayout.useVirtualLayout = false; 63 | 64 | dataGroup = new DataGroup(); 65 | dataGroup.layout = tabLayout; 66 | addChild(dataGroup); 67 | } 68 | } 69 | 70 | } 71 | } -------------------------------------------------------------------------------- /src/skins/TabbedViewNavigatorTabBarTabSkin.as: -------------------------------------------------------------------------------- 1 | package skins 2 | { 3 | import flash.display.GradientType; 4 | import flash.geom.Matrix; 5 | 6 | import spark.skins.mobile.supportClasses.ButtonBarButtonSkinBase; 7 | 8 | public class TabbedViewNavigatorTabBarTabSkin extends ButtonBarButtonSkinBase 9 | { 10 | 11 | static private var tabBackGroundColors:Array; 12 | static private var matrix:Matrix; 13 | 14 | 15 | public function TabbedViewNavigatorTabBarTabSkin() 16 | { 17 | } 18 | 19 | override protected function drawBackground(unscaledWidth:Number, unscaledHeight:Number):void 20 | { 21 | var isSelected:Boolean = currentState.indexOf("Selected") >= 0; 22 | 23 | if (tabBackGroundColors == null) { 24 | tabBackGroundColors = [] ; 25 | tabBackGroundColors[0] = styleManager.getStyleDeclaration(".tabbartabbuttoncolor").getStyle("colorbottom");/* gradient will be applied from bottom to top, this is the bottom color*/ 26 | tabBackGroundColors[1] = styleManager.getStyleDeclaration(".tabbartabbuttoncolor").getStyle("colortop"); 27 | matrix = new Matrix(); 28 | matrix.createGradientBox(unscaledWidth, unscaledHeight, 1.57, 0, 0); 29 | } 30 | 31 | //only if the tab is selected, then we'll have the gradient backup 32 | if (isSelected) 33 | graphics.beginGradientFill(GradientType.LINEAR, tabBackGroundColors, [100,100],[0,255],matrix); 34 | else 35 | graphics.beginFill(0,1); 36 | 37 | graphics.drawRect(0, 0, unscaledWidth, unscaledHeight); 38 | graphics.endFill(); 39 | } 40 | } 41 | } -------------------------------------------------------------------------------- /src/views/PickerView.mxml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | --------------------------------------------------------------------------------