yaniv hanya Active Member Licensed User Mar 5, 2020 #1 My app ran on a tablet connected to a sound amplifier. I need to connect wirelessly (Bluetooth /wifi) to another device and receive a stream of music from it, and play it in my amplifier (like the multimedia systems in cars). I know how to copy the entire file to my device and then play it. The Walkie Talkie from here also transfers closed files. But how do I play om going stream from another phone on my device?
My app ran on a tablet connected to a sound amplifier. I need to connect wirelessly (Bluetooth /wifi) to another device and receive a stream of music from it, and play it in my amplifier (like the multimedia systems in cars). I know how to copy the entire file to my device and then play it. The Walkie Talkie from here also transfers closed files. But how do I play om going stream from another phone on my device?
Erel B4X founder Staff member Licensed User Longtime User Mar 5, 2020 #2 You can run a media server on one device and then use ExoPlayer or MediaPlayerStream to play it. Example of a possible media player (haven't tested it myself): https://play.google.com/store/apps/details?id=com.al.dlnaserver&hl=en Upvote 0
You can run a media server on one device and then use ExoPlayer or MediaPlayerStream to play it. Example of a possible media player (haven't tested it myself): https://play.google.com/store/apps/details?id=com.al.dlnaserver&hl=en
yaniv hanya Active Member Licensed User Mar 5, 2020 #3 To be more specifically, the phone is supposed to run another special app of mine that should communicate with each other in other areas. And I want my app that runs on the phone to broadcast to the app on the tablet either music or MP4 files. In the app on the tablet I use MediaPlayer for music SimpleExoPlayer and for MP4. Is there a way to connect the apps by the AsyncStreams lib or similar and play directly from the open stream? Upvote 0
To be more specifically, the phone is supposed to run another special app of mine that should communicate with each other in other areas. And I want my app that runs on the phone to broadcast to the app on the tablet either music or MP4 files. In the app on the tablet I use MediaPlayer for music SimpleExoPlayer and for MP4. Is there a way to connect the apps by the AsyncStreams lib or similar and play directly from the open stream?
KZero Active Member Licensed User Longtime User Mar 5, 2020 #4 you need to decode the file music file to WAV then extract audio frames from it and send these frames separately (as Walkie Talkie example) use LibLame to decode MP3 files Upvote 0
you need to decode the file music file to WAV then extract audio frames from it and send these frames separately (as Walkie Talkie example) use LibLame to decode MP3 files
KZero Active Member Licensed User Longtime User Mar 5, 2020 #6 you can extract the audio pcm frames from the mp4 files too but you might need to use java code or wrap library for this check the java code in the first answer (not tested) How do I extractor audio to mp3 from mp4 using java in Android? I want convert mp4 video to mp3 audio file in Android platform? How can I do it? Actually I test some JAR. Firstly, the JAAD lib be used to test. import java.io.File; import java.io.RandomAccessFi... stackoverflow.com Upvote 0
you can extract the audio pcm frames from the mp4 files too but you might need to use java code or wrap library for this check the java code in the first answer (not tested) How do I extractor audio to mp3 from mp4 using java in Android? I want convert mp4 video to mp3 audio file in Android platform? How can I do it? Actually I test some JAR. Firstly, the JAAD lib be used to test. import java.io.File; import java.io.RandomAccessFi... stackoverflow.com
yaniv hanya Active Member Licensed User Apr 6, 2020 #7 KZero said: you need to decode the file music file to WAV then extract audio frames from it and send these frames separately (as Walkie Talkie example) Click to expand... Sounds a bit complex. Is this what you do when connecting a BT headset? (Which is basically what I need. I need the tablet to be used as a BT speaker) Upvote 0
KZero said: you need to decode the file music file to WAV then extract audio frames from it and send these frames separately (as Walkie Talkie example) Click to expand... Sounds a bit complex. Is this what you do when connecting a BT headset? (Which is basically what I need. I need the tablet to be used as a BT speaker)
KZero Active Member Licensed User Longtime User Apr 6, 2020 #8 yaniv hanya said: Sounds a bit complex. Is this what you do when connecting a BT headset? (Which is basically what I need. I need the tablet to be used as a BT speaker) Click to expand... your Android device is A2DP source and the BT headset is A2DP Sink you can only play music from A2DP source to A2DP Sink maybe there is solutions to simulate A2DP Sink from Android device but i think it will be more complicated Upvote 0
yaniv hanya said: Sounds a bit complex. Is this what you do when connecting a BT headset? (Which is basically what I need. I need the tablet to be used as a BT speaker) Click to expand... your Android device is A2DP source and the BT headset is A2DP Sink you can only play music from A2DP source to A2DP Sink maybe there is solutions to simulate A2DP Sink from Android device but i think it will be more complicated
yaniv hanya Active Member Licensed User Apr 7, 2020 #9 Maybe you know how they did it in the new car audio systems, which are also tablet type and play music from the phone and even play video from the phone. Upvote 0
Maybe you know how they did it in the new car audio systems, which are also tablet type and play music from the phone and even play video from the phone.
KZero Active Member Licensed User Longtime User Apr 7, 2020 #10 yaniv hanya said: Maybe you know how they did it in the new car audio systems, which are also tablet type and play music from the phone and even play video from the phone. Click to expand... check this links https://android-review.googlesource.com/c/platform/external/bluetooth/bluedroid/+/98161 A2DP Sink, AVRCP Controller and HFP Client in Android L_G程师的博客-CSDN博客 The APIs of A2DP sink and HFP client are not published in Android L, but the code which implements the profiles is indeed in Android L. You can set the configuration for the car to build the code. blog.csdn.net Upvote 0
yaniv hanya said: Maybe you know how they did it in the new car audio systems, which are also tablet type and play music from the phone and even play video from the phone. Click to expand... check this links https://android-review.googlesource.com/c/platform/external/bluetooth/bluedroid/+/98161 A2DP Sink, AVRCP Controller and HFP Client in Android L_G程师的博客-CSDN博客 The APIs of A2DP sink and HFP client are not published in Android L, but the code which implements the profiles is indeed in Android L. You can set the configuration for the car to build the code. blog.csdn.net