-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Speak readings/alarms when connected to Android Auto #1533
base: master
Are you sure you want to change the base?
Conversation
Conflicts resolved: app/src/main/res/values-de/strings-de.xml app/src/main/res/values/strings.xml
test update readme
I will test this on Monday/Thuesday with my car. 😄 |
xDrip already has "Speak Readings". |
@Navid200 This PR implements Android Auto support as it is mentioned in the title and description. The car computer now "speaks" the BG values and interrupts car music play, etc. |
I see. Sorry I missed that. Thanks for pointing that out. |
At the moment when my phone connects to Bluetooth in the car it silences the speak readings. I have tried to enable all the car connections that I have found but readings do not come through the car audio and my phone is silenced. I don't care what I get the readings through, I just want some readings while phone is connected. A Samsung A32. |
I'm trying to be as precise as possible:
The idea was to have the car read your values/alarms when you are driving and your phone is connected to Android Auto.
In the first implementation I created a messaging style notification when a new value/alarm is detected and send it to the car when connected. The problem here was:
After some ideas, I thought the best way was to simply use the Text-to-Speech feature we already use in the app. I implemented two new Switches in the Settings -> Speak Readings ->
Speak Readings in car
andSpeak alerts in car
. I also added translation for German. Then every time it was checked whether Speak is activated I changed to also check whether Speak in car is activated && phone is connected to Android Auto.In SpeechUtil I changed the way currently played music is handled. As especially in the car (and I guess this is also way better if not in car than before) when music is currently playing we don't wait 40 sec and then just speak but now request Audiofocus, which means music will be paused for our Speaking Event and resume afterwards.
I think it's now way better and easier to do it with the Text-to-Speech than firing an additional notification that can be read by the car.
For the future it might be interesting to have a look into 'better' texts to be read out. Now for a new value it's "100 flat" and it might be cool to have sth like "Your blood glucose is at 100 and steady, it changed +4 since your last reading". This might also be choosable by the user whether to use long or short form. Before changing this I wanted to have your opinion on it.
Fixes #1423