YAACC - UPNP Client and Server
Loading...
Searching...
No Matches
Classes | Public Member Functions | Static Public Attributes | List of all members
de.yaacc.musicplayer.BackgroundMusicService Class Reference

A simple service for playing music in background. More...

Inheritance diagram for de.yaacc.musicplayer.BackgroundMusicService:
Inheritance graph
Collaboration diagram for de.yaacc.musicplayer.BackgroundMusicService:
Collaboration graph

Classes

class  BackgroundMusicServiceBinder
 

Public Member Functions

void onCreate ()
 
void onDestroy ()
 
IBinder onBind (Intent intent)
 
int onStartCommand (Intent intent, int flags, int startId)
 
void stop ()
 stop current music play
 
void play ()
 start current music play
 
void pause ()
 pause current music play
 
void seekTo (long pos)
 Seeks to position.
 
void setMusicUri (Uri uri)
 change music uri
 
int getDuration ()
 returns the duration of the current track
 
int getCurrentPosition ()
 return the current position in the playing track
 
void removeServiceListener (BackgoundMusicServiceListener listener)
 
void addServiceListener (BackgoundMusicServiceListener listener)
 

Static Public Attributes

static final String URIS = "URIS_PARAM"
 

Detailed Description

A simple service for playing music in background.

Author
Tobias Schoene (openbit)

Member Function Documentation

◆ getCurrentPosition()

int de.yaacc.musicplayer.BackgroundMusicService.getCurrentPosition ( )

return the current position in the playing track

Returns
the position

◆ getDuration()

int de.yaacc.musicplayer.BackgroundMusicService.getDuration ( )

returns the duration of the current track

Returns
the duration

◆ seekTo()

void de.yaacc.musicplayer.BackgroundMusicService.seekTo ( long  pos)

Seeks to position.

Parameters
posthe position

◆ setMusicUri()

void de.yaacc.musicplayer.BackgroundMusicService.setMusicUri ( Uri  uri)

change music uri

Parameters
urithe uri to play

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