Manjeet Brar
Manjeet Brar

Reputation: 943

stream music from phone to phone in chat application over internet

can i stream music from one mobile to another mobile via internet?

i am developing a chat application using openfire XMPP server. in this application i want to stream music from one mobile to another.

For example..

1st user send request to 2nd user for share music. 2nd user accept the request and share some songs with 1st user. 1st user can play songs directly from 2nd user mobile via internet which is shared by or permitted by 2nd user.

if it is possible how i can do??.

Upvotes: 0

Views: 163

Answers (1)

Ganesh AB
Ganesh AB

Reputation: 4698

As per your requirement, To stream song on 2nd user's device, 1st user must have uploaded the song on application server (or FTP server). When 1st user sharing song, upload that song to server & pass song URL to 2nd user.

To achieve this, you need two modules at android end :

  1. Websocket android client library. (Most popular socket communication library)

https://github.com/koush/AndroidAsync


  1. Audio streaming in android app.

You can use Android's MediaPlayer to stream Audio/Video

http://www.hrupin.com/2011/02/example-of-streaming-mp3-mediafile-with-android-mediaplayer-class

Hope this description will you.

Upvotes: 1

Related Questions