Advertisement
Guest User

Untitled

a guest
Oct 7th, 2016
34
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.61 KB | None | 0 0
  1. package de.ringzero.standard.tuschapp;
  2.  
  3. import android.media.MediaPlayer;
  4.  
  5. import java.io.IOException;
  6.  
  7. /**
  8.  * Created by ford on 07.10.16.
  9.  */
  10.  
  11. public class TuschSpieler {
  12.     private MediaPlayer mp;
  13.  
  14.     public TuschSpieler() {
  15.         mp = new MediaPlayer();
  16.  
  17.         try {
  18.             mp.setDataSource("http://carpelibrum.de/test/tada.mp3");
  19.         } catch (IOException e) {
  20.             e.printStackTrace();
  21.             mp.prepare();
  22.         } catch (IOException e) {
  23.             e.printStackTrace();
  24.         }
  25.     }
  26.  
  27.     @Override
  28.     public void run() {
  29.         mp.start();
  30.     }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement