DSub registered as media player?

Alternative Android Client for Subsonic

Moderators: daneren2005, moderators

DSub registered as media player?

Postby mikes » Sun May 04, 2014 6:30 pm

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.
mikes
 
Posts: 64
Joined: Fri Aug 12, 2011 9:29 pm

Re: DSub registered as media player?

Postby mikes » Sun May 04, 2014 7:46 pm

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.
mikes
 
Posts: 64
Joined: Fri Aug 12, 2011 9:29 pm

Re: DSub registered as media player?

Postby daneren2005 » Sun May 04, 2014 9:54 pm

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
Developer of DSub for Android
daneren2005
 
Posts: 1709
Joined: Fri Jul 06, 2012 7:52 pm

Re: DSub registered as media player?

Postby mikes » Sun May 04, 2014 10:05 pm

thx. I just sent a pull request with the change.
mikes
 
Posts: 64
Joined: Fri Aug 12, 2011 9:29 pm


Return to DSub for Android

Who is online

Users browsing this forum: No registered users and 10 guests