Addition of SMS feature

Ross – If above threshold, a text is sent at whatever interval the user programs in the preferences menu.  When below 55, currently it sends a text every 5 minutes so you can see the trend during this critical time.  I could of course add a programmable threshold if people want to.  None of the current users have requested it so far but I am open to it.  I’d like to get this released first though without adding anything that could introduce new issues as the code has been stable for some time.

 

From: Ross Naylor [mailto:notifications@github.com] 
Sent: Friday, December 19, 2014 1:23 AM
To: nightscout/android-uploader
Cc: Darryl Schick
Subject: Re: [android-uploader] Addition of SMS feature (#108)

 

In app/src/main/java/com/nightscout/android/sms/SMSSender.java <https://github.com/nightscout/android-uploader/pull/108#discussion-diff-22091267> :

> +        previousDisplayTime = record.getDisplayTime();
> +    }
> +
> +
> +    private boolean isNoDataRecord(GlucoseDataSet record) {
> +        if(getMinutesDate(record.getDisplayTime()) > 10)return true;
> +        if(previousBg == 0 || previousDisplayTime == null)return false;
> +
> +        if(record.getDisplayTime().compareTo(previousDisplayTime) == 0)return true;
> +        return false;
> +    }
> +
> +
> +    private boolean shouldSendSMS(GlucoseDataSet record,int BGInt){
> +        // Severe hypo. Send every data point until over 55.
> +        if(BGInt < 55 && BGInt > 38) return true;

Don't think this should be sent every time until above threshold. This should wait x amount of minutes. For example, if above high threshold wait 1 hour to resend and if below low threshold wait 20 minutes to send.

—
Reply to this email directly or view it on GitHub <https://github.com/nightscout/android-uploader/pull/108/files#r22091267> .  <https://github.com/notifications/beacon/AH1T7a2e9WOSBKu1gIGyBEsDZANMdcE7ks5nY7vOgaJpZM4DJFqR.gif>