I am currently trying to use the playlist generation functionality provided by the GNSDK for Android. So far I have created a GnPlaylistCollection and added several tracks (GnAlbums) to it. This seems to be working fine. Then I generate a playlist using a PDL statement and I get a GnPlaylistResult successfully. I can iterate through and see the identifiers that it returned. The part that I don't understand is how to use the GnPlaylistIdentifier. A GnPlaylistIdentifier only gives me access to a media identifier and a collection name. Can I get a GnAlbum object back again using the GnPlaylistIdentifier? The same question can be applied to the More Like This functionality. I get a single identifier back but I have no idea what to do with it.

Hi There,

When you populate the GnPlaylistCollection, the data you give it (eg: GnAlbum, GnTrack, or both) is not stored per se as the GnPlaylistCollection is not a general metadata store. It's purpose is to index the traits of the media provided for it, along with the identifier. During playlist generation the traits are examined to see if they suit the PDL, and if so the identifier is returned.

This identifier is supposed to mean something to the application. It can be a filename to the media, or a database ID, or anything else that the application can refer to. When a playlist is generated and the SDK gives the application back a list of Identifiers, the application is supposed to map these back to the original media. 

The basic use-case for Playlist is to be used along-side some media collection. Most applications already have the media storage part down, and just need smart playlist generation. The Identifier is the way we tie Playlist to the application.

If you just want to store metadata for each Identifer so you can print out playlists, your application will have to manage the storage of the metadata (and you can give Playlist the ID of the metadata in your storage). We are planning to add APIs to provide simple storage for applications that want to do this, so this should become simpler when those are available. For now, you need to create this metadata database to suit your application.


-Paul Quinn