isaackyuka / android-daisy-epub-reader

Automatically exported from code.google.com/p/android-daisy-epub-reader
0 stars 0 forks source link

Add support for a2dp bluetooth headsets #40

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
This request was originally made in June 2010 in an email to me. I'm logging 
this feature request as I have just added the code to support this capability 
and noticed we didn't have an open issue for it.

So the request is to add support for bluetooth headsets, which include controls 
to skip forward and back between tracks, and to toggle between play and pause. 
The test device is a BT3030.

Thanks to Sebastian (who also provides the German translations) for raising 
this request. Sorry it's taken so long to address.

Original issue reported on code.google.com by julianharty on 18 Jun 2011 at 11:14

GoogleCodeExporter commented 8 years ago
Fixed in r269 of the project. Please note, there seem to be intermittent 
problems, at least on my current test device of a Google IO ion phone running 
Android 1.6, where the audio becomes choppy in playback and the controls become 
unresponsive. This seems to be an android-related problem when using a2dp 
devices. I'll test with newer versions of the Android platform (on newer 
devices).

The workaround for the choppiness seems to be to disable and re-enable the 
bluetooth capability on the phone. Sometimes I also needed to reset the BT3030 
to restore full functionality between the phone and the a2dp device. I noticed 
the problems are similar for the default music player so I don't think it's 
specific to the DaisyReader application.

If any of you can test this feature, especially with other a2dp headsets, I'd 
be grateful.

Julian

Original comment by julianharty on 18 Jun 2011 at 11:19

GoogleCodeExporter commented 8 years ago
I listen to Daisy books through my A2DP enabled car stereo so I'm very 
interested in this feature too :)
I will test this the following days and report back..

Original comment by TheW...@gmail.com on 18 Jun 2011 at 4:34

GoogleCodeExporter commented 8 years ago
I tested this functionality today and most of it works fine
the button functions play/pauze, next and previous work fine
when I press any of these buttons on my car stereo the software responds 
accordingly

this however only seems to work when the screen is on
when the screen is off and I press any of the buttons, the screen simply turns 
on but the action isn't performed
if I press a second time on the control, the action is performed probably 
because the screen is now turned on after the first button press

Daisy Player plays fine in the background with the screen off, it's just the 
controls that don't :)
that reminds me I didn't test the controls with screen on and player in the 
background..

the A2DP controls work fine with screen off with other media players

if you need some specific test just let me know

Original comment by TheW...@gmail.com on 20 Jun 2011 at 5:43

GoogleCodeExporter commented 8 years ago
Thanks for the feedback on the A2DP support. The specific information I'd 
appreciate would be to know how reliable the playback is e.g. does it start to 
fail (like it does on my phone) from time to time. Also, which Android 
device(s) you're using and the Android version number(s). This information will 
help me understand more about the problems I've noticed to know if they're 
specific to a version of Android or a type of phone, etc.

Currently the DaisyReader stops playing at some point when it's not running in 
the foreground e.g. when the screen is off. It doesn't stop immediately. I need 
to change the player program into an android 'service' to make it play reliably 
in the background. This change would *probably* mean the controls would also 
continue to work. While I'd like to make the change to use a service soon, in 
practice I have other changes I want to make first, so I may take a while to 
implement the change. I'll announce it on the Google Group for this project 
when I eventually manage to make the change.

Original comment by julianharty on 24 Jun 2011 at 9:44

GoogleCodeExporter commented 8 years ago
sorry for the delay..
I'm running it on a Samsung Galaxy S II with Android 2.3.3
until now playback has been excellent
I start a book where I finished it and then turn off the screen and let it play 
through my stereo
I do get traffic info from time to time and then I need to rewind about 10 
seconds (which is one handy swipe now :) )
traffic interruption can happen about every 25 minutes
I think 30 minutes is the longest I have let it play with screen off and it 
hasn't stopped during those 30 minutes

the issue I described above (player not pausing when pressing pauze button if 
screen if off) seems to make the player switch very fast between play and pauze 
and you can't stop this unless you close the application
this happens when I press the button a few times in a row, need to test further 
to be able to provide clear circumstances
I haven't experienced this issue with other music players on my phone
I did experience it on a podcast player I tried today
so that makes 2 apps who have this issue

Original comment by TheW...@gmail.com on 28 Jun 2011 at 8:41

GoogleCodeExporter commented 8 years ago
Thank you for the update. Your experience of the occasional issues where the 
player switches very fast, etc. seems to align with my experience when playback 
becomes choppy. I've seen the visual behaviour you describe during my testing 
too. As it also affects the music player I don't think the cause is related to 
the Daisy Reader software, however I may be able to improve the way the 
software copes with this behaviour.

Julian

Original comment by julianharty on 29 Jun 2011 at 3:55

GoogleCodeExporter commented 8 years ago
this seems to happen if I press the play/pause button 2 or 3 times in a row 
with only a second or 2 in between
if I wait for about 5 seconds in between I can press as much times as I want 
and it will play and pause as expected without any issue

Original comment by TheW...@gmail.com on 1 Jul 2011 at 6:10