Created
October 10, 2010 00:38
-
-
Save pbrisbin/618775 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private void loadStream() { | |
| // run the stream in its own thread | |
| Runnable r = new Runnable() { | |
| public void run() { | |
| try { | |
| mediaPlayer = new MediaPlayer(); | |
| mediaPlayer.setDataSource(STREAM); | |
| mediaPlayer.prepare(); | |
| mediaPlayer.start(); | |
| // dismiss the dialog | |
| handler.sendEmptyMessage(0); | |
| } | |
| catch (IOException e) { | |
| Log.e(APP, "error loading stream " + STREAM + ".", e); | |
| return; | |
| } | |
| } | |
| }; | |
| new Thread(r).start(); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment