Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
PlayerViewComponent player = (PlayerViewComponent) findViewById(R.id.player);
AudioEntity audioEntity = new AudioEntity() {
@Override
public String getImageUrl() {
return "http://mediad.publicbroadcasting.net/p/kcur/files/201309/waitwaitnew.jpg";
}
@Override
public String getTitle() {
return "NPR Wait Wait";
}
@Override
public String getSubTitle() {
return "podcast episode n";
}
@Override
public String getAudioUrl() {
return "http://podcastdownload.npr.org/anon.npr-podcasts/podcast/344098539/372126500/npr_372126500.mp3";
}
}
List audioEntityList = new ArrayList();
audioEntityList.add(audioEntity);
player.setAudioEntityList(audioEntityList);
player.show()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment