Reputation: 1142
I got a project where i need to use my Android phone as a radio station.It means,i need to produce sound or song from my android phone and upload those to a server and from server; users can hear those sounds and songs live;almost,like an internet radio.
Is that possible in Android phones?If so how can i implement that?
Upvotes: 1
Views: 4614
Reputation: 29632
You can use MediaPlayer class to play radio station. You need to pass radio station's url init.
for example This is one radio station's url http://shoutcast2.omroep.nl:8104/
So, Now initialise Media Player's object with it as follows,
MediaPlayer player = new MediaPlayer();
player.setDataSource(“http://shoutcast2.omroep.nl:8104/”);
player.prepareAsync();
player.setOnPreparedListener(new OnPreparedListener(){
public void onPrepared(MediaPlayer mp) {
player.start();
}
});
You can download example code from here
Upvotes: -1
Reputation: 21
All you have to do is download spreaker This a wonderful application that will help you develop a radio station on your android phone and it's free free free here the website spreaker.com write back it's working fine and you can also listen to my program (oxse) on spreaker
Upvotes: 2
Reputation: 12435
Your question is a bit to general, but let's be tolerant and answer it.. With Android almost everything is possible :D
You need to define what you mean by "producing" of sound.. If it is some process of generating music on mobile device, it is possible! If you want to share music from your mobile SDcard, again you can do it.. 2nd thing you need to decide is how you want to distribute music, as stream or as files (services like spotify, youtube or grooveshark). Then you need to start with simple things to gain knowledge of technologies you would need for this project which is not simple at all..
Anyway I hope, you got a clue about size.. Probably you didn't expect we to write your code so next steps are up to you.. Welcome to Android wonderland and good luck with projects..
Upvotes: 1