Triton Mobile SDK for Android 3.5.1
This is a custom android player made by Triton Digital
Loading...
Searching...
No Matches
com.tritondigital.player.CuePointHistory Class Reference

Requests the cue point history from Triton's servers. More...

Classes

interface  CuePointHistoryListener
 Callback for receiving the CuePoint history. More...
 

Public Member Functions

 CuePointHistory ()
 Constructor.
 
void request ()
 Executes a CuePoint history request.
 
void cancelRequest ()
 
void setMount (String mount)
 Sets the station's mount.
 
void setMaxItems (int maxItems)
 Sets the maximum number of CuePoint to retrieve.
 
void setCueTypeFilter (String cueType)
 Sets a CuePoint.CUE_TYPE filter for the next request.
 
void setCueTypeFilter (List< String > cueTypes)
 
void clearCueTypeFilter ()
 Clears the CuePoint.CUE_TYPE filter.
 
void setListener (CuePointHistoryListener listener)
 Sets the result listener.
 

Static Public Member Functions

static String debugErrorToStr (int errorCode)
 Utility method to convert an error code to a debug string.
 

Static Public Attributes

static final int ERROR_INVALID_MOUNT = 6001
 Invalid mount.
 
static final int ERROR_UNKNOWN = 6002
 Unknown error.
 
static final int ERROR_XML_PARSING = 6003
 XML parsing error.
 
static final int ERROR_NETWORK = 6004
 Network error.
 

Detailed Description

Requests the cue point history from Triton's servers.

Restrictions
  • The same history will be returned for request faster than 15 seconds.
  • The data provided by this class is not sync with the stream.
  • Some streams are configured to return only CuePoint.CUE_TYPE_VALUE_TRACK.
Example
public class SongHistoryExample extends Activity implements CuePointHistoryListener
{
private CuePointHistory mCuePointHistory;
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// Init the cue point history object
mCuePointHistory = new CuePointHistory();
mCuePointHistory.setListener(this);
mCuePointHistory.setMaxItems(10);
mCuePointHistory.setMount("MOBILEFM");
// Request the track history
mCuePointHistory.request();
}
public void onCuePointHistoryReceived(CuePointHistory src, List<> cuePoints) {
// Handle history here
}
public void onCuePointHistoryFailed(CuePointHistory src, int errorCode) {
// Handle errors here
}
}
Requests the cue point history from Triton's servers.
Definition CuePointHistory.java:72
void setListener(CuePointHistoryListener listener)
Sets the result listener.
Definition CuePointHistory.java:332
void setMaxItems(int maxItems)
Sets the maximum number of CuePoint to retrieve.
Definition CuePointHistory.java:238
void request()
Executes a CuePoint history request.
Definition CuePointHistory.java:141
void setCueTypeFilter(String cueType)
Sets a CuePoint.CUE_TYPE filter for the next request.
Definition CuePointHistory.java:247
void setMount(String mount)
Sets the station's mount.
Definition CuePointHistory.java:206
Cue point keys.
Definition CuePoint.java:13
static final String CUE_TYPE_VALUE_TRACK
Music track/song.
Definition CuePoint.java:23
Callback for receiving the CuePoint history.
Definition CuePointHistory.java:76

Member Function Documentation

◆ debugErrorToStr()

static String com.tritondigital.player.CuePointHistory.debugErrorToStr ( int  errorCode)
static

Utility method to convert an error code to a debug string.

Note
To be used only for debugging purpose.

◆ setMaxItems()

void com.tritondigital.player.CuePointHistory.setMaxItems ( int  maxItems)

Sets the maximum number of CuePoint to retrieve.

Requesting lots of items can slow down your request.

Parameters
maxItemsMaximum number of items (0 for all)

The documentation for this class was generated from the following file: