Page 1 of 1

DSub registered as media player?

PostPosted: Sun May 04, 2014 6:30 pm
by mikes
DSub 4.6 isn't found by Media Button Router (Play store - used to select which media app bluetooth buttons are sent to). All my other media apps are found (including the Subsonic app, if installed).

I'm guessing that this might be because DSub doesn't properly register itself as a media player or ???

Bluetooth buttons do work with it, as long as I start it running first.

Re: DSub registered as media player?

PostPosted: Sun May 04, 2014 7:46 pm
by mikes
Did a bit of research...

Here's what's expected: https://code.google.com/p/media-button- ... tail?id=16

Looking at the DSub source, and comparing it with some old Subsonic source (https://github.com/haxzamatic/Subsonic- ... nifest.xml), and other nearby entries, it looks like the action below should be enclosed in intent-filter tags... (BluetoothIntentReceiver included for comparison):
Code: Select all
        <receiver android:name="github.daneren2005.dsub.receiver.MediaButtonIntentReceiver">
         <action android:name="android.intent.action.MEDIA_BUTTON" />
        </receiver>


        <receiver android:name="github.daneren2005.dsub.receiver.BluetoothIntentReceiver">
            <intent-filter>
                <action android:name="android.bluetooth.a2dp.action.SINK_STATE_CHANGED"/>
            <action android:name="android.bluetooth.headset.profile.action.CONNECTION_STATE_CHANGED"/> <!-- API Level 11 -->
            <action android:name="android.bluetooth.device.action.ACL_CONNECTED"/>
            <action android:name="android.bluetooth.device.action.ACL_DISCONNECTED"/>
            </intent-filter>
        </receiver>

But, I'm a tyro, I could be wrong. But I think that's it, according to http://developer.android.com/guide/topi ... ement.html , a receiver can contain an event-filter or meta-data and the intent-filter must contain the actions.

Re: DSub registered as media player?

PostPosted: Sun May 04, 2014 9:54 pm
by daneren2005
Yes, I meant to just remove the priority but it looks like I accidently removed to whole intent filter. I will fix it in a release tomorrow probably since I won't be at my computer until late tonight.

Sent from my Nexus 5 using Tapatalk

Re: DSub registered as media player?

PostPosted: Sun May 04, 2014 10:05 pm
by mikes
thx. I just sent a pull request with the change.