Forums - ClickSDK is not usable in current state (Gramofon-Android)

3 posts / 0 new
Last post
ClickSDK is not usable in current state (Gramofon-Android)
Jeroen
Join Date: 12 Sep 16
Posts: 2
Posted: Sat, 2016-11-05 13:55

Hi there,

I really like the idea that there has been made a SDK but there are somethings that I ran into which makes it unusable for me, so here's my story.

A couple of months ago I've bought a Gramofon and updated it to the last firmware (3.1.19) which features the AllPlay implementation. With that being said I tried the AllPlay Click SDK for Android and played with it for the last couple of days. The discovery of players is no problem but the real problem is controlling a player.

Every method you can use has this playlist validation which is:

playlist != null && playlist.isMine() && (playlist.size() == 0 && playlist.getCurrentItem() == null || playlist.size() > 0 && playlist.getIndexPlaying() >= 0)

The values of isMine() and getIndexPlaying are alway false so that means that the check always fails and no method can be used. I don't know what it is and for what I could see is that it is a native function which comes from the "so" files (underlying C AllJoyn implementation). I've already tried to extend the classes to make my own implementation of the "checkValid" method but it's not possible due to the private variables.

There is a way to get the SDK kind of working, and that's the ControllerSDK. It would be nice to have it officially released since this seems to work like it should. Also the "AllPlay JukeBox" app implements the ControllerSDK so why hold it back and give us the ClickSDK only? The demo app is also broken for me.

Also, with a lot of work it is possible to make your own implemention but it kinda misses the point of having a "Ready to Use" SDK. I spend the whole day debugging and trying but with no luck. Could this be fixed? It also helps to make it opensource so people can fix it.

  • Up0
  • Down0
daniel.tai Moderator
Join Date: 19 Oct 15
Location: San Jose
Posts: 32
Posted: Sun, 2016-11-06 10:58

Hi Jeroen,

Sorry for your troubles.  Technically, you can use already use Controller SDK in Click SDK.  We didn't provide the documentation for Controller SDK though, but hopefully enough comes from the javadoc in Android Studio for you.  With Click SDK's Controller SDK, you are not going to be able to use Device class, since we compiled this out to save foot print.  You should be using Zone and Player class like the Click SDK.  

I will have to check what is happening with Playlist class, but you should be able to control the player, if your app is the app that send the play command to the speaker (Works as well if you transfer what you are playing on your handset device to the speaker, using the UX).  Playlist.isMine() will return true if the playlist came from your app (This is important).  Playlist.getIndexPlaying() should return greater than 0 if you are not playing Bluetooth or Spotify on your Gramofon.  Of course, with Controller SDK, this is not something you need to concern your app with.  Click SDK use them so that let developer control 1 speaker at a time, and not allow others to access unless it is playing their content.

If it still doesn't work for you, let me know.  It is possible, due to lack of updates of Click SDK (Thanks to Qualcomm Legal), that it has not kept up with firmware releases (Though our firmware team is pretty good to ensure backward compatibility).

Thanks

Daniel

  • Up0
  • Down0
Jeroen
Join Date: 12 Sep 16
Posts: 2
Posted: Mon, 2016-11-07 06:51

Hi Daniel,

Thank you for your quick response. Now it makes kinda sense to me.

I was testing with Spotify playing on the device, therefor the methods were not avaible to me. Still a strange situation if you ask me, you should control the player as it is. Got almost all functionalities working now with the ControllerSDK but there is still a lot to do. Since it doesn't have proper documentation I've to debug and reverse engineer to see what is going on. But I'm getting there.

Right now I'm trying to select a zone and creating a group. Selecting is not an issue but creating a group is magic to me, so I'm going to do that in a later sprint.

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.