StephenBlackWasAlreadyTaken / xDrip-Experimental

Experimental Branches for Collaboration on DexDrip
GNU General Public License v3.0
25 stars 62 forks source link

Repetitive System Sounds Not Repeating for Alerts #290

Open annbennett opened 8 years ago

annbennett commented 8 years ago

I have a Galaxy S6 (5.1.1), and I just updated to xdrip beta 2.0.5_2. Before this, I was using last August's release. In the August release, if I chose a system sound, such as a beep, for an alert, the alert would keep beeping until I dismissed or snoozed it. In the 2.0.5_2 release, the alert only beeps once. When I select the sound from the list of available system sounds, it previews with a repetitive beep. However, the alert test and alert itself only beeps once. Is this a known issue with this new release? Any chance of an update to correct it? I normally would have no problem uninstalling the new release and reinstalling the old, but I prefer the newer user interface. Additionally, a beep is less conspicuous than a song in a work environment

tzachi-dar commented 8 years ago

In the old release, were the beeps repeating every minute or faster? Are you sure that the alert profile was the same on both releases? (by default, the profile is ascending which disables the reraise of alerts).

annbennett commented 8 years ago

In the August release, the beeps repeated as they normally played on my phone, which was about every two seconds. I have my low alert set to reraise at one minute and the high five minutes. The alert profile is set to high not ascending. In the old release, the beeps did not work in ascending, but they did in high.

tzachi-dar commented 8 years ago

Do you remember the number of the august release? do you have a pointer to it?

AdrianLxM commented 8 years ago

@annbennett could you also please check what happens if you un-check override silent mode.

annbennett commented 8 years ago

I do not the release number. I do remember that when I looked at the system status, I could see 8.31.2015 at the end of the release information.

Also, I always have had override silent mode unchecked.

AdrianLxM commented 8 years ago

If you use a system sound and have override silent mode unchecked, it is not us that controls the media replay but the notification system. This might have changed with the system update? Or maybe the underlaying sound-file changed and was a couple of beeps before?

I still use Android 4.4 and in any version it just plays one beep - until after the rerise time is over. I really like that feature as I dislike my high-alarm at 120mg/dl go off strong but just as notification. I've been almost always using the current dev version since May 2015.

@tzachi-dar The only solution I can think of to have both would be to have a flag "loop sound file" in the AlertType that can be configured by the user. In such a case we could e.g. call player.setLooping(true) in 'Notifications#soundAlert(String soundUri)`.

annbennett commented 8 years ago

I found the release number! I knew I had screenshoted it for someone in the CGM in the Cloud group. I ran a search, and there it was! The full version number per the system status page is ffaeb89-experimental-xDrip-2-beta-2015.08.19. This is the version I had before I updated to the newest release, and this version allowed for the repetitive beeping.

annbennett commented 8 years ago

@AdrianLxM I have two sounds in my system sounds labeled "beep". One is the singular beep, and the other is the repetitive beep. It is the repetitive beep one that I have been selecting. I have double-checked this by choosing them both and testing them. Either one plays as a singular beep.

tzachi-dar commented 8 years ago

Beta 2, is from 2015-6-08. beta 2.0.1 brings the same file as beta 2. beta 2, downloads 2.0 beta 3. this is the version with ffaeb89. Installed that, will try to play with it.

tzachi-dar commented 8 years ago

It seems that when trying to get this feature to work with test alert, it does not work. (that is I only get one beep). Should this have been working for me with test alert?

tzachi-dar commented 8 years ago

Another thing to note is that the alertplayer does not seem to have relevant changes, except for code from the family of activeBgAlert.updateNextAlertAt, but I don't think this could have caused this.

tzachi-dar commented 8 years ago

annbennett - waiting for your answer weather I should be able to see that working with test alert only.

annbennett commented 8 years ago

It did work in the test alert. The system sound is labeled "beep once", but there are two versions of it: one that is repetitive and one that is not. I used the test alert to ensure that I had selected the right one.

tzachi-dar commented 8 years ago

I have played a bit with two android phones. one is 4.4 and the other is 5.0. It seems that on the 4.4 there are system tones that last for ever, (in xDrip or not) while on the 5.0 there are not. I'm afraid I don't have a galaxy s6. Since I did not see a change in the code that could cause this, I'm almost sure that this is some system change. So, the first thing to try is to go to the settings->notifications sounds and check if repeated beep works. If it does work with this settings than we will have to find the issue in the code.

If it does, than I'll have to send you versions of code with some more printing, in order to be able to understand what is going on. You will have to run them and send me the logging. Hopefully it will end in 3-5 iterations. So, annbennett, ball is in your field, if you want to go in this way, then let's start working.

annbennett commented 8 years ago

The beep does repeat in my settings. Just in case, I also tested some other system sounds that were not "songs" to see if this was oddly related to just that system sound. I tried basic bell, basic tone, and beep-beep. All of them repeat several times in my settings, but only once in xdrip.

I am happy to work with any coding you are willing to work on. However, I do not want you to have to spend your time on coding if this is a single user issue. I know you all do this in your spare time, so, if you think this could benefit more than just me, then let's do it.

tzachi-dar commented 8 years ago

Hi,

Although this is only one user that has complained, this might mean that we have some bug in our code that we do not understand and there for might also happen to more people.

Later today I'll send you a version that is like the old one that you have used. It should have more prints, and this way we will be able to see what is going on there.

Thanks Tzachi

tzachi-dar commented 8 years ago

app-release OK, I have finally created the needed apk. It is based on the version that has worked, and contains more logging. Please download the file, rename it .apk and install it. Once you have an alert that is playing continuously, you need to go to settings, view recent errors/warnings and send me a print of what happens after the line "Vibrate called timeFromStartPlaying."

Thanks Tzachi