divers
This commit is contained in:
@@ -175,7 +175,7 @@ public class MainActivity extends AppCompatActivity {
|
||||
return true;
|
||||
|
||||
case R.id.live:
|
||||
liveRadio("https://live.radiomercure.fr/on-air/live");
|
||||
lectureAudio("https://live.radiomercure.fr/on-air/live");
|
||||
|
||||
/* Intent playerIntent = new Intent(this, MediaPlayerService.class);
|
||||
startService(playerIntent);
|
||||
@@ -216,11 +216,11 @@ public class MainActivity extends AppCompatActivity {
|
||||
}
|
||||
};
|
||||
|
||||
private void liveRadio(String StreamUrl) {
|
||||
private void lectureAudio(String chemin) {
|
||||
//Check is service is active
|
||||
if (!serviceBound) {
|
||||
Intent playerIntent = new Intent(this, MediaPlayerService.class);
|
||||
playerIntent.putExtra("stream_url",StreamUrl);
|
||||
playerIntent.putExtra("media",chemin);
|
||||
startService(playerIntent);
|
||||
bindService(playerIntent, serviceConnection, Context.BIND_AUTO_CREATE);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user