austgl / a2dpvolume

Automatically exported from code.google.com/p/a2dpvolume
0 stars 0 forks source link

Disable other text message notifications when text message reader is enabled and device is connected. #65

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The other notifications are making sound at the same time the reader is reading 
so you can't understand the message.  Is it possible to have the other SMS 
notifications turned OFF when the SMS reader is enabled and the device is 
connected?  Need to investigate this.

Original issue reported on code.google.com by JimR...@gmail.com on 14 Aug 2011 at 7:40

GoogleCodeExporter commented 9 years ago
Maybe this would do it:
http://groups.google.com/group/android-developers/browse_thread/thread/ce738f750
8ad07b9

Original comment by JimR...@gmail.com on 14 Aug 2011 at 7:44

GoogleCodeExporter commented 9 years ago
I implemented the setOnUtteranceCompletedListener in 2.2.4, and of course the 
listener itself.  It is called properly when the message read is complete.  I 
planned to use am2.setStreamMute(AudioManager.STREAM_NOTIFICATION, true) to 
mute and am2.setStreamMute(AudioManager.STREAM_NOTIFICATION, false) to unmute.  
However, it did not appear to work.  So I implemented the setStreamMute on 
connect/disconnect but it still did not seem to work.

Any ideas anyone?

Original comment by JimR...@gmail.com on 15 Aug 2011 at 1:49

GoogleCodeExporter commented 9 years ago
I was not able to manipulate streams from other devices.  Will work some more 
later.  However, I did implement a 10s delay on reading the SMS after it is 
received.  This will help get past the notifications before reading the 
message.  In my case, it will also help by giving me time to switch my car 
stereo to the A2DP stream before it reads the message.  I thought about making 
the time configurable.  What are the thoughts from the users?  10s fine?  
should it be longer?  Should I make this configurable?

Original comment by JimR...@gmail.com on 16 Aug 2011 at 12:52

GoogleCodeExporter commented 9 years ago

Original comment by JimR...@gmail.com on 21 Aug 2011 at 3:19