vendredi 30 janvier 2015

Android support v7 MediaRouter sometimes doesn't work properly

I use v7 support library MediaRouter for switching routes between phone's speaker and bluetooth device.


And sometimes it works strange, for example, when I turn off the bluetooth, corresponding route seems to be removed (playback switches to the speaker), but my application doesn't receive any callback about it. And moreover, when I manually get all the routes via MediaRouter.getRoutes(), it returns that bluetooth route, but when I try to switch to it, it seems to be selected, but actually playback still goes through the speaker.


I tried all the flags CALLBACK_FLAG_FORCE_DISCOVERY, CALLBACK_FLAG_REQUEST_DISCOVERY etc, without result. Only phone reboot helps. Any suggestions?


I used Android 4.2, 4.4.


Aucun commentaire:

Enregistrer un commentaire