jroal / a2dpvolume

Automatically exported from code.google.com/p/a2dpvolume
http://jimroal.com/slist.htm
95 stars 33 forks source link

A2DP does not read notifications on Lollipop #197

Closed GoogleCodeExporter closed 7 years ago

GoogleCodeExporter commented 9 years ago
Device (phone) brand: no-brand
Device (phone) model: Samsung Galaxy S4 mini (serranolte)
Android OS version: 5.0.2
App version number: 2.11.12
What steps will reproduce the problem?
1. Add some apps in "Apps for Accessibility" in A2DP Volume settings
2. Enable A2DP Volume in "Accessibility" settings in Android settings
3. Receive notification from those apps

What is the expected output? What do you see instead?

Reading of notification expected. A2DP does not read notification (neither 
popup appears)

Please provide any additional information below.
I noticed that in Lollipop there is another setting for accessing notification: 
"Notification Access Preferences" under "Audio and Notification". In this list, 
A2DP does not appear. It may be the cause of this issue.

Original issue reported on code.google.com by xmasp...@gmail.com on 4 Feb 2015 at 9:05

GoogleCodeExporter commented 9 years ago
I testing this with a Lollipop emulator and it worked fine both with SMS and 
using the accessibility reading features.  Both the toast message and the 
audible reading worked.  At this point I can't duplicate the issue.  I only 
have Motorola devices and none have Lollipop yet.  I only have the emulator to 
test with.  It could be an issue with Touchwiz but I have no way to confirm 
that or to test with Touchwiz.

Try this:
* https://code.google.com/p/a2dpvolume/wiki/Accessibility_Settings (via email 
you said you did go through this)
* https://code.google.com/p/a2dpvolume/wiki/Reading_SMS (via email you said you 
checked that too)
* Make sure A2DP Volume service is running and not being blocked or killed
* Make sure your TTS works (set up in Android settings)
* Make sure you configure the device settings in A2DP Volume for each device.  
Every device you want to have messages read while connected must have this 
configured in the device specific settings.  
* Make sure you enable reading notifications in the A2DP Volume settings.

Original comment by JimR...@gmail.com on 8 Feb 2015 at 2:53

GoogleCodeExporter commented 9 years ago
I applied those settings, in Accessibility Setting, but I still can't read for 
speaking notifications (popup does't appears).
The "Reading SMS" function works, but notifications don't.

I'm also using CarMode to test functionality: in this app when I push "Send 
message to A2DP volume" button, popup appears and TTS spells right the text; 
but if I try to push "Send Multiple Notifications" nothing occurs (nor popup, 
nor speaking).
In the attachment you can see the settings I applied.

Thanks for your time

Original comment by xmasp...@gmail.com on 9 Feb 2015 at 9:52

Attachments:

mgbarton commented 8 years ago

I've been using 2.11.12 on a nexus 5 running Android 6.0.1. I have exactly the same problem. SMS reading works great, but I cannot get the tool to read notifications, despite having enabled notification reading and having selected the app (Whatsapp in this case) in the app list.

Would love this to work - thanks for publishing this excellent app.

jroal commented 8 years ago

Finally validated this issue. I now have 5.0 and 5.1 devices and notifications don't get captured using the accessibility settings. It appears they added notification access features in 5.0 I will need to implement. Sorry for the long delay but I did not have 5.0 on anything until recently. I have also been busy with other things all 2015 and did no programming on the app at all. A quick look at the 5.0 changes revealed a new notification listener feature that was added in Android 4.3 and by 5.0 the old methods this app uses no longer work. Here is the new listener service: http://developer.android.com/reference/android/service/notification/NotificationListenerService.html

Today the app supports Android 4.0.3 (API 15) and up. I will need to update the app to support minimum API 18 (Android 4.3) and up. Users of older devices would no longer get updates. As of today about 60% of this apps users are on 4.3 or higher. 73% of the users are on 2.11.12 (latest Play Store release). image

mgbarton commented 8 years ago

Thank you for your efforts! Send a message when you need help Beta testing.

jroal commented 8 years ago

Did some more work on this. I have it to where the NotificationListenerService can capture and read notifications. Needs work though. I need to figure out how to parse the notifications better, and not re-read notifications multiple times. I have really battled with getting the debugger to work with the new service. Posted the question here: http://stackoverflow.com/questions/37774499/cant-use-debugger-with-notificationlistenerservice Hope to get some help working through that.

Android notifications have become much more complex. There are many parts to a notification now. For instance, the first time a notification pops up it usually has some text that communicates the actual message. However, additional notifications stack up and the text will just say something luike "3 new notifications". Not very helpful. Also, these stacked messages are in the notification every time so if you read it the same way you get all 3 messages. Then when you get a 4th you get all 4. Each time it would read everything again. Not the desired behavior. I just want it to read the latest each time. Not having the debugger its hard to see how various apps load their notifications.

Again, help would be very much appreciated. I just work on this once in awhile when I feel like it and have time. I do now have a Marshmallow device (2015 Moto-X) as my daily driver so my motivation has increased.

jroal commented 8 years ago

Right after I mage the last post, I got it working somehow. Tested it on a 2013 Moto-X running Lollipop. Reads Hangouts OK. Have not tested other notifications yet. May post this as Alpha for testing. Version is 2.12.1. https://drive.google.com/open?id=0B2ZRdduGQB59UGtQdzBJZm8ycDA

mgbarton commented 8 years ago

Thanks Jim. Have downloaded the APK and will attempt to test (I'm traveling right now, so will have to look for the right opportunity.)