Play last song in the playlist

I'm doing an aplication to manage playlist song, enqueeing them and playing it.
What I need to do is to add a song and then play it, but that song must be added to the list, so then the random next could work. It is posible to do this??

Sorry for my english. I'm from Argentina